#include "grader.h"
#include <algorithm>
#include <vector>
using namespace std;
void solve(int N) {
vector<int> a;
for (int i = 1; i <= N; ++i) a.push_back(i);
while (true) {
if (query(a) == N) return;
next_permutation(a.begin(), a.end());
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
46 ms |
256 KB |
Correct! Number of queries: 3487 |
2 |
Correct |
5 ms |
256 KB |
Correct! Number of queries: 18 |
3 |
Correct |
6 ms |
256 KB |
Correct! Number of queries: 328 |
4 |
Correct |
39 ms |
384 KB |
Correct! Number of queries: 3528 |
5 |
Correct |
49 ms |
384 KB |
Correct! Number of queries: 4783 |
6 |
Correct |
5 ms |
384 KB |
Correct! Number of queries: 88 |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
46 ms |
256 KB |
Correct! Number of queries: 3487 |
2 |
Correct |
5 ms |
256 KB |
Correct! Number of queries: 18 |
3 |
Correct |
6 ms |
256 KB |
Correct! Number of queries: 328 |
4 |
Correct |
39 ms |
384 KB |
Correct! Number of queries: 3528 |
5 |
Correct |
49 ms |
384 KB |
Correct! Number of queries: 4783 |
6 |
Correct |
5 ms |
384 KB |
Correct! Number of queries: 88 |
7 |
Execution timed out |
3013 ms |
256 KB |
Time limit exceeded |
8 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
46 ms |
256 KB |
Correct! Number of queries: 3487 |
2 |
Correct |
5 ms |
256 KB |
Correct! Number of queries: 18 |
3 |
Correct |
6 ms |
256 KB |
Correct! Number of queries: 328 |
4 |
Correct |
39 ms |
384 KB |
Correct! Number of queries: 3528 |
5 |
Correct |
49 ms |
384 KB |
Correct! Number of queries: 4783 |
6 |
Correct |
5 ms |
384 KB |
Correct! Number of queries: 88 |
7 |
Execution timed out |
3013 ms |
256 KB |
Time limit exceeded |
8 |
Halted |
0 ms |
0 KB |
- |