给定有 nn 个数的 AA 序列:A_1,A_2,A_3cdots A_nA1,A2,A3⋯An。对于这个序列,我们想得到一个子序列 A_{p_1}, A_{p_2} cdots A_{p_i} cdots A_{p_m}(1 le p_1 < p_2<cdots p_i < cdots < p_m le n)Ap1,Ap2⋯Api⋯Apm(1≤p1<p2<⋯pi<⋯<pm≤n),满足 A_{p_1} ge A_{p_2} ge cdots ge A_{p_i} le cdots le A_{p_m}Ap1≥Ap2≥⋯≥Api≤⋯≤Ap