随笔分类 - DP-LIS
摘要:题目链接 题目 Peter decided to wish happy birthday to his friend from Australia and send him a card. To make his present more mysterious, he decided to make
阅读全文
摘要:题目链接 首先第一问很好求,就是求最长下降子序列,\(n\leqslant 5000\),\(O(n^2)\) 暴力转移就行。 而这道题的难点就在于去重。 对于 \(i\) 和 \(j\)(\(i>j\)),如果 \(a_i=a_j\) 且 \(dp_i=dp_j\),说明他们是相同的,\(i\)
阅读全文