正文
增加 76 行删除 154 行
10 行未改动11121314151617182 行未改动212223242526272829303132105 行未改动全部展开1381391401411421431441451461471481491501511521531541556 行未改动162163164165166167168169111 行未改动全部展开28128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443510 行未改动每个数有效的 $\bmod$ 有 $\log$ 个,每次单点改最多增加 $\log$ 个,所以直接记录最大值,区间模时若最大值不小于要模的数就暴力递归,这是 $\log^2$ 的。:::+ [P8969](https://www.luogu.com.cn/problem/P8969):::info[sol]2 行未改动线段树 tag 优先级:先加一个数,再按 `popcount` 对应至某个数。$O(n \log n \log V)$。:::+ [P11721](https://www.luogu.com.cn/problem/P11721)待补。+ [P11945](https://www.luogu.com.cn/problem/P11945):::info[sol]105 行未改动全部展开待补。+ [P7124](https://www.luogu.com.cn/problem/P7124)待补。+ [P16702](https://www.luogu.com.cn/problem/P16702)待补。+ [P12401](https://www.luogu.com.cn/problem/P12401)待补。+ [P10071](https://www.luogu.com.cn/problem/P10071)待补。6 行未改动[here](https://www.luogu.com.cn/article/cc9aop2b).:::### 数(据结构)形结合+ [P14638](https://www.luogu.com.cn/problem/P14638)111 行未改动全部展开+ [P11364](https://www.luogu.com.cn/problem/P11364)待补。+ [P9058](https://www.luogu.com.cn/problem/P9058)待补。## DP/数数~~感觉以后再多点这个可以单独开啊。~~ 已经是这样了!+ [P12017](https://www.luogu.com.cn/problem/P12017)待补。+ [P6146](https://www.luogu.com.cn/problem/P6146)待补。+ [AT_abc422_f](https://www.luogu.com.cn/problem/AT_abc422_f)待补。+ [P6007](https://www.luogu.com.cn/problem/P6007)待补。+ [P1800](https://www.luogu.com.cn/problem/P1800)待补。+ [P8745](https://www.luogu.com.cn/problem/P8745)待补。+ [P6189](https://www.luogu.com.cn/problem/P6189)待补。+ [P3244](https://www.luogu.com.cn/problem/P3244)待补。+ [P7519](https://www.luogu.com.cn/problem/P7519)待补。+ [P3592](https://www.luogu.com.cn/problem/P3592)待补。+ [P6835](https://www.luogu.com.cn/problem/P6835)待补。+ [P5303](https://www.luogu.com.cn/problem/P5303)待补。+ [P7118](https://www.luogu.com.cn/problem/P7118)待补。+ [P8321](https://www.luogu.com.cn/problem/P8321)待补。+ [P2467](https://www.luogu.com.cn/problem/P2467)待补。+ [P4609](https://www.luogu.com.cn/problem/P4609)待补。+ [P11704](https://www.luogu.com.cn/problem/P11704)/[CF348D](https://www.luogu.com.cn/problem/CF348D)待补。+ [CF1585F](https://www.luogu.com.cn/problem/CF1585F)待补。+ [P12444](https://www.luogu.com.cn/problem/P12444)待补。+ [P15564](https://www.luogu.com.cn/problem/P15564)待补。+ [P16973](https://www.luogu.com.cn/problem/P16973)待补。+ [P14364](https://www.luogu.com.cn/problem/P14364)待补。+ [P14022](https://www.luogu.com.cn/problem/P14022)待补。+ [P5400](https://www.luogu.com.cn/problem/P5400)待补。+ [P8329](https://www.luogu.com.cn/problem/P8329)待补。+ [P6076](https://www.luogu.com.cn/problem/P6076)待补。+ [P16416](https://www.luogu.com.cn/problem/P16416)待补。+ [P10202](https://www.luogu.com.cn/problem/P10202)待补。+ [P8340](https://www.luogu.com.cn/problem/P8340)待补。+ [AT_arc165_e](https://www.luogu.com.cn/problem/AT_arc165_e)待补。+ [CF101E](https://www.luogu.com.cn/problem/CF101E)待补。+ [AT_xmascon22_f](https://www.luogu.com.cn/problem/AT_xmascon22_f)待补。+ [P16923](https://www.luogu.com.cn/problem/P16923)待补。+ [P17284](https://www.luogu.com.cn/problem/P17284)待补。+ [P11767](https://www.luogu.com.cn/problem/P11767)/[P2592](https://www.luogu.com.cn/problem/P2592)待补。+ [CF578D](https://www.luogu.com.cn/problem/CF578D)待补。10 行未改动1112131415161718192021222324252627282 行未改动3132333435363738394041424344454647484950515253545556105 行未改动全部展开1621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002016 行未改动208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239111 行未改动全部展开35135235335435535635710 行未改动每个数有效的 $\bmod$ 有 $\log$ 个,每次单点改最多增加 $\log$ 个,所以直接记录最大值,区间模时若最大值不小于要模的数就暴力递归,这是 $\log^2$ 的。:::+ [P5500](https://www.luogu.com.cn/problem/P5500):::info[sol]考虑离线,以 $r$ 从小到大排序。这个时候到某个询问,每种数最后出现的那个一定最优。所以双指针,用树状数组维护每种数最后出现的下标,就是一只 $\log$。:::+ [P8969](https://www.luogu.com.cn/problem/P8969):::info[sol]2 行未改动线段树 tag 优先级:先加一个数,再按 `popcount` 对应至某个数。$O(n \log n \log V)$。:::+ [P3616](https://www.luogu.com.cn/problem/P3616):::info[sol]刻画一下,**答案是 $\sum_{i=1}^n [a_{i-1}<x\le a_i]$。**那么树状数组即可。:::+ [P11721](https://www.luogu.com.cn/problem/P11721):::info[sol]按时刻建线段树。在每个节点维护一个 `vector`,从左到右存做了这个区间的操作之后,对应的 $k,b$ 不同的每个段(每个操作只会贡献 $\log$ 个段)。一个节点满了再 `up`,然后查询在 $\log$ 个 `vector` 上二分,就是 $\log^2$ 的。:::+ [P11945](https://www.luogu.com.cn/problem/P11945):::info[sol]105 行未改动全部展开待补。+ [P7124](https://www.luogu.com.cn/problem/P7124):::info[sol]考虑在 $\text{dfn}$ 序列上分治。每次 $[l,mi][mi+1,r]$,有一些点的子树会横跨 $mi$,由于这是 $\text{dfn}$,所以这些点是一条链上的,则子树区间必然互相包含。从里到外加,之后全删掉,再递归 $[l,mi]$ 和 $[mi+1,r]$ 即可。:::+ [P16702](https://www.luogu.com.cn/problem/P16702):::info[sol]单侧递归,好玩的。[here](https://www.luogu.com.cn/article/h2xwxb5n).:::+ [P12401](https://www.luogu.com.cn/problem/P12401):::info[sol]考虑 $v_i,v_{N-i+1}$ 这样一对会导致哪些 $[A,B]$ 不合法。设 $v_i \le v_{N-i+1}$,那么就是与 $[v_i + 1 , v_{N-i+1}]$ 有交的 $[A,B]$。考虑对于每一对,在区间上覆盖。那么就要维护区间中所有值都为零的子区间个数,区间加。线段树维护区间最小值、区间中所有值都为区间最小值的子区间个数即可。:::+ [P10071](https://www.luogu.com.cn/problem/P10071)待补。6 行未改动[here](https://www.luogu.com.cn/article/cc9aop2b).:::+ [P7560](https://www.luogu.com.cn/problem/P7560):::info[sol]先考虑算出白嫖事件送给的是从最开始算,加入这个点的第几个人。一个线段树区间加区间对 $0$ 取 $\max$ 维护每个点当前人数,一个树状数组维护每个点加入的总人数。到白嫖事件,求得这两个分别为 $a,b$。若 $a \ge k$,则有人被赠送,她是从最开始算,加入这个点的第 $b-a+k$ 个人。算出来之后,在时间轴上面整体二分即可。:::+ [P10764](https://www.luogu.com.cn/problem/P10764)待补。+ [P14447](https://www.luogu.com.cn/problem/P14447)待补。### 数(据结构)形结合+ [P14638](https://www.luogu.com.cn/problem/P14638)111 行未改动全部展开+ [P11364](https://www.luogu.com.cn/problem/P11364)待补。## 一种可恶的东西先放两个[题](https://www.luogu.com.cn/training/1083117)[单](https://www.luogu.com.cn/training/1081975)。