典题记录

· · 个人记录

退役了,大战whk去了

1.对拍时候树编号随机

2.注意转化的题意不要错

3.一定要写自动对拍

4.结论一定要用暴力验证

5.验证凸性注意要用离散前的值

6.分块块长可以改的激进一点,即使小范围显示会变劣

7.多手模样例

8.少用 map、set。

HALL定理有时候把两边反一下考虑

网络流(讲课)

CF513F2 CF1250K CF1662J(最长反链)

CF1630F(最长反链、最小链覆盖)

CF1383F

https://www.luogu.com.cn/problem/AT_agc031_e

https://codeforces.com/gym/103861/problem/H

计算几何 http://10.49.18.71/blogof/daklqw/blog/1095

计数 http://10.49.18.71/uploads/liuhengxi/2024s-count-daae3c0e.pdf

网络流 http://10.49.18.71/uploads/rotcar/_flow.pdf

数论 http://10.49.18.71/uploads/realskc/数论入门.pdf

http://10.49.18.71/uploads/realskc/game_theory.pdf

wzf(数据结构、树论) http://106.14.32.20:17180/uploads/wangzhifang/public_slides.zip

数据结构 http://10.49.18.71/uploads/zjc/数据结构杂题选讲.pptx

板子 https://qoj.ac/contest/1716

二分图边染色 https://www.luogu.com.cn/problem/CF600F

图论:http://106.14.32.20:17180/uploads/positive1/graph.pdf

博弈论

https://www.luogu.com.cn/problem/P3210

斜率/贪心

https://www.luogu.com.cn/problem/P9051

模拟最大流 https://www.luogu.com.cn/problem/P5996

二分图必经点 https://www.luogu.com.cn/problem/CF1773D

wqs二分 https://www.luogu.com.cn/problem/AT_arc168_e

树上启发式合并 https://www.luogu.com.cn/problem/P9886

整除分快性质 https://www.luogu.com.cn/problem/solution/P9818

广义串并联图:

https://qoj.ac/contest/24/problem/239

在边数与点数接近的时候,可以通过缩1度点,入度出度都为1的点,使图的点数大大减少 https://www.luogu.com.cn/problem/P8426

一般图最大匹配(n较小): https://www.luogu.com.cn/problem/P9792

异色点对直径: https://www.luogu.com.cn/problem/P9665

阶梯NIM: https://www.luogu.com.cn/problem/P9283 http://10.49.18.71/problem/196

二进制数的最长上升子序列: https://www.luogu.com.cn/problem/P9131

枚举可能方案算贡献(概率): https://www.luogu.com.cn/problem/AT_arc176_d

最小割(我是废物,与 s 连通表示选): https://www.luogu.com.cn/problem/AT_arc176_e https://www.luogu.com.cn/problem/P10541

竞赛图scc个数: https://www.luogu.com.cn/problem/solution/AT_arc163_d

状压置换环的特殊枚举顺序: https://www.luogu.com.cn/problem/solution/P8189

区间HALL定理: https://www.luogu.com.cn/problem/CF1965F

构造题:小的构造,大的由小的拼起来

竞赛图:考虑补图

计数:考虑容斥

吉司机线段树:没有区间加,时间复杂度O (nlogn)

有区间加的:https://www.luogu.com.cn/problem/CF1290E

随机序列最长上升子序列长度为sqrt(n) https://www.luogu.com.cn/problem/CF1530H

线段树每个区间维护长为 len 的序列 https://www.luogu.com.cn/problem/CF1172F

矩形覆盖 https://www.luogu.com.cn/problem/CF983D

点分树 https://www.luogu.com.cn/problem/P5311

五个区间覆盖树上除去一条路径后的点(出栈序) https://www.luogu.com.cn/problem/CF1930H

离线加边,维护原图scc https://www.luogu.com.cn/problem/CF1989F

线性规划网络流: http://zhengruioi.com/problem/2562

求补图连通块数: https://www.luogu.com.cn/problem/CF920E

字符串周期: https://www.luogu.com.cn/problem/CF1909G

网格图转二分图: https://www.luogu.com.cn/problem/CF1887E

区间mex(删数): https://blog.csdn.net/weixin_44178736/article/details/110309227

矩阵操作: https://www.luogu.com.cn/problem/CF1458C

网络流退流: https://www.luogu.com.cn/problem/CF1427G

可并堆: https://www.luogu.com.cn/problem/P10759

状压匹配,图是否存在完备匹配(先将点配对,使得n/2): http://xsy.gdgzez.com.cn/JudgeOnline/problem.php?cid=2185&pid=2

给定两棵树,求Max dis1(a,i)+dis2(i,b): https://qoj.ac/contest/1096/problem/5439

https://qoj.ac/contest/1099/problem/5458?v=1 最后组成环,维护链: https://qoj.ac/contest/1106/problem/5519 逆序对数奇偶性: [https://qoj.ac/contest/1106/problem/5526](https://www.cnblogs.com/apjifengc/p/18174705#b-binary-arrays-and-sliding-sums) bitset优化匈牙利: https://qoj.ac/contest/1197/problem/6308 最小费用流: https://qoj.ac/contest/1244/problem/6508 团计数: https://qoj.ac/contest/1358/problem/7514 支配树: https://www.luogu.com.cn/article/5uk4suo2 https://www.luogu.com.cn/problem/P10365 字符串对应括号匹配最小字典序 (判断括号匹配合法) https://www.luogu.com.cn/problem/P6000 循环卷积: https://www.luogu.com.cn/problem/CF1808E2 和为m的数,组成n的方案数(nsqrt(m)): https://www.luogu.com.cn/problem/CF1574F bitset高级用法: http://10.49.18.71/problem/483 (树分块·树上撒点): http://10.49.18.71/problem/592 回文性质(最小循环节): http://10.49.18.71/contest/72/problem/894 有向图无环图(有自环,到点随机交换边权,求最短路):http://10.49.18.71/problem/930 若图存在唯一完美匹配:http://10.49.18.71/problem/1254 上下界网络流(谨防唐氏错误): http://10.49.18.71/problem/1639 不删除双指针(两个栈维护一个队列): https://www.cnblogs.com/caijianhong/p/18438415 https://www.luogu.com.cn/problem/CF2028F 大虚树推小虚树: http://10.49.18.71/contest/161/problem/1776 DAG 求点能到达或被到达任意点(k<=1): http://10.49.18.71/problem/1577 大区间包含小区间,先求大区间: http://10.49.18.71/problem/1631 ac自动机求border: http://10.49.18.71/problem/1046 重心:最深的 $sz_u \ge \lfloor \frac n2\rfloor

树考虑点分治

转化为括号匹配:http://10.49.18.71/contest/51/problem/830

12BFS:http://10.49.18.71/problem/843

唐氏KMP: https://qoj.ac/contest/1799/problem/9372

差分数组看成括号匹配: http://10.49.18.71/problem/2236

深度不超过d的树的 \sum siz\leq n*d: https://qoj.ac/contest/1801/problem/9411

分成60条链,唐氏暴力求: https://qoj.ac/contest/1780/problem/8943

求 mex=i (1<=i<=n)的区间个数 http://10.49.18.71/problem/1476

随机图找哈密顿路: https://qoj.ac/contest/1696/problem/8787

Kosaraju求scc(sbbitset,谨慎实现): https://qoj.ac/contest/1538/problem/8315

随机排列中位数:https://qoj.ac/contest/1522/problem/8050

前缀加、后缀加序列缩减 https://www.luogu.com.cn/problem/CF2029G

差分: https://qoj.ac/contest/1596/problem/8542?v=1

神秘分治&(a_i\leq \frac ni,a_i\leq a_{i+1})

对区间重编号使得 l,r 都两两不同,但是是否相交与重编号之前保持一致

https://www.luogu.com.cn/problem/CF2018E2

(二元组并起来)线性基plus: https://www.luogu.com.cn/article/3180oy2c

凸性维护差分数组: https://www.luogu.com.cn/problem/AT_abc383_g

DAG找路径和最大GCD: https://www.luogu.com.cn/problem/AT_arc144_e

倒序构造: https://www.luogu.com.cn/problem/AT_arc122_e

互质转化为到偶数的可达性: https://www.luogu.com.cn/problem/AT_arc136_e

网格图黑白染色,黑格反转: https://www.luogu.com.cn/problem/AT_arc135_d

将数拆成 2^i\times k: https://www.luogu.com.cn/problem/AT_arc141_d

网格图求最小生成树: https://www.luogu.com.cn/problem/P5360

两个点最短路必经不互达: http://10.49.18.71/problem/17

二分图刻画子图: https://www.luogu.com.cn/problem/AT_arc161_f

奇怪双指针: http://106.14.32.20:17180/problem/614

哈希: http://106.14.32.20:17180/problem/949

bitset优化01矩阵乘法:https://www.cnblogs.com/gyan083/p/15543271.html

有向图环长的gcd:CF1515G

树上背包优化技巧:http://106.14.32.20:17180/problem/1032

决策单调性: https://loj.ac/p/6039

\max(x,y)=\frac{x+y+|y-x|}2

AA串:优秀的拆分

唐氏根号分治DP,阶梯状问题:https://qoj.ac/contest/1852/problem/9798

lhx课件nb计数例题:https://qoj.ac/problem/10018

树+链区间: https://qoj.ac/contest/1869/problem/9840

分治优化矩形DP: http://zhengruioi.com/contest/1787/problem/3096

图论模二转化: https://qoj.ac/contest/1360/problem/7313

动态修改边权,查询树的直径: https://www.luogu.com.cn/problem/CF1192B

区间笛卡尔树:http://10.49.18.71/problem/2277

Hall定理: http://xsy.gdgzez.com.cn/JudgeOnline/problem.php?cid=2209&pid=0

slope trick: https://www.luogu.com.cn/problem/AT_arc070_c

nb线性基: https://www.luogu.com.cn/problem/AT_arc084_d

二分图计数: https://www.luogu.com.cn/problem/AT_abc327_g

判可达考虑两个点是否能到同一个状态: https://www.luogu.com.cn/problem/AT_arc115_f

观察 max 找结论:https://www.luogu.com.cn/problem/CF2077D

二分图博弈:https://www.luogu.com.cn/problem/CF1710E

选择所有被 [l,r] 包含的区间,判断是否能覆盖 [l,r] 内的所有整点:https://www.luogu.com.cn/problem/solution/P11695

维护单峰序列: https://www.luogu.com.cn/problem/P11236

AC自动机状态优化: http://xsy.gdgzez.com.cn/JudgeOnline/problem.php?cid=2241&pid=2

欧拉回路构造: https://www.luogu.com.cn/problem/P10873

LGV引理,神仙缩点: https://www.luogu.com.cn/problem/P10698

一个顺序逐渐加入(矩阵乘法合并): http://10.49.18.71/problem/832

考虑BFS序: https://www.luogu.com.cn/problem/P10302

https://www.luogu.com.cn/problem/P9368 转化为网格图: https://www.luogu.com.cn/problem/P9040 大值域DP: https://www.luogu.com.cn/problem/P8392 奇偶性: https://www.luogu.com.cn/problem/P8100 FWT $|s\cap t|\in T,|s\cup t|= S$: https://www.luogu.com.cn/problem/CF2070F 不断增加限制,不要偷懒: https://www.luogu.com.cn/problem/AT_agc066_c 二分图: https://www.luogu.com.cn/problem/AT_agc067_a 莫比乌斯反演: https://www.luogu.com.cn/problem/CF2045K min(ai-i) 转二分图匹配:https://www.luogu.com.cn/problem/P12559 a,b->max(a,b)+1(乱搞可过): https://www.luogu.com.cn/problem/P12430 https://qoj.ac/contest/1994/problem/10885 网络流建图,给边加大权值:https://qoj.ac/contest/1903/problem/9692