Submission #270738

# Submission time Handle Problem Language Result Execution time Memory
270738 2020-08-18T01:40:21 Z TMJN Hotter Colder (IOI10_hottercolder) C++17
0 / 100
763 ms 156896 KB
#include "grader.h"

int HC(int N){
	int L=1;
	int R=N-1;
	bool f=false;
	Guess(1);
	while(L!=R){
		if(f){
			int t=Guess(L);
			if(t>0){
				L=(L+R+1)/2;
			}
			if(t==0)return (L+R)/2;
			if(t<0){
				R=(L+R-1)/2;
			}
		}
		else{
			int t=Guess(R);
			if(t>0){
				R=(L+R-1)/2;
			}
			if(t==0)return (L+R)/2;
			if(t<0){
				L=(L+R+1)/2;
			}
		}
	}
	return L;
}
# Verdict Execution time Memory Grader output
1 Incorrect 44 ms 17912 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 42 ms 17912 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 44 ms 17832 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 763 ms 156896 KB Output isn't correct - alpha = 0.000000000000