版本比较
关于一类特殊的离散化方式—— RN 离散化
正文
增加 2 行删除 2 行
7 行未改动891011121314151617179 行未改动全部展开197198199200201202203204205128 行未改动全部展开7 行未改动# 前置知识[普通离散化(STL实现)](https://www.luogu.com.cn/problem/B3694),即使用元素在序列中的排名(严格的)做为下标。先回顾普通离散化写法。1. 排序2. 去重3. 压入哈希表(可选)179 行未改动全部展开tree[c*2].ad+=tree[c].ad;tree[c*2+1].ad+=tree[c].ad;tree[c*2].dt+=tree[c].ad*tree[c*2].len;tree[c*2+1].dt+=tree[c].ad*tree[c*2+1].len;tree[c].ad=0;}void build(int l,int r,int c){if(l==r)128 行未改动全部展开7 行未改动891011121314151617179 行未改动全部展开197198199200201202203204205128 行未改动全部展开7 行未改动# 前置知识[普通离散化(STL实现)](https://www.luogu.com.cn/problem/B3694),即使用元素在序列中的排名(严格的)做为下标。先回顾普通离散化写法。1. 排序2. 去重3. 压入哈希表(可选)179 行未改动全部展开tree[c*2].ad+=tree[c].ad;tree[c*2+1].ad+=tree[c].ad;tree[c*2].dt+=tree[c].ad*tree[c*2].len;tree[c*2+1].dt+=tree[c].ad*tree[c*2+1].len;tree[c].ad=0;}void build(int l,int r,int c){if(l==r)128 行未改动全部展开