# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
336083 | nikatamliani | Hyper-minimum (IZhO11_hyper) | C++14 | 1 ms | 364 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 <bits/stdc++.h>
using namespace std;
const int N = 2e5+10;
int x[N], y[N];
map<int,int> X, Y;
int main() {
int n;
cin >> n;
for(int i = 1; i <= n; ++i) {
cin >> x[i] >> y[i];
++X[x[i]];
++Y[y[i]];
}
long long ans = 0;
for(int i = 1; i <= n; ++i) {
ans += (long long)(X[x[i]] - 1) * (Y[y[i]] - 1);
}
cout << ans << '\n';
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |