제출 #826559

#제출 시각아이디문제언어결과실행 시간메모리
826559dijbkrGlobal Warming (CEOI18_glo)C++14
10 / 100
35 ms3808 KiB
#include<bits/stdc++.h> typedef long long ll; typedef unsigned long long ull; using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n,x; cin >> n >> x; int a[n+4]; int d[n+4]; for (int i=1; i<=n; i++) { cin >> a[i]; } int sized=1; d[1]=a[1]; for (int i=2; i<=n; i++) { int k=lower_bound(d+1,d+sized+1,a[i])-d; d[k]=a[i]; if (k>sized) { sized=k; } } cout << sized; }
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...