Submission #641035

#TimeUsernameProblemLanguageResultExecution timeMemory
641035kkkkkkkkExhibition (JOI19_ho_t2)C++14
100 / 100
159 ms4400 KiB
#include <bits/stdc++.h> using namespace std; int main() { int n,m; cin >> n >> m; vector<pair<int,int> > slika(n); vector<int> ramka(m); for (int i=0;i<n;i++) cin >> slika[i].second >> slika[i].first; for (int i=0;i<m;i++) cin >> ramka[i]; sort(slika.begin(),slika.end()); sort(ramka.begin(),ramka.end()); int index=n-1,vk=0; for (int i=m-1;i>=0;) { if (index==-1) break; if (ramka[i]<slika[index].second) index--; else i--,index--,vk++; } cout << vk << endl; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...