题意 链接:https://www.nowcoder.com/acm/contest/144/J 来源:牛客网 Given n positive integers, for all (i, j) where 1 ≤ i, j ≤ n and i ≠ j, output the maximum value among . means the Lowe…
题意略 coding出来其实很简单,按照题目要求填写数组,然后倒着搜维护一个单调队列就可以了,维护单调队列的时候要注意单调队列中元素数量等价于目标区间$$count_i$$的值,即$$count_i = q.size()$$ AC代码: #include <iostream> #include <queue> #includ…