Submission #71692

#TimeUsernameProblemLanguageResultExecution timeMemory
71692the_general (#119)The Ant Doing Hard Work (FXCUP3_ant)C++98
6 / 100
3 ms492 KiB
#include "ant.h" int FindK() { int i=1,l=0,r=0; while(i<100000000){ if(DeliverCount(i)==0){ i*=2; } else break; } l=i/2; r=((i>=100000000)?100000000:i); while(l<r-1){ int mid=(l+r)/2; if(DeliverCount(mid)==0){ l=mid; } else r=mid; } return r; }
#Verdict Execution timeMemoryGrader output
Fetching results...