Submission #544342

# Submission time Handle Problem Language Result Execution time Memory
544342 2022-04-01T18:47:02 Z ValiAntonie Hotter Colder (IOI10_hottercolder) C++14
Compilation error
0 ms 0 KB
#include "grader.h"
#include<bits/stdc++.h>
using namespace std;

int Guess (int x);

int HC(int n){
int l=1,r=N;
while(l!=r){
	Guess(l);
	int a = Guess(r);
	if(a==-1)
		r = (l+r-1)/2;
	else if(a==1)//close to l
		l = (l+r+1)/2;
	else return (l+r)/2;
}
return l;
}

Compilation message

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:8:11: error: 'N' was not declared in this scope
    8 | int l=1,r=N;
      |           ^