# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
8588 | 2014-09-17T16:16:37 Z | yuioyuio | 사회적 불평등 (TOKI14_social) | C++ | 0 ms | 0 KB |
#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; }