#include "bits/stdc++.h"
using namespace std;
using ll = long long;
const int maxn=200;
int n;
int a[maxn];
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
cin >> n;
a[1] = 1;
int now = 1;
for(int i = 2;i <= n;i++){
int l = 1,r = i - 1,md,jog=-1;
while(l <= r){
md = (l + r) >> 1;
set<int>s;
vector<int>quer;
for(int j = md;j < i;j++){
s.insert(a[j]);
quer.push_back(j);
}
quer.push_back(i);
cout<<(int)quer.size()<<' ';
for(auto i : quer) cout<<i<<' ';
cout<<endl;
int jg; cin >> jg;
if(jg > (int)s.size()) r = md - 1;
else jog = a[md],l=md+1;
}
if(jog == -1) a[i] = ++now;
else a[i] = jog;
}
for(int i = 1;i <= n;i++) cout<<a[i]<<' ';
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
9 ms |
208 KB |
Same person came twice to the party. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
9 ms |
208 KB |
Same person came twice to the party. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
10 ms |
208 KB |
Unexpected end of file - int32 expected |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
10 ms |
208 KB |
Same person came twice to the party. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
9 ms |
208 KB |
Same person came twice to the party. |
2 |
Halted |
0 ms |
0 KB |
- |