Submission #999277

#TimeUsernameProblemLanguageResultExecution timeMemory
999277vjudge1LIS (INOI20_lis)C++17
20 / 100
4030 ms552 KiB
#include <bits/stdc++.h> using namespace std; int main () { int q; cin >> q; vector<int> a; while(q--){ int j, v; cin >> j >> v; a.insert(a.begin()+j-1, v); multiset<int> s; for(int i:a) { s.insert(i); auto it = s.lower_bound(i); it++; if(it != s.end()) { s.erase(it); } } cout << s.size() << "\n"; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...