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 <bits/stdc++.h>
#define fi first
#define se second
using namespace std;
int cnt = 0, other = 0, N;
pair<int, int> edge1;
void initialize(int n) {
N = n;
}
int hasEdge(int u, int v) {
++cnt;
if (cnt == 1) {
edge1 = {u, v};
return 1;
}
if (u != edge1.fi && u != edge1.se && v != edge1.fi && v != edge1.se) return 1;
++other;
if (other == 4) 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... |