摘要: 这道题可以用类似单调队列的思路实现,因为其本质上是一个滑动窗口,虽然有两重循环,但是因为i和j是总的N被分摊之后的数字,所以真实的时间复杂度依然是O(N) #include <iostream> #include <stdio.h> #include <algorithm> #include <st 阅读全文
posted @ 2024-01-21 00:15 Gold_stein 阅读(31) 评论(0) 推荐(0) 编辑