#include "minerals.h"
#include <bits/stdc++.h>
using namespace std;
void Solve (int N) {
vector<int> used(N * 2 + 1, 0);
for (int i = 1;i <= N * 2;i ++) if (used[i] == 0) {
Query (i);
for (int j = i + 1;j <= N * 2;j ++) if (used[j] == 0) {
int tmp = Query (j);
Query (j);
if (tmp != 2) {
// cerr << i << " " << j << "\n";
Answer (i, j);
used[j] = 1;
break;
}
}
Query(i);
used[i] = 1;
}
}
/*
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6
*/
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |