Submission #787350

#TimeUsernameProblemLanguageResultExecution timeMemory
787350makanhuliaExhibition (JOI19_ho_t2)C++17
100 / 100
46 ms3524 KiB
#include <bits/stdc++.h> #define int long long using namespace std; signed main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n, m; cin >> n >> m; vector<pair<int, int>> a(n); vector<int> b(m); for(auto &p : a) cin >> p.second >> p.first; for(int &p : b) cin >> p; sort(a.rbegin(), a.rend()); sort(b.rbegin(), b.rend()); int idx=0; for(int i=0; i<n && idx<m; i++) { if(a[i].second>b[idx]) continue; idx++; } cout << idx << '\n'; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...