# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
43838 | heon | Geppetto (COCI15_geppetto) | C++11 | 2 ms | 824 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<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 time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |