#include <bits/stdc++.h>
using namespace std;
#include "grader.h"
void solve(int n){
int perm[n];
for(int i=0; i<n; i++) perm[i]=i+1;
do{
vector<int> v;
for(int i=0; i<n; i++) v.push_back(perm[i]);
int x=query(v);
if(x==n) return;
} while(next_permutation(perm,perm+n));
}
# |
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 |
20 ms |
344 KB |
Correct! Number of queries: 3528 |
5 |
Correct |
21 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 |
20 ms |
344 KB |
Correct! Number of queries: 3528 |
5 |
Correct |
21 ms |
344 KB |
Correct! Number of queries: 4783 |
6 |
Correct |
1 ms |
344 KB |
Correct! Number of queries: 88 |
7 |
Runtime error |
81 ms |
408 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 |
20 ms |
344 KB |
Correct! Number of queries: 3528 |
5 |
Correct |
21 ms |
344 KB |
Correct! Number of queries: 4783 |
6 |
Correct |
1 ms |
344 KB |
Correct! Number of queries: 88 |
7 |
Runtime error |
81 ms |
408 KB |
Execution killed with signal 13 |
8 |
Halted |
0 ms |
0 KB |
- |