随笔分类 - dfs 树
摘要:洛谷传送门 AtCoder 传送门 喵喵题。 考虑若所有点权都已确定,如何求 到 所有路径权值和的 。 考虑如何 check 一个 是否合法。考虑拆点,把点权转成边权,在新图上连边 ,边权 ;\(u' \to
阅读全文
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/CF1364D "洛谷传送门") [CF 传送门](https://codeforces.com/problemset/problem/1364/D "CF 传送门") 简单题。 特判掉 的情况
阅读全文
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc306_g "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc306/tasks/abc306_g "AtCoder 传送门") 考虑若干个能被 $
阅读全文