正文
增加 38 行删除 2 行
53 行未改动545556575859606162124 行未改动全部展开18718818919019153 行未改动[P4246 [SHOI2008] 堵塞的交通](https://www.luogu.com.cn/problem/P4246)[P4097 【模板】李超线段树 / [HEOI2013] Segment](https://www.luogu.com.cn/problem/P4097)## D3#### 上午模拟赛T1很简单,后面忘了[T2](https://qoj.ac/problem/7937/statement/zh_cn)124 行未改动全部展开[P3436 [POI 2006] PRO-Professor Szu](https://www.luogu.com.cn/problem/P3436)拓扑dp一下就行了。[CF1139E Maximize Mex](https://www.luogu.com.cn/problem/CF1139E)从第d天到第1天,这样就变成了每天多一名学生,然后尝试当前mex+1能否匹配成功,若成功mex+=1,然后就做完了。[P10953 逃不掉的路](https://www.luogu.com.cn/problem/P10953)53 行未改动545556575859606162124 行未改动全部展开18718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622753 行未改动[P4246 [SHOI2008] 堵塞的交通](https://www.luogu.com.cn/problem/P4246)[P4097 【模板】李超线段树 / [HEOI2013] Segment](https://www.luogu.com.cn/problem/P4097)## D3#### 上午模拟赛T1很简单,后面忘了[T2](https://qoj.ac/problem/7937/statement/zh_cn)124 行未改动全部展开[P3436 [POI 2006] PRO-Professor Szu](https://www.luogu.com.cn/problem/P3436)拓扑dp一下就行了。[CF1139E Maximize Mex](https://www.luogu.com.cn/problem/CF1139E)从第d天到第1天,这样就变成了每天多一名学生,然后尝试当前mex+1能否匹配成功,若成功mex+=1,然后就做完了。[P10953 逃不掉的路](https://www.luogu.com.cn/problem/P10953)用边双连通分量缩点,显然缩点后的图是一棵树且边都是必须经过的,然后lca求两点距离。[P3469 [POI 2008] BLO-Blockade](https://www.luogu.com.cn/problem/P3469)找割点,然后算一下方案数就行。## D11模拟赛## D12[P5431 【模板】模意义下的乘法逆元 2](https://www.luogu.com.cn/problem/P5431)[P3807 【模板】卢卡斯定理 / Lucas 定理](https://www.luogu.com.cn/problem/P3807)[P4549 【模板】裴蜀定理](https://www.luogu.com.cn/problem/P4549)[P5656 【模板】二元一次不定方程 (exgcd)](https://www.luogu.com.cn/problem/P5656)[P1495 【模板】中国剩余定理(CRT)/ 曹冲养猪](https://www.luogu.com.cn/problem/P1495)[P4777 【模板】扩展中国剩余定理(EXCRT)](https://www.luogu.com.cn/problem/P4777)[P3846 【模板】BSGS / [TJOI2007] 可爱的质数](https://www.luogu.com.cn/problem/P3846)## D14[P1450 [HAOI2008] 硬币购物](https://www.luogu.com.cn/problem/P1450)先当完全背包跑一遍dp,然后直接容斥就行了。[P6076 [JSOI2015] 染色问题](https://www.luogu.com.cn/problem/P6076)## D15[CF343D Water Tree](https://www.luogu.com.cn/problem/CF343D)操作1只会对v的子树有影响,操作2只会对子树中含v的有影响。开两棵线段树,一棵维护差分,一棵是正常值,带一个时间戳,取时间戳最新的状态即可。[P2824 [HEOI2016/TJOI2016] 排序](https://www.luogu.com.cn/problem/P2824)考虑二分第q位的值,将>=x的值都设为1,其他的设为0,然后线段树跑一遍操作,若第q位为一,尝试更打,否则尝试更小,单次check复杂度 $O(n \log n)$,总复杂度 $O(n \log^2 n)$[P3567 [POI 2014] KUR-Couriers](https://www.luogu.com.cn/problem/P3567)开一棵主席树,二分即可。[P1712 [NOI2016] 区间](https://www.luogu.com.cn/problem/P1712)考虑双指针维护长度在[l,r]之间的线段的最大覆盖次数,开一棵线段树维护区间加和全局max即可,时间复杂度 $O(n \log n)$