Submission #1052051

#TimeUsernameProblemLanguageResultExecution timeMemory
1052051SacharlemagneFinancial Report (JOI21_financial)C++17
0 / 100
72 ms3780 KiB
#include <bits/stdc++.h> using namespace std; int main() { int n,d; cin >> n >> d; vector<int> v(n); for (int &i : v) cin >> i; vector<int> dp; // dp[i] = minimum ending of lis size i for (int i : v) { auto pt = upper_bound(dp.begin(), dp.end(), i); if (pt == dp.end()) dp.push_back(i); else *pt = i; } cout << dp.size(); }
#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...