Submission #787345

#TimeUsernameProblemLanguageResultExecution timeMemory
787345makanhuliaExhibition (JOI19_ho_t2)C++17
100 / 100
44 ms1800 KiB
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n, m; cin >> n >> m; vector<pair<int, int>> v1(n); vector<int> v2(m); for(auto &p : v1) cin >> p.second >> p.first; sort(v1.rbegin(), v1.rend()); for(int &p : v2) cin >> p; sort(v2.rbegin(), v2.rend()); int id = 0; for (int i = 0; i < n and id < m; i++) { if (v1[i].second > v2[id]) continue; id++; } cout << id << '\n'; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...