Submission #805236

# Submission time Handle Problem Language Result Execution time Memory
805236 2023-08-03T14:21:01 Z QwertyPi Hotter Colder (IOI10_hottercolder) C++14
Compilation error
0 ms 0 KB
#pragma once

int HC(int N){
	int L = 1, R = N;
	while(L != R){
		Guess(L); int g = Guess(R);
		if(g == 1){
			L = (L + R) / 2 + 1;
		}else if(g == -1){
			R = (L + R - 1) / 2;
		}else{
			L = R = (L + R) / 2;
		}
	}
	return L;
}

Compilation message

hottercolder.cpp:1:9: warning: #pragma once in main file
    1 | #pragma once
      |         ^~~~
hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:6:3: error: 'Guess' was not declared in this scope
    6 |   Guess(L); int g = Guess(R);
      |   ^~~~~