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<bits/stdc++.h>
#include "game.h"
using namespace std;
int n;
vector<int>degrees;
void initialize(int N) {
n = N;
degrees.resize(n);
}
int hasEdge(int u, int v) {
degrees[u]++;
degrees[v]++;
if(degrees[u] >= n - 1 || degrees[v] >= n - 1){
return 1;
}
return 0;
}
//int main()
//{
// int cnt = 0;
// int n;
// cin >> n;
// initialize(n);
// for(int i = 0;i < n;++i){
// for(int j = i + 1;j < n;++j){
// cout << "(" << i << ", " << j << "): " << hasEdge(i, j) << '\n';
// }
// }
//}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |