# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
89794 | Atashka01 | Star triangles (IZhO11_triangle) | C++11 | 2 ms | 580 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.
//Euzibillahiminesseytanirracim Bismillahirrahmanirrahim
/*
ID:
TASK:
LANG: C++
*/
#include <bits/stdc++.h>
#define pb push_back
#define ll long long
#define ff first
#define ss second
#define mp make_pair
#define PII pair<int,int>
#define inf 1000000001
using namespace std;
map<int,int> m , p;
int n, x[303001], y[303001], ans;
int main()
{
cin>>n;
for(int i=1;i<=n;i++){
cin>>x[i]>>y[i];
m[x[i]]++;
p[y[i]]++;
}
for(int i=1;i<=n;i++){
ans += (m[x[i]] - 1)*(m[y[i]] - 1);
}
cout<<ans<<"\n";
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |