This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |