#include "bits/stdc++.h"
#include "icc.h"
#define sz(x) (int)size(x)
#define all(x) begin(x), end(x)
#define rall(x) rbegin(x), rend(x)
using namespace std;
using ll = long long;
using pii = pair<int, int>;
const char nl = '\n';
const int INF = 0x3f3f3f3f;
const ll LINF = 0x3f3f3f3f3f3f3f3f;
const int N = 1000;
int a[N + 1], b[N + 1];
void run(int n) {
vector edge(n + 1, vector<bool>(n + 1));
for (int _ = 0; _ < n - 1; _++) {
for (int i = 1; i <= n; i++)
for (int j = i + 1; j <= n; j++) {
if (edge[i][j]) continue;
a[0] = i;
b[0] = j;
if (query(1, 1, a, b) == 1) {
setRoad(i, j);
edge[i][j] = true;
goto NEXT;
}
}
NEXT:;
}
}
| # | 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... |