Submission #41062

# Submission time Handle Problem Language Result Execution time Memory
41062 2018-02-12T09:00:45 Z meylady Hotter Colder (IOI10_hottercolder) C++14
50 / 100
805 ms 8196 KB
#include "grader.h"


int HC(int N){
	int left = 1;
	int right = N;
	int mid = (left + right) / 2;

	while (left < right) {
	
		int query1 = Guess(left);
		int query2 = Guess(right);
		mid = (left + right) / 2;

		if (query2 == 0)return mid;
		if (query2 == 1) {//hotter
			left = mid+1;
		}
		else {//colder
			right = mid;
		}
		
	}
	return left;

}

Compilation message

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:11:7: warning: unused variable 'query1' [-Wunused-variable]
   int query1 = Guess(left);
       ^~~~~~
# Verdict Execution time Memory Grader output
1 Correct 35 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 33 ms 1272 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 805 ms 8196 KB Output isn't correct - alpha = 0.000000000000