# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
858653 |
2023-10-09T04:12:05 Z |
maks007 |
Colors (BOI20_colors) |
C++14 |
|
1 ms |
340 KB |
#include "bits/stdc++.h"
using namespace std;
#define int long long
signed main () {
int n;
cin >> n;
int l = 1, r = n+1, f = 1;
cout << "? " << 1 << endl;
int x;
cin >> x;
if(n > 64) {
return 0;
}
while(1) {
if(l==r)break;
if(f == 1) {
r --;
cout << "? " << r << endl;
cin >> x;
if(x == 0) {
assert(r-l<n);
cout << r-l+1 << endl;
return 0;
}
f = -1;
}else {
l ++;
cout << "? " << l << endl;
cin >> x;
if(x == 0) {
assert(r-l<n);
cout << r-l+1 << endl;
return 0;
}
f=1;
}
}
cout << "= 0" << endl;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
340 KB |
Token parameter [name=cmd] equals to "4", doesn't correspond to pattern "[?=]" |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
340 KB |
Token parameter [name=cmd] equals to "4", doesn't correspond to pattern "[?=]" |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
340 KB |
Token parameter [name=cmd] equals to "4", doesn't correspond to pattern "[?=]" |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
340 KB |
Token parameter [name=cmd] equals to "4", doesn't correspond to pattern "[?=]" |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
340 KB |
Token parameter [name=cmd] equals to "4", doesn't correspond to pattern "[?=]" |
2 |
Halted |
0 ms |
0 KB |
- |