제출 #1017855

#제출 시각아이디문제언어결과실행 시간메모리
1017855socpiteHotter Colder (IOI10_hottercolder)C++14
52.78 / 100
421 ms24676 KiB
#include "grader.h" #include <bits/stdc++.h> using namespace std; mt19937 rng(69420); int HC(int N){ int l = 1, r = N; int prv = (rng()&1 ? l : r); Guess(prv); while(l < r){ int tmp = Guess(prv^l^r); if(tmp == 0)return (r+l)/2; if(prv == r)tmp*=-1; if(tmp == -1){ r = (r+l-1)/2; if(prv == l)Guess(l); prv = l; } else { l = (r+l)/2 + 1; if(prv == r)Guess(r); prv = r; } } 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...