Submission #231090

#TimeUsernameProblemLanguageResultExecution timeMemory
231090Dilshod_ImomovHotter Colder (IOI10_hottercolder)C++17
25 / 100
749 ms8184 KiB
#include "grader.h"
#include <bits/stdc++.h>
using namespace std;
int HC(int N){
	if ( N == 1 ) {
		return 1;
	}
	int l = 1, r = N;
	while ( r - l > 1 ) {
		int md = (l + r) / 2;
		Guess((l + md) / 2);
		int y = Guess((md + r) / 2);
		if ( y == 1 ) {
			l = md;
		}
		else if ( y == -1 ) {
			r = md;
		}
		else {
			return md;
		}
	}
	Guess(l);
	if ( Guess(r) == 1 ) {
		return r;
	}
	else {
		return l;
	}
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...