2025.9.21 炼石计划 week4 图连通性、图论杂项 讲课笔记
记录:1,2,3,5,6 \(\quad\) e2 \(\quad\) e1,7 \(\quad\) 11,e3 \(\quad\) e4 \(\quad\) e5 \(\quad\) e6
题单:
https://www.mxoj.net/training/T1410?groupId=1124&returnUrl=/training/listForGroup?groupId=1124
补充:
- [x] https://qoj.ac/problem/10740
- [x] https://loj.ac/p/2391
- [x] https://qoj.ac/problem/11115
- [x] https://codeforces.com/problemset/problem/1903/F
- [x] https://codeforces.com/problemset/problem/547/D
- [x] https://codeforces.com/problemset/problem/1634/E
T4 P8867 [NOIP2022] 建造军营
先边双缩点,一种方案合法当且仅当将所有选择的边的两端并起来后,选择的点在同一连通块中
缩点后得到一棵树,令 \(f_{u,0/1}\) 表示点 \(u\) 子树中没选/选了点的情况下的方案数,转移是容易的
时间复杂度 \(O(n\log m+m)\)

浙公网安备 33010602011771号