Submission #805238

# Submission time Handle Problem Language Result Execution time Memory
805238 2023-08-03T14:21:25 Z QwertyPi Hotter Colder (IOI10_hottercolder) C++14
77 / 100
479 ms 24396 KB
#pragma once

int Guess(int x);

int HC(int N){
	int L = 1, R = N;
	while(L != R){
		Guess(L); int g = Guess(R);
		if(g == 1){
			L = (L + R) / 2 + 1;
		}else if(g == -1){
			R = (L + R - 1) / 2;
		}else{
			L = R = (L + R) / 2;
		}
	}
	return L;
}

Compilation message

hottercolder.cpp:1:9: warning: #pragma once in main file
    1 | #pragma once
      |         ^~~~
# Verdict Execution time Memory Grader output
1 Correct 17 ms 1236 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 19 ms 1280 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 18 ms 1276 KB Output is correct
# Verdict Execution time Memory Grader output
1 Partially correct 479 ms 24396 KB Output is partially correct - alpha = 0.068965517241