#include<bits/stdc++.h>
#define int long long
#define mod 1000000007
using namespace std;
vector<int>adj[200001];
int vs[151],fin[151];
signed main(){
int n; cin >> n;
vs[1] = 1; int c = 2, prv = 1;
for(int i = 2; i <= n; i++){
cout << i << ' ';
for(int j = 1; j <= i; j++){
cout << j << ' ';
}
cout << endl;
int ans; cin >> ans;
if(ans > prv) vs[i] = c++;
prv = ans;
}
for(int i = 1; i <= n; i++) fin[i] = vs[i];
for(int i = 2; i <= n; i++){
if(fin[i] == 0){
for(int j = 1; j <= n; j++){
if(vs[j]){
cout << 2 << ' ' << i << ' ' << j << endl;
int ans; cin >> ans;
if(ans == 1){
fin[i] = vs[j];
break;
}
}
}
}
}
cout << 0 << ' ' ;
for(int i = 1; i <= n;i++){
cout << fin[i] << ' ';
}
cout << endl;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
10 ms |
4944 KB |
Output is correct |
2 |
Correct |
13 ms |
4944 KB |
Output is correct |
3 |
Correct |
19 ms |
4944 KB |
Output is correct |
4 |
Correct |
8 ms |
4944 KB |
Output is correct |
5 |
Correct |
6 ms |
4944 KB |
Output is correct |
6 |
Correct |
6 ms |
4944 KB |
Output is correct |
7 |
Correct |
11 ms |
4944 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
10 ms |
4944 KB |
Output is correct |
2 |
Correct |
18 ms |
4944 KB |
Output is correct |
3 |
Correct |
14 ms |
4944 KB |
Output is correct |
4 |
Correct |
10 ms |
4944 KB |
Output is correct |
5 |
Correct |
7 ms |
4944 KB |
Output is correct |
6 |
Correct |
6 ms |
4944 KB |
Output is correct |
7 |
Correct |
11 ms |
4944 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
6 ms |
4944 KB |
Output is correct |
2 |
Correct |
10 ms |
4944 KB |
Output is correct |
3 |
Correct |
24 ms |
4944 KB |
Output is correct |
4 |
Correct |
8 ms |
4944 KB |
Output is correct |
5 |
Correct |
7 ms |
4944 KB |
Output is correct |
6 |
Correct |
9 ms |
4944 KB |
Output is correct |
7 |
Correct |
15 ms |
4944 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
8 ms |
4944 KB |
Output is correct |
2 |
Correct |
12 ms |
4944 KB |
Output is correct |
3 |
Correct |
19 ms |
4944 KB |
Output is correct |
4 |
Correct |
7 ms |
4944 KB |
Output is correct |
5 |
Correct |
7 ms |
4944 KB |
Output is correct |
6 |
Correct |
8 ms |
4944 KB |
Output is correct |
7 |
Correct |
17 ms |
4944 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
7 ms |
4944 KB |
Output is correct |
2 |
Correct |
16 ms |
4944 KB |
Output is correct |
3 |
Correct |
20 ms |
4944 KB |
Output is correct |
4 |
Correct |
19 ms |
4944 KB |
Output is correct |
5 |
Correct |
9 ms |
4944 KB |
Output is correct |
6 |
Correct |
5 ms |
4944 KB |
Output is correct |
7 |
Correct |
11 ms |
4956 KB |
Output is correct |