Submission #787342

#TimeUsernameProblemLanguageResultExecution timeMemory
787342devariaotaExhibition (JOI19_ho_t2)C++17
100 / 100
46 ms2672 KiB
#include<bits/stdc++.h> using namespace std; vector<pair<int, int>> v1; vector<int> v2; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int n, m; cin >> n >> m; for (int i = 0; i < n; i++) { int a, b; cin >> a >> b; v1.push_back({b, a}); } sort(v1.rbegin(), v1.rend()); for (int i = 0; i < m; i++) { int a; cin >> a; v2.push_back(a); } 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...