随笔分类 -  费用流

摘要:洛谷传送门 CF 传送门 考虑费用流,对于每一行建两个点 \(i_0, i_1\),分别代表这一行的所有 \(0, 1\)。同样每一列建两个点 \(j_0, j_1\)。源点分别向 \(i_0, i_1\) 连流量为这一行要求的 \(0\) 或 \(1\) 的个数,费用为 \(0\)。同理连汇点。 阅读全文
posted @ 2023-12-21 15:14 zltzlt 阅读(72) 评论(0) 推荐(0)
摘要:洛谷传送门 AtCoder 传送门 直接糊一手线性规划对偶板板。 要求: \[\min \sum A_i l_i + \sum B_i r_i \]\[\forall i, j, l_i + r_j \ge C_{i, j} \]\[l_i, r_i \ge 0 \]\[l_i, r_i \in \ 阅读全文
posted @ 2023-11-03 21:33 zltzlt 阅读(44) 评论(0) 推荐(0)
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc259_g "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc259/tasks/abc259_g "AtCoder 传送门") 记 $b_i = 阅读全文
posted @ 2023-06-04 22:03 zltzlt 阅读(22) 评论(0) 推荐(0)
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc214_h "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc214/tasks/abc214_h "AtCoder 传送门") 好毒瘤啊…… 首先 阅读全文
posted @ 2023-06-03 08:31 zltzlt 阅读(47) 评论(0) 推荐(0)
摘要:[AtCoder 传送门](https://atcoder.jp/contests/abc263/tasks/abc263_g "AtCoder 传送门") [洛谷传送门](https://www.luogu.com.cn/problem/AT_abc263_g "洛谷传送门") ## 题意 有 $ 阅读全文
posted @ 2022-10-22 19:43 zltzlt 阅读(54) 评论(0) 推荐(0)