正文
增加 3 行删除 3 行
802 行未改动全部展开80380480580680780880981081197 行未改动90991091191291391491591691793 行未改动101110121013101410151016101710181019502 行未改动全部展开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();}void dfs(int p,int l,int r){bool flag = true;502 行未改动全部展开802 行未改动全部展开80380480580680780880981081197 行未改动90991091191291391491591691793 行未改动101110121013101410151016101710181019502 行未改动全部展开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();}void dfs(int p,int l,int r){bool flag = true;502 行未改动全部展开