Submission #548928

#TimeUsernameProblemLanguageResultExecution timeMemory
548928HanksburgerCarnival (CEOI14_carnival)C++17
100 / 100
11 ms208 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...