#include "library.h"
#include<bits/stdc++.h>
#define pb push_back
using namespace std;
void Solve(int n) {
vector <int> m(n);
m[0] = 1;
int mx = 0, p = 0;
for(int i = 1; i < n; i ++) {
m[i] = 1;
int x;
x = Query(m);
if (x > mx) {
mx = x;
p = i;
}
m[i] = 0;
}
vector < pair < int, int > > res;
m[0] = 0;
//m[p] = 1;
for (int i = 0; i < n; i ++) {
m[p] = 1;
m[i] = 1;
res.pb({Query(m), i+1});
m[p] = 0;
m[i] = 0;
}
sort(res.begin(), res.end());
vector < int > ans;
for (int i = 0; i < n; i ++)
ans.pb(res[i].second);
Answer(ans);
}
// B...a
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
8 ms |
376 KB |
Wrong Answer [8] |
2 |
Incorrect |
9 ms |
248 KB |
Wrong Answer [8] |
3 |
Incorrect |
9 ms |
248 KB |
Wrong Answer [8] |
4 |
Incorrect |
9 ms |
252 KB |
Wrong Answer [8] |
5 |
Incorrect |
9 ms |
376 KB |
Wrong Answer [8] |
6 |
Incorrect |
9 ms |
252 KB |
Wrong Answer [8] |
7 |
Incorrect |
10 ms |
248 KB |
Wrong Answer [8] |
8 |
Incorrect |
9 ms |
248 KB |
Wrong Answer [8] |
9 |
Incorrect |
8 ms |
380 KB |
Wrong Answer [8] |
10 |
Incorrect |
6 ms |
376 KB |
Wrong Answer [8] |
11 |
Correct |
2 ms |
376 KB |
# of queries: 1 |
12 |
Correct |
2 ms |
248 KB |
# of queries: 3 |
13 |
Incorrect |
2 ms |
248 KB |
Wrong Answer [8] |
14 |
Incorrect |
2 ms |
248 KB |
Wrong Answer [8] |
15 |
Incorrect |
2 ms |
376 KB |
Wrong Answer [8] |
16 |
Incorrect |
3 ms |
376 KB |
Wrong Answer [8] |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
8 ms |
376 KB |
Wrong Answer [8] |
2 |
Incorrect |
9 ms |
248 KB |
Wrong Answer [8] |
3 |
Incorrect |
9 ms |
248 KB |
Wrong Answer [8] |
4 |
Incorrect |
9 ms |
252 KB |
Wrong Answer [8] |
5 |
Incorrect |
9 ms |
376 KB |
Wrong Answer [8] |
6 |
Incorrect |
9 ms |
252 KB |
Wrong Answer [8] |
7 |
Incorrect |
10 ms |
248 KB |
Wrong Answer [8] |
8 |
Incorrect |
9 ms |
248 KB |
Wrong Answer [8] |
9 |
Incorrect |
8 ms |
380 KB |
Wrong Answer [8] |
10 |
Incorrect |
6 ms |
376 KB |
Wrong Answer [8] |
11 |
Correct |
2 ms |
376 KB |
# of queries: 1 |
12 |
Correct |
2 ms |
248 KB |
# of queries: 3 |
13 |
Incorrect |
2 ms |
248 KB |
Wrong Answer [8] |
14 |
Incorrect |
2 ms |
248 KB |
Wrong Answer [8] |
15 |
Incorrect |
2 ms |
376 KB |
Wrong Answer [8] |
16 |
Incorrect |
3 ms |
376 KB |
Wrong Answer [8] |
17 |
Incorrect |
59 ms |
248 KB |
Wrong Answer [8] |
18 |
Incorrect |
40 ms |
320 KB |
Wrong Answer [8] |
19 |
Incorrect |
54 ms |
248 KB |
Wrong Answer [8] |
20 |
Incorrect |
37 ms |
320 KB |
Wrong Answer [8] |
21 |
Incorrect |
36 ms |
376 KB |
Wrong Answer [8] |
22 |
Incorrect |
54 ms |
376 KB |
Wrong Answer [8] |
23 |
Incorrect |
40 ms |
316 KB |
Wrong Answer [8] |
24 |
Incorrect |
17 ms |
324 KB |
Wrong Answer [8] |
25 |
Incorrect |
57 ms |
376 KB |
Wrong Answer [8] |
26 |
Incorrect |
36 ms |
400 KB |
Wrong Answer [8] |
27 |
Incorrect |
22 ms |
324 KB |
Wrong Answer [8] |
28 |
Incorrect |
47 ms |
404 KB |
Wrong Answer [8] |
29 |
Incorrect |
53 ms |
248 KB |
Wrong Answer [8] |
30 |
Incorrect |
56 ms |
248 KB |
Wrong Answer [8] |