Problem2889--【Div1】CSP-J2023 P4 旅游巴士

2889: 【Div1】CSP-J2023 P4 旅游巴士

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MB

Description





Sample Input Copy

5 5 3
1 2 0
2 5 1
1 3 0
3 4 3
4 5 1

Sample Output Copy

6

HINT

Source/Category

CSP-J