Submission #102415

# Submission time Handle Problem Language Result Execution time Memory
102415 2019-03-24T19:15:24 Z SpeedOfMagic Hotter Colder (IOI10_hottercolder) C++17
50 / 100
771 ms 8312 KB
#include "grader.h"
#include <bits/stdc++.h>
using namespace std;

int HC(int N){
	int l = 1, r = N;
	while (l < r) {
		int mid = (l + r) >> 1;
		int a = Guess(mid), b = Guess(min(mid + 2, r));
		if (b == -1) 
			r = mid;
		else if (b == 0)
			return mid + 1;
		else
			l = min(mid + 2, r);
	}
	return l;
}

Compilation message

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:9:7: warning: unused variable 'a' [-Wunused-variable]
   int a = Guess(mid), b = Guess(min(mid + 2, r));
       ^
# Verdict Execution time Memory Grader output
1 Correct 28 ms 1272 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 28 ms 1400 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 28 ms 1400 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 771 ms 8312 KB Output isn't correct - alpha = 0.000000000000