#include "grader.h"
#include "bits/stdc++.h"
using namespace std;
void solve(int n) {
vector <int> q;
for (int i = 1; i <= n; i ++) q.push_back(i);
int cnt = query(q);
for (int i = 0; i < n; i ++) {
for (int j = 0; j < n; j ++) {
if (i == j) continue;
swap(q[i], q[j]);
int c = query(q);
if (c == n) return;
if (c > cnt) continue;
else swap(q[i], q[j]);
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |