제출 #91839

#제출 시각아이디문제언어결과실행 시간메모리
91839art85별들과 삼각형 (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...