| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1289380 | aren_dance | Hotter Colder (IOI10_hottercolder) | C++20 | 0 ms | 0 KiB |
#include <bits/stdc++.h>
#include "grader.h"
using namespace std;
int HC(int N){
int g = Guess(N/2);
int h = Guess(N/2-1);
int l=1;
int r=N;
if(h==1){
r=N/2-1;
}
else{
l=N/2-1;
}
int last=N2/-1;
int answ=N/2;
while(l<r){
int m=(l+r)/2;
int x=Guess(1);
answ=m;
if(x==1){
if(last<=m){
l=m;
}
else{
r=m;
}
}
else{
if(last<=m){
r=m;
}
else{
l=m;
}
}
last=m;
}
return l;
}
