| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1307073 | dang_hai_long | 별들과 삼각형 (IZhO11_triangle) | C++20 | 1 ms | 572 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]++;
}
int res = 0;
for (auto &x:a) {
res += (row[x.first] - 1) * (row[x.second] - 1);
}
cout << res << "\n";
return 0;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
