Submission #465105

#TimeUsernameProblemLanguageResultExecution timeMemory
465105okaragulExhibition (JOI19_ho_t2)C++17
100 / 100
164 ms1484 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long #define endl "\n" #define all(aa) aa.begin(), aa.end() int main(){ int n, m; cin>>n>>m; vector<pair<int, int>> a(n); vector<int> b(m); for(auto &[v, s]:a) cin>>s>>v; for(auto &e:b) cin>>e; sort(all(a)); sort(all(b)); int ans=0, i=n-1, j=m-1; while(i>=0){ if(a[i].second<=b[j]) ans++, j--; i--; } cout<<ans<<endl; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...