| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1326658 | kawhiet | Star triangles (IZhO11_triangle) | C++20 | 1 ms | 332 KiB |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
map<int, int> m;
for (int i = 0; i < n; i++) {
int x, y;
cin >> x >> y;
m[x]++;
}
long long ans = 0;
for (auto [_, cnt] : m) {
ans += 1LL * cnt * (cnt - 1) / 2 * (n - cnt);
}
cout << ans << '\n';
return 0;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
