峰谷序列
給定有?nn?個數(shù)的?AA?序列:A_1,A_2,A_3\cdots A_nA?1??,A?2??,A?3???A?n??。對于這個序列,我們想得到一個子序列?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)A?p?1????,A?p?2?????A?p?i?????A?p?m????(1≤p?1??<p?2??<?p?i??<?<p?m??≤n),滿足?A_{p_1} \ge A_{p_2} \ge \cdots \ge A_{p_i} \le \cdots \le A_{p_m}A?p?1????≥A?p?2????≥?≥A?p?i????≤?≤A?p?
轉(zhuǎn)載于:https://www.cnblogs.com/superxuezhazha/p/6407782.html
總結(jié)
- 上一篇: BZOJ 2742: [HEOI2012
- 下一篇: android studio连接真机问题