Submission #787362

#TimeUsernameProblemLanguageResultExecution timeMemory
787362makanhuliaExhibition (JOI19_ho_t2)C++17
100 / 100
45 ms3020 KiB
#include<bits/stdc++.h> #define int long long using namespace std; signed main() { ios::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.begin(), a.end(), greater<pair<int, int>>()); sort(b.begin(), b.end(), greater<int>()); int idx=0; for(auto p : a) if(idx<m && p.second<=b[idx]) idx++; cout << idx << '\n'; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...