Submission #851736

#TimeUsernameProblemLanguageResultExecution timeMemory
851736TrumlingFinancial Report (JOI21_financial)C++14
5 / 100
100 ms5280 KiB
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define pb push_back #define F first #define S second #define enter cout<<'\n'; #define INF 999999999999 #define MOD 1000000007 #define all(x) x.begin(),x.end() int main() { ll n,d; cin>>n>>d; ll x; vector<int>v; for(int i=0;i<n;i++) { cin>>x; if(!v.size() || v[v.size()-1]<x) v.pb(x); else { ll pos=lower_bound(all(v),x)-v.begin(); v[pos]=x; } } cout<<v.size(); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...