Submission #465082

#TimeUsernameProblemLanguageResultExecution timeMemory
465082MKutayBozkurtExhibition (JOI19_ho_t2)C++17
100 / 100
64 ms1500 KiB
#include <iostream> #include <vector> #include <algorithm> using namespace std; int32_t main() { ios::sync_with_stdio(0); cin.tie(0); int n, m; cin >> n >> m; vector<pair<int, int>> a(n); vector<int> b(m); for (int i = 0; i < n; i++) { cin >> a[i].second >> a[i].first; } for (int i = 0; i < m; i++) { cin >> b[i]; } sort(a.rbegin(), a.rend()); sort(b.rbegin(), b.rend()); int i = 0; for (auto [x, y] : a) { if (i < m && y <= b[i]) i++; } cout << i << '\n'; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...