Submission #548856

#TimeUsernameProblemLanguageResultExecution timeMemory
548856Trisanu_DasHotter Colder (IOI10_hottercolder)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
#include "grader.h"
using namespace std;
 
int HC(int n){
  int l = 1, r = n;
  while(l < r){
    int mid = (l + r) / 2;
    Guess(l);
    try_ = Guess(r);
    if(try_ == 0) return mid;
    else if(try_ == 1) l++;
    else r--;
  }
}

Compilation message (stderr)

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:10:5: error: 'try_' was not declared in this scope
   10 |     try_ = Guess(r);
      |     ^~~~
hottercolder.cpp:15:1: warning: control reaches end of non-void function [-Wreturn-type]
   15 | }
      | ^