#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;
}
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;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |