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<cstdio>
int w[1501],m,t;
void initialize(int n)
{
m=n;
}
int hasEdge(int u,int v)
{
if(t>=m*(m-1)/2-m+1)
{
return 1;
}
if(w[u]>=m-2||w[v]>=m-2)
{
w[u]++;
w[v]++;
t++;
return 1;
}
else
{
w[u]++;
w[v]++;
t++;
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... |