摘要: Link to the question: Luogu, AtCoder Preface The very first generating function and polynomial problem solved in my life! This blog is a detailed expl 阅读全文
posted @ 2023-02-09 07:27 BrianPeng 阅读(260) 评论(0) 推荐(1) 编辑
摘要: Preface 这是一篇费用流的辅助题解。关于建图的思路和构造,题解栏目 中的内容可以说是非常的详尽。 然而,这些题解几乎都对16种可能性一一建图,而且还要对源汇边分别写。这样下来总共32种情况,不仅码量巨大,而且很容易出错。 本文假设读者已经理解建图的规则。本文以 这篇日报 的 Part 3.3 阅读全文
posted @ 2023-01-27 19:11 BrianPeng 阅读(46) 评论(0) 推荐(0) 编辑
摘要: 题解 UVA1389 Hard Life: 最小割,有向图,分数规划,和牛顿迭代 Preface 黑题好耶 看到了题解里面大多数是二分,我就来讲一讲简单又快速的 Dinkelbach Algorithm 吧! 0-1 分数规划与线性规划 首先把人员看作点集$V$,把矛盾看作边集$E$。 令$V'\s 阅读全文
posted @ 2023-01-23 02:18 BrianPeng 阅读(53) 评论(0) 推荐(0) 编辑
摘要: CF blog entry Solved the first five questions with brute force. Still 19 points away from reclaiming purple. Hang on! Solution: CF1774G Segment Coveri 阅读全文
posted @ 2022-12-26 21:18 BrianPeng 阅读(167) 评论(0) 推荐(0) 编辑
摘要: Solution: CF731D 80-th Level Archeology -- Letter, Interval, and Reverse Thinking Link to the question: CF Luogu Preface Assertion: "STL set is the mo 阅读全文
posted @ 2022-11-27 00:11 BrianPeng 阅读(73) 评论(0) 推荐(0) 编辑
摘要: Blog entry at CF First CF round at Cambridge. Solved A,B,D1 in the round. Dropped from purple to blue... Still a long way to go... Solution: CF Round 阅读全文
posted @ 2022-10-26 04:33 BrianPeng 阅读(229) 评论(0) 推荐(0) 编辑
摘要: ###Intro: This blog will start with plain multiplication, go through Divide-and-conquer multiplication, and reach FFT and NTT. The aim is to enable th 阅读全文
posted @ 2022-01-04 19:06 BrianPeng 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 众所周知,函数(function)是代码中最最不可少的组成部分之一 什么是函数 这里首先和数学意义上的函数做一个区分: 数学意义上的函数 \(f:S\to T\) 是一个集合 \(S\) 到另一个集合 \(T\) 的映射,其中 \(S\) 中的任何一个元素都唯一对应 \(T\) 中的一个元素。如果用 阅读全文
posted @ 2021-01-10 20:27 BrianPeng 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 本文从 洛谷 P1001 A+B Problem 为例,讲一讲 Python 3 在算法竞赛中的一些基本输入输出方法,以及一些利用 Python 3 特性的代码简化 以下为本文将涉及的内容: input() str.split() print() map() [... for ... in ...] 阅读全文
posted @ 2020-12-23 09:35 BrianPeng 阅读(726) 评论(0) 推荐(1) 编辑
摘要: 本文从 洛谷 P2572 [SCOI2010]序列操作 为例,讲一讲本蒟蒻对常用区间操作线段树的一些小技巧,可以减少码量,降低出错概率 这道题可以说是常规的线段树区间操作题,但是有3个区间操作(都需要懒标记)和2个区间查询,而且第二个区间查询需要处理区间边界的连接问题,所以并不是一个容易的问题。其他 阅读全文
posted @ 2020-12-15 15:46 BrianPeng 阅读(318) 评论(1) 推荐(0) 编辑