(那道题讨论区不存在就只能发学术了)
如果询问不保证 s[l…r]s[l \dots r]s[l…r] 是 RBS 该怎么做?
只会 O(nn logn)O(n\sqrt n\;\text{log}n)O(nnlogn) 的做法,求教。
CF1625E2