TopCoder

Caido
$\mathbb{W}\mathcal{aimai}\sim$

User's AC Ratio

100.0% (105/105)

Submission's AC Ratio

92.9% (130/140)

Tags

Description

Input Format

Output Format

Sample Input 1

3
3 1 2

Sample Output 1

10

Sample Input 2

5
5 2 1 4 3

Sample Output 2

35

Sample Input 3

10
9 5 3 4 10 1 7 6 8 2

Sample Output 3

220

Hints

Problem Source

110 學年度全國資訊學科能力競賽
測資來源:TWPCA GitHub

Subtasks

No. Testdata Range Constraints Score
1 0~2 範例測資。 0
2 3~13 $t_i \le 3$ 20
3 14~34 $t_i \le 100$ 30
4 35~55 無額外限制。 50

Testdata and Limits

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