Submission #976472

#TimeUsernameProblemLanguageResultExecution timeMemory
976472vjudge1Star triangles (IZhO11_triangle)C++17
0 / 100
2016 ms696 KiB
#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 timeMemoryGrader output
Fetching results...