摘要:
"传送门" Solution: 就是树链剖分入门题啦~ cpp // luogu judger enable o2 include define N 30005 define M 200005 define lson now 1; build(l,m,lson); build(m+1,r,rson) 阅读全文
摘要:
"传送门" Solution: 我们只需要采用和树链剖分近似的思想——把整个树的dfs序整理出来,排成线型。 这样一个节点的子树肯定是连续的一段,于是乎就可以用树状数组维护单点修改+区间查询的任务了。 cpp include include define N 100005 using namespa 阅读全文