Ticket 4585
Problem 1665 -e
Submission 153349160
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
9
540 394 137 167 451 409 897 589 91 
8
2 7
5 8
4 5
3 7
2 7
5 8
5 8
1 9
5
197 993 929 386 877 
6
1 2
2 5
1 4
1 3
3 4
2 3
Expected Output
175
475
487
175
175
475
475
175
997
931
455
993
931
993
Your Output
175
475
487
175
175
475
475
175
997
1007
455
997
931
993
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