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 <algorithm>
#include <queue>
using namespace std;
int a[1500], N;
bool b[1500][1500];
void initialize(int n){ N=n; for (int i=1; i<n; i++)a[i]=1; }
int hasEdge(int u, int v){
b[v][u]=b[u][v]=1;
if(a[u])swap(v, u);
if(!a[u])if(!(--a[v])){ for (int i=0; i<N; i++)a[i]+=(!b[v][i]&&(i!=v)&&a[i]); 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... |