CF1349B Orac and Medians

Description

Slime has a sequence of positive integers $ a_1, a_2, \ldots, a_n $ . In one operation Orac can choose an arbitrary subsegment $ [l \ldots r] $ of this sequence and replace all values $ a_l, a_{l + 1}, \ldots, a_r $ to the value of median of $ \{a_l, a_{l + 1}, \ldots, a_r\} $ . In this problem, for the integer multiset $ s $ , the median of $ s $ is equal to the $ \lfloor \frac{|s|+1}{2}\rfloor $ -th smallest number in it. For example, the median of $ \{1,4,4,6,5\} $ is $ 4 $ , and the median of $ \{1,7,5,8\} $ is $ 5 $ . Slime wants Orac to make $ a_1 = a_2 = \ldots = a_n = k $ using these operations. Orac thinks that it is impossible, and he does not want to waste his time, so he decided to ask you if it is possible to satisfy the Slime's requirement, he may ask you these questions several times.

Input Format

N/A

Output Format

N/A

Explanation/Hint

In the first query, Orac can't turn all elements into $ 3 $ . In the second query, $ a_1=6 $ is already satisfied. In the third query, Orac can select the complete array and turn all elements into $ 2 $ . In the fourth query, Orac can't turn all elements into $ 3 $ . In the fifth query, Orac can select $ [1,6] $ at first and then select $ [2,10] $ .