| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1298794 | _uros9 | Star triangles (IZhO11_triangle) | C++20 | 492 ms | 9208 KiB |
#include <bits/stdc++.h>
#define int long long
using namespace std;
signed main()
{
int n;
cin >> n;
map<int,int> X,Y;
pair<int,int> niz[n];
for(int i=0; i<n; i++){
int x,y;cin >> x >> y;
X[x]++;Y[y]++;
niz[i]={x,y};
}
int rez=0;
for(int i=0; i<n; i++)
rez+=(X[niz[i].first]-1)*(Y[niz[i].second]-1);
cout << rez;
return 0;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
