# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1074489 | DeathIsAwe | Hotter Colder (IOI10_hottercolder) | C++17 | 321 ms | 140800 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "grader.h"
#include <bits/stdc++.h>
using namespace std;
int ans = -1;
void destroy(int top, int bottom, int previous) {
cout << top << ' ' << bottom << ' ' << previous << '\n';
if (top - bottom == 0) {
ans = top;
return;
} else if (top - bottom == 1) {
int sussy;
if (previous == -1) {
Guess(top); sussy = Guess(bottom);
} else if (previous == top) {
sussy = Guess(bottom);
} else {
sussy = -Guess(top);
}
if (sussy == 1) {
ans = bottom;
} else {
ans = top;
}
return;
}
int mid = (top + bottom) / 2;
int midleft = (bottom + mid) / 2;
int midright = (mid + 1 + top) / 2;
if (previous == -1) {
int midleftans = Guess(midleft), midrightans = Guess(midright);
if (midrightans == 0) {
ans = (midleft + midright) / 2;
} else if (midrightans == 1) {
destroy(top, mid + 1, -1);
} else {
destroy(mid, bottom, -1);
}
}
}
int HC(int n){
return 0;
destroy(n, 1, -1);
cout << ans << '\n';
return ans;
}
컴파일 시 표준 에러 (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... |