#include <cstdio>
int main () {
int N;
int L[111111];
int P[111111];
scanf("%d", &N);
for (int i=0; i<N; i++) {
scanf("%d %d", &L[i], &P[i]);
}
int sum=0;
int c1,c2,c;
for (int i=0; i<N-1; i++) {
for (int j=i+1; j<N; j++) {
if (L[i]>=L[j]) c1=L[i]-L[j];
else c1=(L[i]-L[j])*-1;
if (P[i]>=P[j]) c2=P[i]-P[j];
else c2=(P[i]-P[j])*-1;
c=c1*c2;
sum+=c;
}
}
printf("%d", sum);
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
1828 KB |
Output is correct |
2 |
Correct |
0 ms |
1836 KB |
Output is correct |
3 |
Correct |
0 ms |
1832 KB |
Output is correct |
4 |
Correct |
0 ms |
1832 KB |
Output is correct |
5 |
Correct |
0 ms |
1832 KB |
Output is correct |
6 |
Correct |
0 ms |
1828 KB |
Output is correct |
7 |
Correct |
0 ms |
1832 KB |
Output is correct |
8 |
Correct |
0 ms |
1832 KB |
Output is correct |
9 |
Correct |
16 ms |
1836 KB |
Output is correct |
10 |
Incorrect |
44 ms |
1832 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
300 ms |
1832 KB |
Program timed out |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
300 ms |
1828 KB |
Program timed out |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
300 ms |
1832 KB |
Program timed out |
2 |
Halted |
0 ms |
0 KB |
- |