# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
161997 | mosiashvililuka | 별들과 삼각형 (IZhO11_triangle) | C++14 | 558 ms | 15680 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.
#include<bits/stdc++.h>
using namespace std;
long long a,b,c,d,e,pas;
pair <long long, long long> p[300009];
map <long long, long long> x,y;
int main(){
ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);
cin>>a;
for(b=1; b<=a; b++){
cin>>p[b].first>>p[b].second;
x[p[b].first]++;
y[p[b].second]++;
}
for(b=1; b<=a; b++){
pas+=(x[p[b].first]-1)*(y[p[b].second]-1);
}
cout<<pas;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |