Submission #581600

#TimeUsernameProblemLanguageResultExecution timeMemory
581600colossal_pepeFinancial Report (JOI21_financial)C++17
5 / 100
54 ms6184 KiB
#include <iostream> #include <vector> #include <algorithm> using namespace std; const int N = 300005; int n, d, a[N]; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cin >> n >> d; vector<int> lis; for (int i = 0; i < n; i++) { cin >> a[i]; auto itr = lower_bound(lis.begin(), lis.end(), a[i]); if (itr == lis.end()) lis.push_back(a[i]); else lis[itr - lis.begin()] = a[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...