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>
using namespace std;
int a[155], b[155];
int main()
{
int n, cnt=1;
cin >> n;
for (int i=1; i<=n; i++)
{
int l=1, r=cnt;
while (l<r)
{
int mid=(l+r)/2, res;
cout << mid-l+2 << ' ' << i << ' ';
for (int j=l; j<=mid; j++)
cout << b[j] << ' ';
cout << '\n';
fflush(stdout);
cin >> res;
if (res==mid-l+1)
r=mid;
else
l=mid+1;
}
a[i]=l;
if (l==cnt)
{
b[cnt]=i;
cnt++;
}
}
cout << 0 << ' ';
for (int i=1; i<=n; i++)
cout << a[i] << ' ';
fflush(stdout);
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... |