# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1012399 | huutuan | Hotter Colder (IOI10_hottercolder) | C++14 | 640 ms | 8240 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "grader.h"
#include <bits/stdc++.h>
using namespace std;
mt19937 rng(69420);
int HC(int N){
int l=1, r=N;
int cnt=0;
int lst=0;
while (l<=r){
int mid=(l+r)>>1;
if (l==r) return mid;
int t=0;
if (lst==l){
t=Guess(r); lst=r;
}else if (lst==r){
t=-Guess(l); lst=l;
}else if (uniform_int_distribution<int>(0, 1)(rng)){
Guess(l);
t=Guess(r);
lst=r;
}else{
Guess(r);
t=-Guess(l);
lst=l;
}
if (!t) return mid;
if (t==1) l=mid+1;
else r=mid;
}
return -1;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |