Consider a hidden vector with integer numbers in strictly increasing order. Given an integer that belongs to , you will play a game to guess the position where . You have to use a “black box” , with parameters and a position inside . If there is a such that , you win the game. Otherwise, will tell you whether or .
Given , what is the minimum number of calls to to win the game?
Input consists of several cases, each one with an between 1 and .
For every , print the worst-case number of calls to to win the game, assuming a strategy that minimizes that worst-case cost.
Author: Salvador Roura
Generation: 2026-01-25T11:06:03.181Z
© Jutge.org, 2006–2026.
https://jutge.org