Submission #91839

#TimeUsernameProblemLanguageResultExecution timeMemory
91839art85Star triangles (IZhO11_triangle)C++14
0 / 100
2 ms376 KiB
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; double ans = 0; int A[n][2]; for(int i = 0; i < n; i++){ for(int j = 0; j < 2; j++){ cin >> A[i][j]; } } for(int i = 0; i < n-1; i++){ for(int j = 0; j < n; j++){ if(A[i][0] == A[j][0] || A[i][1] == A[j][1]) ans += 0.5; } } cout << int(ans); }
#Verdict Execution timeMemoryGrader output
Fetching results...