| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1237780 | caacrugon | Ideal city (IOI12_city) | C++20 | 19 ms | 2004 KiB |
#include <bits/stdc++.h>
using namespace std;
#define mkp make_pair
#define ll long long
ll sumM(vector<int>&A){
sort(A.begin(),A.end());
ll ans=0,sum=0;
for(int i=0;i<A.size();i++){
ans+=1LL*A[i]*i-sum;
sum+=A[i];
}
return ans%1000000000;
}
int DistanceSum(int N,int*X,int*Y){
vector<int> lnx(X,X+N),lny(Y,Y+N);
return (sumM(lnx)+sumM(lny))%1000000000;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
