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 "game.h"
#include <bits/stdc++.h>
using namespace std;
map<int,int> M;
map<int,int> S;
int x;
void initialize(int n) {
x = n;
}
int hasEdge(int u, int v) {
M[u]++;
M[v]++;
if(M[u] == x-1 && S[u]<=1){
S[u]++;
S[v]++;
return 1;
}
if(M[v] == x-1 && S[v]<=1){
S[u]++;
S[v]++;
return 1;
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |