제출 #895827

#제출 시각아이디문제언어결과실행 시간메모리
895827MackerHotter Colder (IOI10_hottercolder)C++17
75 / 100
422 ms8016 KiB
#include <bits/stdc++.h> #include "grader.h" using namespace std; int HC(int N){ int l = 1, r = N, mid; int ask = max(N / 2 - 1, 1); Guess(ask); while(l < r){ int nask = min(max(l + r - ask, 1), N); if(nask == ask) nask++; if(nask > N) nask -= 2; mid = (ask + nask) / 2; int g = Guess(nask); if(ask > nask) g = -g; if(g == 1) l = mid + 1; else if(g == -1) r = mid; else return (ask + nask) / 2; ask = nask; } 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...