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 = 1500;
int num_no[N+1], total_no = 0, sz;
void initialize(int n) {
sz = n;
}
int hasEdge(int u, int v) {
bool yes = num_no[u] == sz - 2 or num_no[v] == sz - 2 or total_no == sz * (sz - 1) / 2 - (sz - 1);
num_no[u] += not yes;
num_no[v] += not yes;
total_no += not yes;
return yes;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |