TopCoder

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

User's AC Ratio

98.3% (58/59)

Submission's AC Ratio

41.4% (84/203)

Tags

Description

Input Format

Output Format

Sample Input 1

5 6
2 1 1
1 5 4
5 2 6
2 3 2
3 4 3
4 5 2

Sample Output 1

2 2
1
4

Sample Input 2

2 1
1 2 6

Sample Output 2

0 0

Sample Input 3

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

Sample Output 3

2 3
2
5
7

Hints

Problem Source

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

Subtasks

No. Testdata Range Constraints Score
1 0~2 範例測資。 0
2 3~14 $n, m \le 20$ 6
3 15~26 $c_i \le 100$ 8
4 27~38 無額外限制。 86

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 2
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 4
28 1000 1048576 65536 4
29 1000 1048576 65536 4
30 1000 1048576 65536 4
31 1000 1048576 65536 4
32 1000 1048576 65536 4
33 1000 1048576 65536 4
34 1000 1048576 65536 4
35 1000 1048576 65536 4
36 1000 1048576 65536 4
37 1000 1048576 65536 4
38 1000 1048576 65536 4