#include "chameleon.h"
#include <bits/stdc++.h>
using namespace std;
#define ll int
#define vll vector<ll>
namespace {
int variable_example = 1;
} // namespace
void Solve(int n) {
vll p(2);
vll found(2 * n, false);
for (ll i = 0; i < 2 * n; ++i) {
for (ll j = 0 ; j < 2 * n; ++j) {
// cout << i + 1 << " " << j + 1 << " " << Query(p) << endl;
if (found[i] || (i==j) || found[j])
continue;
p[0] = i + 1, p[1] = j + 1;
if (Query(p) == 1) {
// cout<<i+1<<" "<<j+1<<" "<<Query(p)<<endl;
found[i] = found[j] = 1;
Answer(i + 1, j + 1);
}
}
}
}
# | 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... |