제출 #43838

#제출 시각아이디문제언어결과실행 시간메모리
43838heonGeppetto (COCI15_geppetto)C++11
0 / 80
2 ms824 KiB
#include<iostream> using namespace std; int main(){ int n,m,a[21],b[401]; int cnt = 0; cin >> n >> m; if(m <= 2 && m != 0) cnt = 1; for(int i = 0; i < m; i++){ cin >> a[i] >> b[i]; for(int j = i-1; j >= 0; j--){ if(a[i] != a[j] || b[i] != b[j]){ cnt++; } } } cout << n*(n-1)+1-cnt; }
#Verdict Execution timeMemoryGrader output
Fetching results...