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;
typedef long long ll;
int cnt, a[1501], n;
bool b;
void initialize(int q) {
n=q;
}
int hasEdge(int u, int v) {
cnt+=!a[u]+!a[v];
int ans=0;
if(!b && cnt==n) {
b=1;
if(!a[u] && !a[v]) ans=1;
else ans=0;
}
else if(cnt<n) ans=1;
a[u]=a[v]=1;
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |