TopCoder

User's AC Ratio

NaN% (0/0)

Submission's AC Ratio

NaN% (0/0)

Tags

Description

Input Format

Output Format

Sample Input 1

2
2 3

Sample Output 1

17

Sample Input 2

4
1 2 3 4

Sample Output 2

326

Hints

Problem Source

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

Subtasks

No. Testdata Range Constraints Score
1 0~1 範例測資 0
2 0~9 $n \leq 20$ 5
3 0~14 $n \leq 1000$ 15
4 0~18 $n \leq 10^ 5$ 30
5 0~1, 19~23 $A_i \leq 20$ 15
6 0~29 無額外限制 35

Testdata and Limits

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