#1906. 树上的蚂蚁

树上的蚂蚁

题目描述

输入格式

输出格式

1
3
1 2 1
2 3 1
3
1 3 2
3 1 1
1 2 3

2

提示

N< = 100000

题目来源

Play with tree By Amber