Submission #388149

# Submission time Handle Problem Language Result Execution time Memory
388149 2021-04-10T09:36:54 Z Apiram Hotter Colder (IOI10_hottercolder) C++14
Compilation error
0 ms 0 KB
#include "grader.h"
#include<bits/stdc++.h>
using namespace std;

int HC(int N){
	int left= 1,right = N;
	int a;
	while (left<=right){
		int mid = left + (right-left)/2;
		a=Guess(mid);
		a=Guess(mid+1);
		if (a==1)left=mid;
		else {
			a=Guess(mid-1);
			if (a==0)return mid;
			else {
			a=Guess(mid);
			if (a==1)
			left = mid+1;
			else right=mid;
		 
		}
	
	}
	return left;
	}

Compilation message

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:26:2: error: expected '}' at end of input
   26 |  }
      |  ^
hottercolder.cpp:5:14: note: to match this '{'
    5 | int HC(int N){
      |              ^
hottercolder.cpp:26:2: warning: control reaches end of non-void function [-Wreturn-type]
   26 |  }
      |  ^