版本比较
语法 / STL 热知识
正文
增加 9 行删除 9 行
185 行未改动全部展开18618718818919019119219319418 行未改动2132142152162172182192202218 行未改动23023123223323423523623723827 行未改动26626726826927027127227327427527627764 行未改动34234334434534634734834935021 行未改动37237337437537637737837938026 行未改动185 行未改动全部展开# string.find/rfindstr,ind.find 从前往后匹配,返回第一个匹配串左端点,找不到返回 $-1$。rfind 从后往前匹配,返回第一个匹配串右端点,找不到返回 $-1$。# string.find_first_not_of / find_last_not_of找不匹配的。18 行未改动$[l,r)$ 中等于 $x$ 的范围。要求升序。复杂度 $\log$# adjacent_find$[l,r)$ 中最左的相邻相同位置,即查找 2 个连续相等# remove / remove_if / replace / replace_if8 行未改动要求升序,复杂度 $\log$。# boolalphaislower, isupper, isdigit, isalpha, isalnum,toupper, tolower# stringstream结合 ofstream 批量造数据。27 行未改动tree<Info1,Info2,less<>,rb_tree_tag,tree_order_statistics_node_update>t;// Info1 -> Info2(null_type)成员函数:find, insert(返回 pair<it,bool>), erase, lower_bound, upper_bound 同 set;order_of_key(w): 找到键值 w 的排名(是小于 $w$ 的值的个数)find_by_order(k): 第 k 大的指针join(x): 把 x 合并进来,并删除 xsplit(val,t): 保留 $\le$ val 的部分,$>$ val 的放在 b 里## pair_heap__gnu_pbds::priority_queue<int>q;64 行未改动默认都是 0-index,左闭右开功能、要求、复杂度## convolution $\dag$改 appendix.html 为 convolution.html 即可看到英文版https://atcoder.github.io/ac-library/production/document_en/convolution.html## dsu- dsu d(int n)21 行未改动- [l, r)## lazysegtree $\dag$https://atcoder.github.io/ac-library/production/document_en/lazysegtree.html## math- ll pow_mod(ll x, ll n, int m)- 快速幂 $x^n \bmod m$- $0 \le n, 1 \le m$- ll inv_mod(ll x, ll m)26 行未改动185 行未改动全部展开18618718818919019119219319418 行未改动2132142152162172182192202218 行未改动23023123223323423523623723827 行未改动26626726826927027127227327427527627764 行未改动34234334434534634734834935021 行未改动37237337437537637737837938026 行未改动185 行未改动全部展开# string.find/rfindstr,ind.find 从前往后匹配,返回第一个匹配串左端点,找不到返回 $-1$。rfind 从后往前匹配,返回第一个匹配串右端点,找不到返回 $-1$。# string.find_first_not_of / find_last_not_of找不匹配的。18 行未改动$[l,r)$ 中等于 $x$ 的范围。要求升序。复杂度 $\log$# adjacent_find$[l,r)$ 中最左的相邻相同位置,即查找 2 个连续相等# remove / remove_if / replace / replace_if8 行未改动要求升序,复杂度 $\log$。# boolalphaislower, isupper, isdigit, isalpha, isalnum,toupper, tolower# stringstream结合 ofstream 批量造数据。27 行未改动tree<Info1,Info2,less<>,rb_tree_tag,tree_order_statistics_node_update>t;// Info1 -> Info2(null_type)成员函数:find, insert(返回 pair<it,bool>), erase, lower_bound, upper_bound 同 set;order_of_key(w): 找到键值 w 的排名(是小于 $w$ 的值的个数)find_by_order(k): 第 k 大的指针join(x): 把 x 合并进来,并删除 xsplit(val,t): 保留 $\le$ val 的部分,$>$ val 的放在 b 里## pair_heap__gnu_pbds::priority_queue<int>q;64 行未改动默认都是 0-index,左闭右开功能、要求、复杂度## convolution $\dag$改 appendix.html 为 convolution.html 即可看到英文版https://atcoder.github.io/ac-library/production/document_en/convolution.html## dsu- dsu d(int n)21 行未改动- [l, r)## lazysegtree $\dag$https://atcoder.github.io/ac-library/production/document_en/lazysegtree.html## math- ll pow_mod(ll x, ll n, int m)- 快速幂 $x^n \bmod m$- $0 \le n, 1 \le m$- ll inv_mod(ll x, ll m)26 行未改动