#include <bits/stdc++.h>
using namespace std;
bool check(int t){
cout<<"? "<<t<<endl;
int h;
cin>>h;
return h<1;
}
int main(){
int x=-1;
for(int b=1e9+9;b>=1;b/=2)
while(check(x+b))x+=b;
cout<<"= "<<x;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
256 KB |
Integer parameter [name=k] equals to 1000000008, violates the range [1, 5] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
256 KB |
Integer parameter [name=k] equals to 1000000008, violates the range [1, 5] |
2 |
Halted |
0 ms |
0 KB |
- |