Ticket 13787
Problem 1700 -c
Submission 161421167
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
12
5
-3 -2 -1 0 -2 
4
-2 1 -1 -1 
4
-2 2 -1 3 
5
0 -2 -1 3 -2 
5
1 2 3 2 -3 
4
-2 -1 2 3 
3
1 2 -2 
3
-1 0 -2 
3
-3 3 -1 
5
1 0 -1 3 -1 
3
1 2 1 
4
1 3 2 3 
Expected Output
10
9
16
19
13
7
8
6
17
15
2
4
Your Output
10
9
16
19
13
7
8
6
17
15
4
6
Difference
Generator Parameters
--n_high 5 --n_low 3 --t_high 12 --t_low 12 --val_high 3 --val_low -3