# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1157569 | ocasu | Carnival (CEOI14_carnival) | C++20 | 7 ms | 408 KiB |
#include <bits/stdc++.h>
using namespace std;
#define int long long
int ask(int i, int j){
cout<<j-i+1<<' ';
for (int x=i; x<=j; x++) {
cout<<x;
if (x<j) cout<<' ';
}
cout<<endl;
int ans; cin>>ans;
return ans;
}
signed main(){
int n; cin>>n;
vector<int> col(n+1,0);
int cur=0;
for (int i=1; i<n; i++){
int a = i+1, b = n;
while (a != b) {
int mid = (a+b)/2;
int que=ask(i,mid);
if (que==ask(i+1,mid)) {
b = mid;
}
else {
a = mid+1;
# | 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... |