虚树
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
样例1
输入
0
0 8
2 1 168841147
3 2 185715402
4 3 225620062
5 2 229186192
6 1 56387677
7 1 912381225
8 6 897978762
6 8 4 1 3 2 5 7
10
1 4 1
3 8 4
1 3 2
2 8 3
3 4 1
1 5 5
1 6 1
3 7 2
3 6 4
1 4 3
输出
0
1721744028
1534543050
2446924275
0
1534543050
0
640521656
580176611
1534543050
备注
10.4CSP-S模拟题
- Status
- Done
- Rule
- IOI
- Problem
- 4
- Start at
- 2023-10-4 13:00
- End at
- 2023-10-4 18:00
- Duration
- 5 hour(s)
- Host
- Partic.
- 6