#include <bits/stdc++.h>
// mrrrow mnyaa ;3c
// go play vivid/stasis! it's a really awesome free game on steam
using namespace std;
int usedc[1500];
bool used[1500];
int n;
void initialize(int N) {
n = N;
for (int i = 0; i < n; i++) usedc[i] = 0, used[i] = false;
}
int hasEdge(int u, int v) {
usedc[u]++, usedc[v]++;
if (usedc[u] == n - 1 || usedc[v] == n - 1 && (!used[u] || !used[v])) {
used[u] = true;
used[v] = true;
return true;
} else {
return false;
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |