Submission #763347

#TimeUsernameProblemLanguageResultExecution timeMemory
763347giaminh2211Financial Report (JOI21_financial)C++14
0 / 100
9 ms1236 KiB
#include <bits/stdc++.h> #define taskname "CDKG" using namespace std; using ll=long long; using ldb=long double; using ull=unsigned long long; int n; int a[100002]; int b[100002]; int kq=0; int k; void nhap(){ int d; cin >> n >> d; for(int i=1; i<=n; i++){ cin >> a[i]; } } void solve(){ b[0]=-1e9; for(int i=1; i<=n; i++){ b[i]=1e9; } for(int i=1; i<=n; i++){ k=lower_bound(b+1,b+i,a[i])-b; b[k]=a[i]; kq=max(kq,k); } cout << k; } int main(){ //freopen(taskname".INP", "r", stdin); //freopen(taskname".OUT", "w", stdout); ios_base::sync_with_stdio(false); cin.tie(nullptr); nhap(); solve(); }
#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...