Submission #119615

#TimeUsernameProblemLanguageResultExecution timeMemory
119615DodgeBallManHotter Colder (IOI10_hottercolder)C++14
0 / 100
676 ms140428 KiB
#include "grader.h" #include <bits/stdc++.h> using namespace std; int HC( int n ){ Guess( 1 ); int l = 1, r = n, prev = 1; while( l < r ) { int now = Guess( r ); if( now == 0 ) return ( r + prev ) / 2; else if( now == 1 ) { int mid = ( l + r ) / 2; if( ( l + r ) % 2 ) mid++; prev = r, l = mid; } else { int mid = ( l + r ) / 2; if( ( l + r ) % 2 == 0 ) mid--; prev = l, r = mid; } } return l; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...