O(n)算法

· · 题解

https://www.sciencedirect.com/science/article/pii/S0045790622007364

直接上论文。 本题有线性解法。