最短题解
2024-11-17 10:54:28
发布于:江苏
19阅读
1回复
1点赞
#include <bits/stdc++.h>
using namespace std;
int h;
vector<int> v;
int main()
{
while (cin >> h && h)
{
auto it = lower_bound(v.begin(), v.end(), h);
if (it == v.end())
v.push_back(h);
else
*it = h;
}
cout << v.size();
return 0;
}
全部评论 1
哦!苏老师
2天前 来自 江苏
0
有帮助,赞一个