#include <bits/stdc++.h>
using namespace std;
set<int> s;
int main()
{
int n,x;
cin >> n;
for (int i = 0; i < n; i++)
{
cin >> x;
auto e=s.lower_bound(x);
if(e!=s.end())
{
s.erase(e);
}
s.insert(x);
}
cout<<s.size();
}
L2-014 列车调度 (25 分)
最新推荐文章于 2022-08-25 07:48:24 发布