Submission #132991

#TimeUsernameProblemLanguageResultExecution timeMemory
132991SOIVIEONEGlobal Warming (CEOI18_glo)C++14
10 / 100
160 ms2804 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 222222; ll a[N], l[N]; int main() { ll n, x; cin >> n >> x; for(int i = 1; i <= n; i ++) cin >> a[i]; int lis = 0; for(int i = 1; i <= n; i ++) { int id = lower_bound(l, l + lis, a[i]) - l; l[id] = a[i]; if(id == lis) lis ++; } cout << lis; }
#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...