# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
676196 | Toxtaq | Star triangles (IZhO11_triangle) | C++17 | 2067 ms | 4648 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;
int main()
{
int n;
cin >> n;
vector<int>x(n), y(n);
map<int, int>X;
for(int i = 0;i < n;++i){
cin >> x[i] >> y[i];
X[x[i]]++;
}
int result = 0;
for(int i = 0;i < n;++i){
for(int j = i + 1;j < n;++j){
if(y[i] == y[j])result += X[x[i]] + X[x[j]] - 2;
}
}
cout << result;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |