#include "art.h"
#include <bits/stdc++.h>
using namespace std;
void solve(int n) {
vector<int> p(n);
iota(p.begin(), p.end(), 1);
while(1) {
int u = publish(p);
if(!u) {
answer(p);
break;
}
for(int i = 0; i < n; i++) {
for(int j = i + 1; j < n; j++) {
swap(p[i], p[j]);
int k = publish(p);
if(k < u) {
// stay
}
else {
swap(p[i], p[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... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |