제출 #989890

#제출 시각아이디문제언어결과실행 시간메모리
989890qwerasdfzxclHotter Colder (IOI10_hottercolder)C++17
78.45 / 100
580 ms24400 KiB
#include "grader.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; mt19937 rng(1557); int HC(int N){ int l = 1, r = N, p = -1; while(l<r){ if (p!=l && p!=r){ if (rng()&1) p = l, Guess(l); else p = r, Guess(r); } int ret; if (p==l){ p = r, ret = Guess(r); if (ret==0) return (l+r) / 2; else if (ret==1) l = (l+r) / 2 + 1; else r = (l+r-1) / 2; } else{ p = l, ret = Guess(l); if (ret==0) return (l+r) / 2; else if (ret==-1) l = (l+r) / 2 + 1; else r = (l+r-1) / 2; } } 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...