随笔分类 - 最小割
摘要:洛谷传送门 CF 传送门 要求最大化收益加上支出,又因为每个字符有染红和染蓝两种选择,考虑最小割模型。可以看成是一开始先获得 的收益,然后对于每个 ,连边 ;对于每个 ,连边 \((S, i, r
阅读全文
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc225_g "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc225/tasks/abc225_g "AtCoder 传送门") 感觉是一种很新的建
阅读全文
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc259_g "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc259/tasks/abc259_g "AtCoder 传送门") 记 $b_i =
阅读全文
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc193_f "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc193/tasks/abc193_f "AtCoder 传送门") 复习一下最小割。
阅读全文
摘要:洛谷传送门 AtCoder 传送门 很棒的 flow 题,考虑建二分图。 源点向每种零食连边权为 的边,每种零食向每个孩子连边权为 的边,每个孩子向汇点连边权为 的边,这个图的最大流就是答案。 直接跑最大流肯定 T,考虑最大流等价于求这个图的最小割,因此转而求最小
阅读全文