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;
int N, ne[1505], re[1505];
void initialize(int n) {
N=n;
for (int i=1;i<=n;i++){
ne[i]=n;
re[i]=n*(n+1)/2;
}
}
int hasEdge(int u, int v) {
ne[u]--;
ne[v]--;
re[u]-=v;
re[v]-=u;
if (ne[u]==0 || ne[v]==0)return 1;
if (ne[u]==1 && ne[re[u]]==1)return 1;
if (ne[v]==1 && ne[re[v]]==1)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... |