Problem: This is an interactive problem!
salyg1n gave Alice a set of distinct integers (). Alice decided to play a game with this set against Bob. The rules of the game are as follows:
- Players take turns, with Alice going first.
- In one move, Alice adds one number () to the set . The set must not contain the number at the time of the move.
- In one move, Bob removes one number from the set . The set must contain the number at the time of the move. Additionally, the number must be strictly smaller than the last number added by Alice.
- The game ends when Bob cannot make a move or after moves (in which case Alice's move will be the last one).
- The result of the game is ( at the end of the game).
- Alice aims to maximize the result, while Bob aims to minimize it.
Let be the result when both players play optimally. In this problem, you play as Alice against the jury program playing as Bob. Your task is to implement a strategy for Alice such that the result of the game is always at least .
of a set of integers is defined as the smallest non-negative integer which does not occur in the set . For example, .
Input Format: The first line contains an integer () - the number of test cases.
Note: In the first test case, the set changed as follows:
{} {} {} {} {} {}. In the end of the game, , .
In the second test case, the set changed as follows:
{} {} {} {}. In the end of the game, , .
In the third test case, the set changed as follows:
{} {}. In the end of the game, , .