Ticket 5062
Problem 1665 -e
Submission 153054420
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
676 326 172 741 717 855 647 331 
7
3 5
2 3
2 7
1 6
1 6
1 6
1 7
5
531 972 512 146 797 
6
1 4
2 3
1 3
1 4
3 4
3 4
Expected Output
749
494
494
494
494
494
494
531
972
531
531
658
658
Your Output
749
494
494
494
494
494
447
531
972
531
531
658
658
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