Ticket 15786
Problem 1705 -e
View hacks & all small testcases

Unable to dry run this testcase?
Try making a new request with small values of n_high, t_high, *_high, etc.


Retry
Input
3 9
7 9 9 
2 5
3 1
1 8
2 4
1 8
3 7
1 5
3 1
1 8
Expected Output
9
7
8
8
8
8
7
5
8
Generator Parameters
--l_high 9 --l_low 1 --n_high 9 --n_low 2 --q_high 9 --q_low 1 --val_high 9 --val_low 1