Ticket 6787
Problem 1678 -e
Submission 156365012
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
5 6 4 2 8 9 1 7 3 
9 8 3 1 4 7 2 5 6 
7
5 3 6 7 2 4 1 
5 3 1 6 2 7 4 
Expected Output
40
20
Your Output
39
20
Difference
Generator Parameters
--n_high 10 --n_low 5 --t_high 2 --t_low 1