上一页 1 ··· 55 56 57 58 59 60 61 62 63 ··· 81 下一页
摘要: [Codeforces 题目传送门](https://codeforces.com/contest/585/problem/E) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF585E) 首先我们注意到对于固定的 $x$ 及集合 $S$,如果 $\gc 阅读全文
posted @ 2021-04-21 19:36 tzc_wk 阅读(72) 评论(1) 推荐(0)
摘要: [Atcoder 题面传送门](https://atcoder.jp/contests/arc117/tasks/arc117_d) 我们考虑探究一下怎么最小化 $\max\limits_{i=1}^nE_i$,我们假设 $E_{p_1}dep1[rt1]) rt1=i; dfs2(rt1,0);f 阅读全文
posted @ 2021-04-20 01:59 tzc_wk 阅读(109) 评论(0) 推荐(1)
摘要: [Codeforces 题目传送门](https://codeforces.com/contest/453/problem/E) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF453E) 首先注意到对于每个小马,在任意时刻它的法力值只有三种可能: - 阅读全文
posted @ 2021-04-19 20:03 tzc_wk 阅读(86) 评论(0) 推荐(0)
摘要: [题面传送门](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 阅读(132) 评论(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 阅读(119) 评论(0) 推荐(0)
摘要: [Codeforces 题目传送门](https://codeforces.com/contest/1119/problem/H) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF1119H) FWT 的 immortal tea %%% 首先我们可以写 阅读全文
posted @ 2021-04-17 22:47 tzc_wk 阅读(123) 评论(0) 推荐(0)
摘要: [Codeforces 题目传送门](https://codeforces.com/contest/611/problem/H) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF611H) 首先我们将所有十进制下位数相同的点看作一种颜色,这样题目转化为, 阅读全文
posted @ 2021-04-17 13:07 tzc_wk 阅读(58) 评论(1) 推荐(0)
摘要: ~~u1s1 距离省选只剩 5 days 了,现在学新算法真的合适吗((~~ ### 位运算卷积 众所周知,对于最普通的卷积 $c_i=\sum\limits_{j+k=i}a_jb_k$,$a_jb_k$ 的贡献累加到 $c_{j+k}$ 上,因此这种卷积又被称为加法卷积。 但是对于某些卷积,$a 阅读全文
posted @ 2021-04-17 11:00 tzc_wk 阅读(207) 评论(1) 推荐(0)
摘要: [题面传送门](https://www.luogu.com.cn/problem/P5249) ~~期望真 nm 有意思,所以蒟蒻又来颓期望辣~~ 先特判掉 $P_0=0$ 的情况,下面假设 $P_0\ne 0$。 首先注意到我们每次将加特林对准一个人,如果这个人被毙掉了,那么相当于进入了 $n-1 阅读全文
posted @ 2021-04-17 10:46 tzc_wk 阅读(137) 评论(0) 推荐(0)
上一页 1 ··· 55 56 57 58 59 60 61 62 63 ··· 81 下一页