Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
193009 zjx1015 导弹拦截 C++ 解答错误 0 0 MS 256 KB 544 2025-05-04 21:23:56

Tests(0/10):


#include<bits/stdc++.h> using namespace std; int main(){ int temp; vector<int> v; while(scanf("%d",&temp)!=EOF) v.insert(v.begin(),temp); vector<int> dp; for(auto num:v){ auto pos=upper_bound(dp.begin(),dp.end(),num); if(pos==dp.end())dp.push_back(num); else *pos=num; } printf("%d ",dp.size()); vector<int> dpp; for(auto num:v){ auto pos=lower_bound(dpp.begin(),dpp.end(),num); if(pos==dpp.end())dpp.push_back(num); else *pos=num; } printf("%d",dpp.size()); return 0; }


测评信息: