求助树剖,WA 了,只有 10 分

P3384 【模板】重链剖分/树链剖分

@[Ptilopsis_w](/user/239167)
by Weight_of_the_Soul @ 2022-08-20 21:11:07


~~真有人不用宏定义表示左右儿子啊~~
by Ptilopsis_w @ 2022-08-20 21:44:05


~~小心写线段树3的时候恶心死~~
by Ptilopsis_w @ 2022-08-20 21:44:33


@[lordlaffey](/user/335136) 我懒了
by Ptilopsis_w @ 2022-08-20 21:47:06


@[Ptilopsis_w](/user/239167) help me,plz
by Weight_of_the_Soul @ 2022-08-20 21:48:37


(⊙﹏⊙)
by LordLaffey @ 2022-08-20 22:12:06


@[Napoleon_Bonaparte](/user/394729) 1. `tag` 需要取模 2. `change()` 中,应该是 `dat(p)+=(r(p)-l(p)+1)*x;` 3. 码风建议回炉
by LordLaffey @ 2022-08-20 22:23:52


还有就是 `ask()` 里也要**取模取模取模取模取模取模取模取模取模**
by LordLaffey @ 2022-08-20 22:25:54


~~围观~~
by Meteorshower_Y @ 2022-08-21 06:18:51


@[LordLaffey](/user/335136) 谢谢大佬,已经 A 了。
by Weight_of_the_Soul @ 2022-08-21 06:53:38


|