Ticket 338
Problem 1637 -d
Submission 146215930
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
6
5 1 3 5 2 1 
3 4 4 1 4 1 
2
1 3 
2 4 
Expected Output
1074
50
Your Output
1082
50
Difference
Generator Parameters
--n_cap 100 --n_high 6 --n_low 1 --t_cap 40 --t_high 4 --t_low 1 --val_cap 100 --val_high 5 --val_low 1