TopCoder

Thumb screenshot from 2022 02 07 14 53 28
FHVirus
到底要用哪一種 Code style 呢?

User's AC Ratio

94.1% (16/17)

Submission's AC Ratio

32.2% (19/59)

Description

Input Format

Output Format

Sample Input

// Sample input 1
4 4
1 2 10
2 4 50
1 3 30
3 4 20

// Sample input 2
5 6
1 3 10
3 4 0
1 5 30
5 4 10
3 2 10
3 4 40

Sample Output

// Sample output 1
90

// Sample output 2
70

Hints

Problem Source

109 學年度全國資訊學科能力競賽

Subtasks

No. Testdata Range Constraints Score
1 0~1 範例測資。 0
2 2~10 $n \le 100$ 且 $m \le 1000$。 32
3 11~30 無額外限制。 68

Testdata and Limits

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