#include<iostream>
#include<vector>
using namespace std;
int main()
{
int n;
while(cin>>n){
vector<int> vec;
for(int i=0;i<n;++i){
int temp;cin>>temp;
vec.push_back(temp);
}
vector<int> boom;
int cut=0;
for(auto it=vec.begin();it!=vec.end();++it){
int mark=0;
auto iter=boom.begin();
for(int i=0;i<boom.size();++i,++iter){
if((*iter)>=(*it)){
(*iter)=(*it);mark=1;break;
}
}
if(mark ==0){
cut++;
boom.push_back((*it));
}
}
cout<<cut<<endl;
}
return 0;
}
82.hdu--1257--最少拦截系统
最新推荐文章于 2021-03-09 21:06:25 发布