This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#define _CRT_SECURE_NO_WARNINGS
#include "game.h"
#include<bits/stdc++.h>
using namespace std;
int r, cur;
vector<int>cnt;
void initialize(int n) {
cnt.resize(n, n - 1);
r = n * (n - 1) / 2;
cur = n - 1;
}
int hasEdge(int u, int v) {
cnt[u]--, cnt[v]--, r--;
if (!cnt[u] || !cnt[v] || r < cur) {
cur--;
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... |