az,线段树的复杂度能过吗

P3865 【模板】ST 表

显然可以
by Gym_nastics @ 2022-07-10 22:18:02


@[_Kouki_](/user/364847) 并不行。本题要求单次查询 $O(1)$
by Static_int @ 2022-07-10 22:18:23


你们的结论不一样??
by _Kouki_ @ 2022-07-10 22:18:53


放心,分块都能卡过
by ADay @ 2022-07-10 22:19:53


显然可以,线段树的时间复杂度为$O(Nlog_2{N}+Mlog_2{N})$约为$3.5*10^7$,显然可以通过。 我的[线段树AC记录](https://www.luogu.com.cn/record/79019722)
by anonymous_letter @ 2022-07-10 22:23:19


@[Static_int](/user/731608) $O(m \log {n})$ 算一算就是能过啊
by Gym_nastics @ 2022-07-10 22:24:34


@[_Kouki_](/user/364847) 脸好疼……这边查出问题了,线段树立调用了个多余的函数 `push_down`,导致常数增大。删掉就可以了
by Static_int @ 2022-07-10 22:25:19


就是没有修改操作没必要写线段树。
by Gym_nastics @ 2022-07-10 22:25:23


@[Gym_nastics](/user/397317) qs,这不是在线问题
by anonymous_letter @ 2022-07-10 22:26:56


@[Static_int](/user/731608) ![](//图.tk/c)谢谢解决了
by _Kouki_ @ 2022-07-10 22:28:00


| 下一页