Ticket 5690
Problem 1637 -f
Submission 154620095
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
7
6 8 6 6 8 3 8 
1 4
2 5
7 4
1 2
2 6
5 3
Expected Output
19
Your Output
25
Difference
Generator Parameters
--h_high 9 --h_low 1 --n_high 7 --n_low 2