Submission #320289

#TimeUsernameProblemLanguageResultExecution timeMemory
320289kaplanbarUntitled (POI11_tem)C++14
0 / 100
285 ms21728 KiB
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ios_base::sync_with_stdio(false); cin.tie(0); int n; cin >> n; vector<int> v; for(int i = 0; i < n; i++) { int x, y; cin >> x >> y; auto it = upper_bound(v.begin(), v.end(), y); if(it == v.end()) { v.push_back(x); } else { *it = x; } } cout << v.size(); 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...
#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...