文章分类 -  DP

摘要:最长上升子序列题,非常典型的dp题。 dp方程:f[i]=max(f[i],f[j]+1)。 代码如下: #include<bits/stdc++.h> using namespace std; int a[10001],f[10001]; int n,ans; int main() { cin>> 阅读全文
posted @ 2022-05-04 16:35 离弦 阅读(40) 评论(0) 推荐(1)