Ticket 3018
Problem 1658 -d2
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
2
1 2
4 7 
1 3
10 11 8 
Expected Output
5
9
Generator Parameters
--l_cap 131071 --l_high 5 --l_low 0 --r_cap 131071 --r_high 5 --r_low 0 --t_cap 100000 --t_high 2 --t_low 1 --x_cap 4096 --x_high 10 --x_low 0