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 "island.h"
#include <bits/stdc++.h>
using namespace std;
void solve(int N, int L) {
vector<vector<int>> adj(N+1);
for (int node = 1; node <= N; ++node) {
vector<bool> bad(N+1, false);
for (int k = 1; k <= N-1; ++k) {
int voisin = query(node, k);
if (node < voisin || bad[voisin])
break;
adj[node].push_back(voisin);
adj[voisin].push_back(node);
answer(node, voisin);
for (int voi2 : adj[voisin])
bad[voi2] = true;
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |