#include <bits/stdc++.h>
#include "grader.h"
using namespace std;
int n;
int ask(const vector<int> &q) {
int x = query(q);
if (x == n) {
// cout << queries << '\n';
exit(0);
}
return x;
}
void solve(int n) {
::n = n;
vector<int> a(n);
iota(a.begin(), a.end(), 1);
do {
ask(a);
} while (next_permutation(a.begin(), a.end()));
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
18 ms |
344 KB |
Correct! Number of queries: 3487 |
2 |
Correct |
1 ms |
344 KB |
Correct! Number of queries: 18 |
3 |
Correct |
2 ms |
344 KB |
Correct! Number of queries: 328 |
4 |
Correct |
18 ms |
344 KB |
Correct! Number of queries: 3528 |
5 |
Correct |
28 ms |
344 KB |
Correct! Number of queries: 4783 |
6 |
Correct |
1 ms |
344 KB |
Correct! Number of queries: 88 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
18 ms |
344 KB |
Correct! Number of queries: 3487 |
2 |
Correct |
1 ms |
344 KB |
Correct! Number of queries: 18 |
3 |
Correct |
2 ms |
344 KB |
Correct! Number of queries: 328 |
4 |
Correct |
18 ms |
344 KB |
Correct! Number of queries: 3528 |
5 |
Correct |
28 ms |
344 KB |
Correct! Number of queries: 4783 |
6 |
Correct |
1 ms |
344 KB |
Correct! Number of queries: 88 |
7 |
Runtime error |
88 ms |
412 KB |
Execution killed with signal 13 |
8 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
18 ms |
344 KB |
Correct! Number of queries: 3487 |
2 |
Correct |
1 ms |
344 KB |
Correct! Number of queries: 18 |
3 |
Correct |
2 ms |
344 KB |
Correct! Number of queries: 328 |
4 |
Correct |
18 ms |
344 KB |
Correct! Number of queries: 3528 |
5 |
Correct |
28 ms |
344 KB |
Correct! Number of queries: 4783 |
6 |
Correct |
1 ms |
344 KB |
Correct! Number of queries: 88 |
7 |
Runtime error |
88 ms |
412 KB |
Execution killed with signal 13 |
8 |
Halted |
0 ms |
0 KB |
- |