Submission #574720

#TimeUsernameProblemLanguageResultExecution timeMemory
574720luka1234Exhibition (JOI19_ho_t2)C++14
100 / 100
155 ms1580 KiB
#include <bits/stdc++.h> #define ll long long #define ff first #define ss second #define db double using namespace std; int n,m; pair<int,int> a[100001]; int b[100001]; int main(){ cin>>n>>m; for(int k=1;k<=n;k++){ cin>>a[k].ss>>a[k].ff; } sort(a+1,a+n+1); for(int k=1;k<=m;k++){ cin>>b[k]; } sort(b+1,b+m+1); int bolo=m; int cnt=0; for(int k=n;k>=1;k--){ if(a[k].ss<=b[bolo]){ cnt++; bolo--; } } cout<<cnt; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...