Ticket 1740
Problem 1646 -c
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
100
2785
7015
46537
2760
2898
63899
67199
82439
28160
67212
82995
51807
52070
13650
52193
87256
51522
43208
3241
65345
48919
34413
87601
9034
37033
34917
56542
84488
32195
85142
77919
45364
76596
59179
92898
77260
74061
64084
95645
57585
19717
10404
13286
90888
65973
24722
9979
86233
94717
80569
19324
45043
75677
45367
68140
59494
19933
91986
42003
11335
10789
29614
92862
33007
45285
27960
55070
21469
60975
86559
61253
94895
1016
70037
64364
72717
43419
25746
78800
10495
43925
65841
41200
59921
76458
39314
60337
74454
46175
91094
51194
45314
76350
7462
14008
55855
19573
11437
40571
91385
Expected Output
4
7
6
5
4
8
6
5
5
6
7
8
7
6
7
6
6
4
6
7
7
8
6
4
6
6
8
5
8
7
7
3
7
9
7
6
7
7
8
6
6
5
5
6
7
5
6
7
8
8
6
8
7
4
6
6
8
7
6
6
6
8
8
7
7
7
7
6
8
7
8
8
4
7
8
7
6
6
4
6
7
5
4
7
8
7
6
4
7
6
6
5
7
6
5
8
8
7
5
7
Generator Parameters
--n_cap 1000000000000 --n_high 100000 --n_low 1 --t_cap 100 --t_high 100 --t_low 100