。。。不懂为什么这题是DP
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int const MAXN = 100010;
int a[MAXN];
inline int Max(int a,int b){
return a>b?a:b;
}
int main(){
int n;
while(~scanf("%d",&n)){
for(int i = 1;i <= n;i++){
scanf("%d",&a[i]);
}
int cnt = 0;
for(int i = 1;i <= n;i++){
int m = a[i];
if(m > 0){
for(int j = i + 1;j <= n;j++){
if(m > a[j] && a[j]){
m = a[j];
a[j] = 0;
cnt++;
}
}
}
}
printf("%d\n",n - cnt);
}
return 0;
}
/*
8
20 16 15 16 13 10 14 10
2
*/