| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 111797 | 吴亦洵 | 求最长不下降序列 | C++ | Wrong Answer | 0 | 0 MS | 252 KB | 373 | 2023-11-25 08:09:57 |
#include<bits/stdc++.h> using namespace std; int a[201],n,dp[201],maxn; int main(){ while(cin>>a[++n]) dp[n]=1; n--; for(int i=n-1;i>0;i--) for(int j=i+1;j<=n;j++) if(dp[i]<dp[j]+1&&a[i]<a[j]) dp[i]=dp[j]+1; for(int i=1;i<=n;i++){ maxn=max(maxn,dp[i]); } cout<<"max="<<maxn; return 0; }