답안 #226769

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
226769 2020-04-25T09:52:31 Z jiahng Hotter Colder (IOI10_hottercolder) C++14
컴파일 오류
0 ms 0 KB
//#include "grader.h"
#include <bits/stdc++.h>
typedef long long ll;
int HC(int N){
	ll l = 1, r = N;
	
	if (N == 2){
		Guess(1);
		if (Guess(2) == -1) return 1;
		else return 2;
	}
	
	
	

	while (l < r){
		int mid = (l+r)/2;
		
		Guess(mid);
		//std::cout<<l<<' '<<r<<'\n';
		
		int res = Guess(mid+1);
		
		if (res == -1) r = mid;
		else l = mid+1;
	}
	
	return l;
}

Compilation message

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:8:3: error: 'Guess' was not declared in this scope
   Guess(1);
   ^~~~~
hottercolder.cpp:19:3: error: 'Guess' was not declared in this scope
   Guess(mid);
   ^~~~~