#include "grader.h"
#include <iostream>
int cautbin(int from, int to) {
  //std::cerr << from << ' ' << to << '\n';
  if(from == to) {
    return from;
  }else {
    int mid = (from + to) / 2; 
    int aux = Guess(from), real = Guess(to);
    if(real == 0) {
      return mid;
    }else {
      int len = (to - from + 1); 
      if(len % 2 == 0) {
	if(real == -1) {
          return cautbin(from, mid);
        }else {
	  return cautbin(mid+1, to);
	}
      }else {
	if(real == -1) {
	  return cautbin(from, mid-1);
	} else {
	  return cautbin(mid+1, to);
	}
      }
    }
  }
}
int HC(int N){ 
  //std::cerr << 1 << ' ' << N << '\n';
  return cautbin(1, N);
}
| # | 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... |