답안 #411691

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
411691 2021-05-25T18:10:29 Z faresbasbs Hotter Colder (IOI10_hottercolder) C++14
50 / 100
621 ms 24400 KB
#include <bits/stdc++.h>
#include "grader.h"
using namespace std;

int g(int val){
	return Guess(val);
}

int HC(int n){
	int l = 0 , r = n , last = -1;
	while(r-l > 1){
		int mid = (l+r+1)/2 , a = g(l+1) , b = g(r);
		if(a == b && a == 0){
			return mid;
		}
		if(b == 1){
			l = mid;
		}else{
			r = mid;
		}
	}
	return r;
}

Compilation message

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:10:22: warning: unused variable 'last' [-Wunused-variable]
   10 |  int l = 0 , r = n , last = -1;
      |                      ^~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 23 ms 1296 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 23 ms 1292 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 24 ms 1228 KB Output isn't correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 621 ms 24400 KB Output isn't correct - alpha = 0.000000000000