链接:https://codeforces.ml/contest/1350/problem/D Slime has a sequence of positive integers a1,a2,…,ana1,a2,…,an. In one operation Orac can choose an arbitrary subsegment [l…r][l…r] of this sequence and replace all values al,al+1,…,aral,al+1,…,ar to the value of median of {al,al+1,…,ar}{al,al+1,…,ar}....