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"
const int N = 1e5+69;
int A[N],k;
void initialize(int n) {
for(int i=0;i<n;i++)
A[i]=n-1;
}
int hasEdge(int u, int v) {
if(A[u]>2 && A[v]>2)return 0;
A[u]--,A[v]--;
if(A[u]==0 || A[v]==0)return 1;
if(A[u]==1){
if(k==2){
return 1;
} else {
k++;
}
}
if(A[v]==1){
if(k==2){
return 1;
} else {
k++;
}
}
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... |