# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
73636 | top34051 | Hotter Colder (IOI10_hottercolder) | C++17 | 10023 ms | 8184 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "grader.h"
#include<bits/stdc++.h>
using namespace std;
int n,rev;
int kuy(int x) {
if(!rev) return x;
return n-x+1;
}
int small(int l, int r, int a) {
Guess(kuy(l));
int res=Guess(kuy(r));
// printf("res = %d\n",res);
if (res==0) return (l+r)/2;
if (res==1) return r;
return l;
}
int solve(int l, int r, int a) {
// printf("solve [%d, %d] : %d [%d, %d]\n",kuy(l),kuy(r),a,l,r);
if(l==r) return l;
if(a==l) {
if(r-l+1<=3) {
int tmp = Guess(kuy(r));
if(tmp==0) return l+1;
else if(tmp==1) return r;
else return l;
}
# | 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... |