Ticket 3450
Problem 1637 -f
Submission 152668488
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
9
19 16 16 10 1 6 18 12 4 
1 5
8 9
6 7
9 3
1 4
8 5
2 5
6 5
Expected Output
70
Your Output
64
Difference
Generator Parameters
--h_cap 1000000000 --h_high 20 --h_low 1 --n_cap 200000 --n_high 10 --n_low 2