#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pll pair<long long, long long>
#define pb push_back
#define F first
#define S second
#define all(x) (x).begin(), (x).end()
const ll N = 2e5 + 100;
const ll inf = 1e18;
const ll mod = 1e9 + 7;
const ll block = 500;
const ll base = 31;
ll n;
ll p[N], a[N];
void to_nho_cau(){
cin >> n;
ll d = 1;
a[1] = 1;
for(int i = 2; i <= n;i++){
ll l = 1, r = i - 1, res = -1;
while(l <= r){
ll mid = (l + r) / 2;
cout << i - mid + 1 << ' ';
for(int j = mid; j <= i;j++) cout << j << ' ';
cout << endl;
ll x; cin >> x;
cout << i - mid << ' ';
for(int j = mid; j <= i - 1;j++) cout << j << ' ';
cout << endl;
ll y; cin >> y;
if(x == y){
res = mid;
l = mid + 1;
}
else r = mid - 1;
}
if(res == -1) a[i] = ++d;
else a[i] = a[res];
}
for(int i = 1; i <= n;i++) cout << a[i] << ' ';
}
signed main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
int t = 1;
//cin >> t;
while(t--) to_nho_cau();
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
7 ms |
344 KB |
Same person came twice to the party. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
10 ms |
344 KB |
Same person came twice to the party. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
6 ms |
344 KB |
Unexpected end of file - int32 expected |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
8 ms |
344 KB |
Same person came twice to the party. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
10 ms |
344 KB |
Same person came twice to the party. |
2 |
Halted |
0 ms |
0 KB |
- |