Description

JZOJ.5279【NOIP2017模拟8.15】香港记者
 

Input

JZOJ.5279【NOIP2017模拟8.15】香港记者

Output

JZOJ.5279【NOIP2017模拟8.15】香港记者
 

Sample Input

8 9
1 2 3 4 5 6 7 8
1 2 2
2 3 3
3 8 3
1 4 3
4 5 2
5 8 1
1 6 1
6 7 2
7 8 3

Sample Output

6
1 4 5 8)
 

Data Constraint

JZOJ.5279【NOIP2017模拟8.15】香港记者

相关文章: