# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
8588 | yuioyuio | 사회적 불평등 (TOKI14_social) | C++98 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <cstdio>
#include <cmath>
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 c;
for (int i=0; i<N-1; i++) {
for (int j=i+1; j<N; j++) {
c=abs(L[i]-L[j])*abs(P[i]-P[j]);
sum+=c;
}
}
printf("%d", sum);
return 0;
}