You can now perform zero to any number of operations, each of which can right shift the sequence.(if you right shift. Maximize the length of the longest non-decreasing sequence of the sequence.
Given a sequence a_1, a_2,..., a_n a 1 ,a 2 ,...,a n . You can now perform zero to any number of operations, each of which can right shift the sequence.(if you right shift p_1, p_2,....p_{n-1},p_n p 1 ,p 2 ,....p n−1 ,p n , you will get p_n, p_1, p_2, ..., p_{n-1} p n ,p 1 ,p 2 ,...,p n−1 ). Maximize the length of the longest non-decreasing sequence of the sequence.
标签: HBC237188ASimpleProblemaboutelection 贪心Shift LIS题解