# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
73584 | top34051 | Hotter Colder (IOI10_hottercolder) | C++17 | 773 ms | 8312 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;
#define ll long long
ll n,rev;
ll kuy(ll x) {
if(!rev) return x;
return n-x+1;
}
ll small(ll l, ll r, ll a) {
Guess(kuy(l));
ll res=Guess(kuy(r));
// printf("res = %d\n",res);
if (res==0) return (l+r)/2;
if (res==1) return r;
return l;
}
ll solve(ll l, ll r, ll a) {
// printf("solve [%d, %d] : %d [%d, %d]\n",kuy(l),kuy(r),a,l,r);
if(l==r) return l;
if(r-l+1<=3) return small(l,r,a);
if(a==l) {
ll b = (l*2+r)/3;
ll c = (l+2*r)/3;
ll tmp1 = Guess(kuy(b)), tmp2 = Guess(kuy(c));
# | 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... |