Submission #56132

# Submission time Handle Problem Language Result Execution time Memory
56132 2018-07-10T05:24:18 Z leejseo Hotter Colder (IOI10_hottercolder) C++
50 / 100
808 ms 8056 KB
#include "grader.h"
#include <stdio.h>
#include <algorithm>
int HC(int N){
	int lo = 1, hi = N;	
	while (lo < hi){
		int left = Guess(lo);
		int right = Guess(hi);
		int mid = (lo + hi) >> 1;
		if (right == 0) return mid;
		if (right == 1) lo = mid+1;
		else hi = mid;
	}	
	return lo;
}

Compilation message

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:7:7: warning: unused variable 'left' [-Wunused-variable]
   int left = Guess(lo);
       ^~~~
# Verdict Execution time Memory Grader output
1 Correct 34 ms 1272 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 28 ms 1272 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 28 ms 1276 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 808 ms 8056 KB Output isn't correct - alpha = 0.000000000000