//#include "grader.cpp"
#include <bits/stdc++.h>
using namespace std;
const int N=205, mod=1e9;
int n, ans;
int DistanceSum(int N, int *X, int *Y) {
n=N;
for(int i=0;i<n;i++){
int x=X[i], y=Y[i];
for(int j=i+1;j<n;j++){
cout<<i<<" "<<j<<" "<<(abs(x-X[j]) + abs(y-Y[j]))<<"\n";
ans+=(abs(x-X[j]) + abs(y-Y[j])) % mod;
}
}
return ans;
}
/*
11
2 5
2 6
3 3
3 6
4 3
4 4
4 5
4 6
5 3
5 4
5 6
*/
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
384 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
148 ms |
5880 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1086 ms |
46420 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1088 ms |
47992 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |