This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
/* fucking change this 2020 */
#include <cstdio>
#include <vector>
#include <algorithm>
#include <cstring>
#include <cstdlib>
#include <set>
#include <map>
#include <random>
#define ll int
#define MAX 1501
using namespace std;
ll vals[MAX];
void initialize(ll n) {
for (ll i = 1; i <= n; ++i) vals[i] = n - 1;
}
ll hasEdge(ll u, ll v) {
if (!vals[u] || !vals[v]) {
if (vals[u]) --vals[u];
else --vals[v];
return 1;
} else {
--vals[v];
--vals[u];
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... |