Submission #71241

# Submission time Handle Problem Language Result Execution time Memory
71241 2018-08-24T08:43:28 Z chhun Hotter Colder (IOI10_hottercolder) C++14
50 / 100
795 ms 8184 KB
#include <stdio.h>
#include "grader.h"
int g1;
int g2;
int n;
int HC_(int l, int r) {
	if (r <= l) {
		return l;
	}
	g1 = Guess(l);
	g2 = Guess(r);
	if (g2 == 0)
		return (l + r) / 2;
	else if (g2 == 1) {
		return HC_((r + l) / 2 + 1, r);
	}
	else if (g2 == -1) {
		return HC_(l, (l + r) / 2);
	}
}
int HC(int N) {
	return HC_(1, N);
}

Compilation message

hottercolder.cpp: In function 'int HC_(int, int)':
hottercolder.cpp:20:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
# Verdict Execution time Memory Grader output
1 Correct 27 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 30 ms 1272 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 795 ms 8184 KB Output isn't correct - alpha = 0.000000000000