Submission #701948

#TimeUsernameProblemLanguageResultExecution timeMemory
701948ld_minh4354Financial Report (JOI21_financial)C++14
5 / 100
48 ms8184 KiB
#include<bits/stdc++.h> using namespace std; #define int long long #define fi first #define se second #define pb push_back signed main() { ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0); // freopen("input.000","r",stdin); // freopen("output.000","w",stdout); // srand((unsigned)time(NULL)); // rand() int n,d,i,a[300005],h[300005],ans; cin>>n>>d; for (i=0;i<n;i++) cin>>a[i]; for (i=ans=0;i<n;i++) { int p=lower_bound(h,h+ans,a[i])-h; h[p]=a[i]; ans=max(p+1,ans); } cout<<ans; }
#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...