正文
增加 61 行删除 1 行
1234124 行未改动全部展开12913013113213313413513678 行未改动21521621721821922022122246 行未改动26927027127227327427527664 行未改动34134234334434534634734810 行未改动35936036136236336436536636736836937037137237337437537615 行未改动### 去掉部分限制条件题目要求在某条件下的最值。我们在保证答案不变的情况下,把条件限制放开一些,从而可做。124 行未改动全部展开+ [P4577](https://www.luogu.com.cn/problem/P4577)待补。### 树上维护邻点信息和,每个点的维护分成父亲、儿子两部分+ [P14889](https://www.luogu.com.cn/problem/P14889)78 行未改动+ [P16610](https://www.luogu.com.cn/problem/P16610)待补。+ [P11209](https://www.luogu.com.cn/problem/P11209):::info[sol]46 行未改动+ [P15235](https://www.luogu.com.cn/problem/P15235)待补。+ [AT_abc451_g](https://www.luogu.com.cn/problem/AT_abc451_g)待补。64 行未改动[here](https://www.luogu.com.cn/article/jeom44uq).:::### 根号分治+ [P9809](https://www.luogu.com.cn/problem/P9809)10 行未改动### 哈希+ [P14889](https://www.luogu.com.cn/problem/P14889)这题在上面也有,?!有有!?待补。+ [P8819](https://www.luogu.com.cn/problem/P8819)待补。+ [P13723](https://www.luogu.com.cn/problem/P13723)待补。### 分讨~~真的是好题吗。~~15 行未改动123456124 行未改动全部展开13113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316478 行未改动24324424524624724824925025125225325425525625725825926026126226326426526626726826927046 行未改动31731831932032132232332432532632732864 行未改动39339439539639739839940040140240340410 行未改动41541641741841942042142242342442542642742842943043143243343443543615 行未改动施工中!/fendou### 去掉部分限制条件题目要求在某条件下的最值。我们在保证答案不变的情况下,把条件限制放开一些,从而可做。124 行未改动全部展开+ [P4577](https://www.luogu.com.cn/problem/P4577)待补。### 与某数大小关系取为 0/1,维护 01 序列+ [P2839](https://www.luogu.com.cn/problem/P2839):::info[sol]**如何判定一个区间的中位数大小?**(此处中位数定义是中间偏大那个)把一个区间中 $<x$ 数赋为 $-1$,$\ge x$ 数赋为 $1$,若区间和 $\ge 0$ 则该区间中位数 $\ge x$。所以对于一个数 $x$,判断有无满足左端点在 $[a,b]$,右端点在 $[c,d]$ 的区间中位数 $\ge x$,只需要判断 $[a,b-1]$ 赋值后的后缀最大值加 $[b,c]$ 赋值后的值加 $[c+1,d]$ 赋值后的前缀最大值是否 $\ge 0$。但是这需要 $O(n)$ 个线段树。我们发现每个数在 $x$ 增加时赋的值只会从 $1$ 变成 $-1$,于是主席树。:::+ [P2824](https://www.luogu.com.cn/problem/P2824):::info[sol]直接做是困难的,考虑**二分**最后数的大小 $x$,每次把 $\ge x$ 的数赋为 $1$,$<x$ 的数赋为 $0$,排序就变成了区间求 $0$ 个数、区间赋值。$O(n \log n \log V)$。:::+ [Kilonova1993](https://vjudge.net/problem/Kilonova-1993)待补。### 树上维护邻点信息和,每个点的维护分成父亲、儿子两部分+ [P14889](https://www.luogu.com.cn/problem/P14889)78 行未改动+ [P16610](https://www.luogu.com.cn/problem/P16610)待补。+ [P15664](https://www.luogu.com.cn/problem/P15664)待补。+ [P5159](https://www.luogu.com.cn/problem/P5159)待补。+ [P11008](https://www.luogu.com.cn/problem/P11008)待补。:::info[sol]当确定左上的 $(n-1)(m-1)$ 矩阵后,剩下的就确定了。所以答案为 $2^{(n-1)(m-1)}$。:::+ [P11209](https://www.luogu.com.cn/problem/P11209):::info[sol]46 行未改动+ [P15235](https://www.luogu.com.cn/problem/P15235)待补。+ [P14662](https://www.luogu.com.cn/problem/P14662)待补。+ [AT_abc451_g](https://www.luogu.com.cn/problem/AT_abc451_g)待补。64 行未改动[here](https://www.luogu.com.cn/article/jeom44uq).:::+ [P17024](https://www.luogu.com.cn/problem/P17024)待补。### 根号分治+ [P9809](https://www.luogu.com.cn/problem/P9809)10 行未改动### 哈希+ [P14889](https://www.luogu.com.cn/problem/P14889)待补。+ [P8819](https://www.luogu.com.cn/problem/P8819)待补。+ [P13723](https://www.luogu.com.cn/problem/P13723)待补。+ [P14567](https://www.luogu.com.cn/problem/P14567)待补。### 分讨~~真的是好题吗。~~15 行未改动