注意 所有的导弹系统 想用哪个就用哪个。。。。。
AC代码如下:
#include <iostream>
#include <cstdio>
#include <cstring>
#include <string>
using namespace std;
int main(){
int height[1000] = {30000};
int N;
while( scanf( "%d", &N ) != EOF ){
int i = 1, j;
height[1] = 30000;
while( N-- ){
int temp;
cin >> temp;
for( j = 1; j <= i; j++ ){
if( temp <= height[j] ){
height[j] = temp;
break;
}
}
if( j > i ){
height[++i] = temp;
}
}
cout << i << endl;
}
return 0;
}