#include <bits/stdc++.h>
using namespace std;
int DistanceSum(int n, int *X, int *Y) {
long long ans=0;
int m=1e9;
for(int i=0;i<n;i++)
{
for(int j=i+1;j<n;j++)
{
ans+=abs(X[i]-X[j])+abs(Y[i]-Y[j]);
ans%=m;
}
}
int ret=ans;
return ret;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
376 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
5 ms |
376 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1034 ms |
840 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1056 ms |
892 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |