Submission #89794

#TimeUsernameProblemLanguageResultExecution timeMemory
89794Atashka01Star triangles (IZhO11_triangle)C++11
0 / 100
2 ms580 KiB
//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 timeMemoryGrader output
Fetching results...