标签:iostream code name pac main names amp clu class
#include<iostream> using namespace std; int a[10005],vis[10005]; int main(){ int n;cin>>n; int maxx=0; int max; //dp[n]=dp[n-1]+n; //2 5 3 4 1 7 6 //1 2 2 3 1 4 4 for(int i=0;i<n;i++){ cin>>a[i]; max=0; int maxi; for(int j=0;j<i;j++){ if(a[i]>a[j]&&vis[j]>max) max=vis[j]; } vis[i]=max+1; if(maxx<vis[i]) maxx=vis[i]; } /*for(int i=0;i<n;i++) cout<<vis[i]<<" "; cout<<endl;*/ cout<<maxx<<endl; }
标签:iostream code name pac main names amp clu class
原文地址:https://www.cnblogs.com/astonc/p/10046306.html