CF813E Army Creation

CF813E Army Creation

考虑套用 HH 的项链做法,如果一个数前面第 \(k\) 个数小于 \(l\) 则可以选,那么用主席树维护值域线段树即可。