Submission #255199

#TimeUsernameProblemLanguageResultExecution timeMemory
255199a_playerGuess the number (BOI20_guess)C++14
0 / 100
3051 ms256 KiB
#include <bits/stdc++.h> using namespace std; bool check(int t){ cout<<"? "<<t<<endl; int h; cin>>h; return h<1; } int main(){ int N; cin>>N; int x=-1; for(int b=N;b>=1;b/=2) while(check(x+b))x+=b; cout<<"= "<<x<<endl; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...