竞赛
考级
ok呀这道题也是肥肠简单啊,但是我被他卡了足足20分钟原因是k=n时也可以而我没判断,太坑了 这道题就是维护前缀和还有前后缀最小值,然后遍历一遍判断一下就行了,详见代码
#include <iostream> #include <vector> #include <deque> using namespace std; typedef long long ll; // 避免累加溢出 int main() { ios::sync_with_stdio(false); cin.tie(nullptr); // 加速输入输出,处理1e6数据必备 }
提交答案之后,这里将显示提交结果~