TopCoder

AA 競程
AA 競程是最強的!

User's AC Ratio

100.0% (2/2)

Submission's AC Ratio

100.0% (2/2)

Tags

Description

Input Format

Output Format

Sample Input 1

4
3 1 4 -6
2 -1 -3
6 6 -11 5 -13 3 12
4 14 -7 -3 15

Sample Output 1

39

Sample Input 2

1
1 -1000000000

Sample Output 2

-1000000000

Hints

Problem Source

111 學年度全國資訊學科能力競賽模擬賽

Subtasks

No. Testdata Range Constraints Score
1 0~1 範例測資 0
2 2~8 $n = 1$ 8
3 0~18 $n \le 400$ 14
4 0~28 $n \le 3000$ 22
5 0~38 無額外限制 56

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 1000 524288 65536 1 3 4 5
1 1000 524288 65536 1 3 4 5
2 1000 524288 65536 2 3 4 5
3 1000 524288 65536 2 3 4 5
4 1000 524288 65536 2 3 4 5
5 1000 524288 65536 2 3 4 5
6 1000 524288 65536 2 3 4 5
7 1000 524288 65536 2 3 4 5
8 1000 524288 65536 2 3 4 5
9 1000 524288 65536 3 4 5
10 1000 524288 65536 3 4 5
11 1000 524288 65536 3 4 5
12 1000 524288 65536 3 4 5
13 1000 524288 65536 3 4 5
14 1000 524288 65536 3 4 5
15 1000 524288 65536 3 4 5
16 1000 524288 65536 3 4 5
17 1000 524288 65536 3 4 5
18 1000 524288 65536 3 4 5
19 1000 524288 65536 4 5
20 1000 524288 65536 4 5
21 1000 524288 65536 4 5
22 1000 524288 65536 4 5
23 1000 524288 65536 4 5
24 1000 524288 65536 4 5
25 1000 524288 65536 4 5
26 1000 524288 65536 4 5
27 1000 524288 65536 4 5
28 1000 524288 65536 4 5
29 1000 524288 65536 5
30 1000 524288 65536 5
31 1000 524288 65536 5
32 1000 524288 65536 5
33 1000 524288 65536 5
34 1000 524288 65536 5
35 1000 524288 65536 5
36 1000 524288 65536 5
37 1000 524288 65536 5
38 1000 524288 65536 5