| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1307074 | dang_hai_long | 별들과 삼각형 (IZhO11_triangle) | C++20 | 445 ms | 5836 KiB |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
map<int, int> row, col;
vector <pair<int, int>> a(n);
for (auto &x:a) {
cin >> x.first >> x.second;
row[x.first]++;
col[x.second]++;
}
long long res = 0;
for (auto &x:a) {
res += (row[x.first] - 1) * (col[x.second] - 1);
}
cout << res << "\n";
return 0;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
