Submission #255203

#TimeUsernameProblemLanguageResultExecution timeMemory
255203a_playerGuess the number (BOI20_guess)C++14
29 / 100
1 ms384 KiB
#include <bits/stdc++.h> using namespace std; bool check(int t){ cout<<"? "<<t<<endl; int h; cin>>h; if(h==0){ cout<<"= "<<t<<endl; exit(0); } return h<1; } int main(){ int N; cin>>N; int x=0; 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...