该文被密码保护。 阅读全文
posted @ 2025-07-18 15:47 chu_yh 阅读(5) 评论(0) 推荐(0)
摘要: 本文转载并翻译自 neal 的博客《Blowing up unordered_map, and how to stop getting hacked on it - Codeforces》,所以加了密码保护。 阅读全文
posted @ 2025-07-17 21:33 chu_yh 阅读(0) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2025-07-12 17:20 chu_yh 阅读(3) 评论(0) 推荐(0)
摘要: 链接:费用流及上下界网络流。 人生建议:把 \(u\) 和 \(v\) 看清楚! 上次更新:2025-08-12 10:10:14 星期二。 Part. 0:定义 其实没啥好讲的。理解为一个单向道路网,每条道都有个最大载重,要过这条道的货的重量不能超过这个最大载重(否则路会塌),给定一对起点和终点, 阅读全文
posted @ 2025-07-09 15:43 chu_yh 阅读(46) 评论(2) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2025-07-08 08:18 chu_yh 阅读(12) 评论(1) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2025-07-08 08:18 chu_yh 阅读(24) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2025-07-08 08:18 chu_yh 阅读(6) 评论(0) 推荐(0)
摘要: 可以钦定已有一种部分合法方案,在思考将该方案可以如何拓展,从而到一种合法模板或直接得到最终答案。如 CF 2147B。 明显需要按某种特定顺序构造,又因为是 B 题,所以不会太复杂。因此,用可视化工具验证合法性就对快速解题很有帮助了。 观察题目要求: 对于每个整数 \(x\)(\(1 \leq x 阅读全文
posted @ 2025-10-10 15:50 chu_yh 阅读(41) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2025-08-07 10:32 chu_yh 阅读(0) 评论(0) 推荐(0)
摘要: C++ has always had the convenient data structures std::set and std::map, which are tree data structures whose operations take \(O(\log n)\) time. With 阅读全文
posted @ 2025-07-18 07:49 chu_yh 阅读(15) 评论(1) 推荐(0)
摘要: Hi Codeforces! In Round 507 earlier today, a large number of "mostly correct" randomized solutions on 1039B - Subway Pursuit were hacked. I wanted to 阅读全文
posted @ 2025-07-18 07:49 chu_yh 阅读(5) 评论(0) 推荐(0)
摘要: 定义 2-SAT,简单的说就是给出 \(n\) 个布尔方程,每个方程和两个变量相关,如 \(a \vee b\),表示变量 \(a, b\) 至少满足一个。然后判断是否存在可行方案,显然可能有多种选择方案,一般题中只需要求出一种即可。另外,\(\neg a\) 表示 \(a\) 取反。 例题引入:洛 阅读全文
posted @ 2025-07-16 10:26 chu_yh 阅读(22) 评论(1) 推荐(0)
摘要: 本文介绍匈牙利算法。 引入 一个无向图 \(G\),\(G\) 中所有点可以被分为两个点集 \(A\) 和 \(B\)。\(G\) 中任意边均满足:该边所连两点分别属于 \(A\) 和 \(B\)。这样的图就叫二分图。 二分图最大匹配问题就是:选出一个边集 \(M\),使任意一点所连的边中只有一条属 阅读全文
posted @ 2025-07-10 17:11 chu_yh 阅读(76) 评论(0) 推荐(0)