4569: P1111 修复公路
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description

Input

Output

Sample Input Copy
4 4
1 2 6
1 3 4
1 4 5
4 2 3
Sample Output Copy
5
HINT
