单调队列
SpongeBob_Y
这个作者很懒,什么都没留下…
展开
-
POJ 2823 Sliding Window (单调队列)
题目链接 Description An array of size n ≤ 106 is given to you. There is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the knumbers in the...原创 2019-01-10 16:50:07 · 154 阅读 · 0 评论 -
Power oj 2837: 剑道万古如长夜(单调队列优化DP)
题目链接 Description 李淳罡正在和别人战斗,他一共有 NN 把宝剑,选择每把宝剑都要付出一定的代价。为了能够顺利的战胜敌人,在连续 MM 把宝剑中至少要有一把宝剑要被选择。请计算总共最少花费多少代价,李淳罡才能顺利的战胜敌人 Input 第一行一个整数 TT (T≤10)(T≤10) ,表示测试数据组数,对于每组测试 : 第二行:两个整数 NN (1≤N≤2⋅106)(1≤...原创 2019-03-29 15:25:04 · 196 阅读 · 0 评论