Submission #1331093

#TimeUsernameProblemLanguageResultExecution timeMemory
1331093hectormedranoHotter Colder (IOI10_hottercolder)C++20
0 / 100
413 ms208744 KiB
#include <bits/stdc++.h>
#include "grader.h"
//#include "hottercolder.h"
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
using namespace std;
typedef long long ll;

int HC(int N){
    ll L, R, p;
    L = 1;
    R = N+1;
    p = N/2;
    ll w = Guess(N/2);
    bool b = true;
    while(R != L+1){
        ll M = (L+R)/2;
        if(p > 2*M){
            Guess(M+1);
            p = M+1;
        }
        ll x = Guess(2*M - p);
        if(x==0){return M;}
        if(b xor (x==-1)){
            R = M;
            b = true;
        } else {
            L = M;
            b = false;
        }
    }
   return L;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...