guagua0407

33.3% (3/9)

5.3% (4/75)

Description

Caido 最近迷上偶像活動了，而他最推的偶像是星野$\Large ☆$布萊恩。

Caido 心想為什麼有人可以這麼優秀呢，這才想起來，星野$\Large ☆$布萊恩就讀的是植物園高級中學。

Caido 很好奇在所有可能的團體分法中，總收益最大可以是多少，請你幫幫他！

Input Format

• $1\leq N\leq 2\times 10^ 5$
• $1\leq K\leq N$
• $0\leq P\leq 10^ {12}$
• $1\leq a_i\leq 10^ 9$

5 2 10
5 5 9 7 4

1

3 1 100
1 1 1

-99

3 2 1
48 76 3

125

Problem Source

No. Testdata Range Constraints Score
1 0~2 範例測資 0
2 3~5 $P=0$ 1
3 0~3, 6~11 $N\leq 500$ 11
4 0~3, 6~17 $N\leq 2000$ 12
5 1, 3, 18~29 $a_i\leq a_{i+1}$（$1\leq i<N$） 15
6 1, 3, 30~33 $K=1$ 30
7 0~49 無其他限制 31

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 3000 1572864 65536 1 3 4 7
1 3000 1572864 65536 1 3 4 5 6 7
2 3000 1572864 65536 1 3 4 7
3 3000 1572864 65536 2 3 4 5 6 7
4 3000 1572864 65536 2 7
5 3000 1572864 65536 2 7
6 3000 1572864 65536 3 4 7
7 3000 1572864 65536 3 4 7
8 3000 1572864 65536 3 4 7
9 3000 1572864 65536 3 4 7
10 3000 1572864 65536 3 4 7
11 3000 1572864 65536 3 4 7
12 3000 1572864 65536 4 7
13 3000 1572864 65536 4 7
14 3000 1572864 65536 4 7
15 3000 1572864 65536 4 7
16 3000 1572864 65536 4 7
17 3000 1572864 65536 4 7
18 3000 1572864 65536 5 7
19 3000 1572864 65536 5 7
20 3000 1572864 65536 5 7
21 3000 1572864 65536 5 7
22 3000 1572864 65536 5 7
23 3000 1572864 65536 5 7
24 3000 1572864 65536 5 7
25 3000 1572864 65536 5 7
26 3000 1572864 65536 5 7
27 3000 1572864 65536 5 7
28 3000 1572864 65536 5 7
29 3000 1572864 65536 5 7
30 3000 1572864 65536 6 7
31 3000 1572864 65536 6 7
32 3000 1572864 65536 6 7
33 3000 1572864 65536 6 7
34 3000 1572864 65536 7
35 3000 1572864 65536 7
36 3000 1572864 65536 7
37 3000 1572864 65536 7
38 3000 1572864 65536 7
39 3000 1572864 65536 7
40 3000 1572864 65536 7
41 3000 1572864 65536 7
42 3000 1572864 65536 7
43 3000 1572864 65536 7
44 3000 1572864 65536 7
45 3000 1572864 65536 7
46 3000 1572864 65536 7
47 3000 1572864 65536 7
48 3000 1572864 65536 7
49 3000 1572864 65536 7