Ticket 4136
Problem 1665 -e
Submission 153129989
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
1
5
722 613 388 110 1012 
8
1 3
1 4
3 5
3 4
1 2
4 5
1 3
4 5
Expected Output
759
494
494
494
759
1022
759
1022
Your Output
759
623
494
494
759
1022
759
1022
Difference
Generator Parameters
--n_high 5 --n_low 2 --q_high 9 --q_low 1 --t_high 1 --t_low 1 --val_high 1023 --val_low 0