摘要: [题面传送门](https://www.luogu.com.cn/problem/P5331) 首先熟悉网络流的同学应该能一眼看出此题的建模方法: - 将每个点拆成两个点 $in_i,out_i$,连一条 $S\to in_i$,容量为 $1$ 费用为 $0$ 的边 - 连一条 $in_i\to T 阅读全文
posted @ 2021-04-18 16:48 tzc_wk 阅读(131) 评论(1) 推荐(0)
摘要: [Codeforces 题目传送门](https://codeforces.com/contest/1299/problem/D) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF1299D) 一道线性基的综合题 首先注意到“非简单路径”“异或和”等字眼 阅读全文
posted @ 2021-04-18 16:16 tzc_wk 阅读(97) 评论(0) 推荐(0)
摘要: [题面传送门](https://www.luogu.com.cn/problem/P3270) 考虑容斥。我们记 $a_i$ 为钦定 $i$ 个人被 B 神碾压的方案数,如果我们已经求出了 $a_i$ 那么一遍二项式反演即可求出答案,即 $ans=\sum\limits_{i=k}^{n-1}a_i 阅读全文
posted @ 2021-04-18 12:33 tzc_wk 阅读(118) 评论(0) 推荐(0)