Ticket 4810
Problem 1665 -e
Submission 153465278
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
8
287 914 432 565 622 197 978 329 
4
1 3
2 5
2 4
3 8
4
471 526 743 301 
6
3 4
1 3
2 3
3 4
1 2
2 4
Expected Output
447
639
946
461
1007
751
751
1007
991
751
Your Output
447
946
946
461
1007
751
751
1007
991
751
Difference
Generator Parameters
--n_high 9 --n_low 2 --q_high 9 --q_low 1 --t_high 2 --t_low 1 --val_high 1023 --val_low 0