Submission #1103989

#TimeUsernameProblemLanguageResultExecution timeMemory
1103989vjudge1Global Warming (CEOI18_glo)C++17
10 / 100
25 ms1772 KiB
#include <bits/stdc++.h> using namespace std; const int N = 2e5 + 3; int ar[N]; int main() { cin.tie(nullptr)->sync_with_stdio(false); int n, x; cin >> n >> x; for(int i=1; i<=n; ++i) cin >> ar[i]; vector<int> lis; for(int i=1; i<=n; ++i) { auto t = lower_bound(lis.begin(), lis.end(), ar[i]); if(t == lis.end()) { lis.emplace_back(ar[i]); }else { *t = ar[i]; } } cout << lis.size() << '\n'; return 0; }
#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...