TopCoder

User's AC Ratio

100.0% (3/3)

Submission's AC Ratio

45.5% (5/11)

Tags

Description

Input Format

Output Format

Sample Input 1

4 1
1 2 20
2 3 -10
3 4 20
1 4

Sample Output 1

30

Sample Input 2

1 1
1 1

Sample Output 2

0

Sample Input 3

6 2
1 2 -10
2 6 3
1 3 13
3 4 2
3 5 -7
4 6
5 6

Sample Output 3

15
13

Hints

Problem Source

YTP 2020 高中組程式挑戰營 p16

Subtasks

No. Testdata Range Constraints Score
1 0~2 範例測資 0
2 0~26 無額外限制 25

Testdata and Limits

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