Codeforces Round #569 题解 CF1179A Valeriy and Deque 有一个双端队列,每次取队首两个值,将较小值移动到队尾,较大值位置不变.多组询问求第\(m\)次操作时队首两个数. 显然\(O(n)\)次以内队首变成了最大值,之后就循环了,暴力前\(O(n)\)个操作的答案即可 https://codeforces.com/contest/1179/submission/55878330 CF1179B Tolik and His Uncle 有一个\(n*m\…