# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
976472 | vjudge1 | Star triangles (IZhO11_triangle) | C++17 | 2016 ms | 696 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;
typedef long long ll;
int main()
{
int n;
cin >> n;
int x[n], y[n];
for (int i=0;i<n;i++) {
cin >> x[i] >> y[i];
}
int ans = 0;
for (int i=0;i<n;i++) {
for (int j=i+1;j<n;j++) {
for (int k=j+1;k<n;k++) {
if (x[i] == x[j] || x[i] == x[k] || x[k] == x[j]) {
if (y[i] == y[j] || y[i] == y[k] || y[k] == y[j]) {
ans++;
}
}
}
}
}
cout << ans;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |