版本比较
线段树的进阶用法
正文
增加 3 行删除 3 行
802 行未改动全部展开80380480580680780780880981081197 行未改动90991091191291391391491591691793 行未改动1011101210131014101510151016101710181019502 行未改动全部展开802 行未改动全部展开 modify(1,line[i].l,line[i].r,line[i].mark); ans += t[1].len * (line[i + 1].h - line[i].h); } cout << ans;} }```
~~可以细读一下代码第三行。~~### AT_abc346_g [ABC346G] Alone97 行未改动 modify(1,line[i].l,line[i].r,line[i].mark); ans += t[1].len * (line[i + 1].h - line[i].h); } cout << ans;} }```# 线段树分治## 评价- 难度:$7$93 行未改动void undo(){ d[fa[st.top().first]] -= st.top().second; fa[st.top().first] = st.top().first; st.pop(); st.pop();}void dfs(int p,int l,int r){ bool flag = true;502 行未改动全部展开