#include <bits/stdc++.h>
using namespace std;
int n, m, b[100000];
array<int, 2> a[100000];
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cin >> n >> m;
for(int i = 0; i < n; i++)cin >> a[i][1] >> a[i][0];
for(int i = 0; i < m; i++) cin >> b[i];
sort(a, a + n); sort(b, b + m);
int ans = m - 1;
for(int i = n - 1; i >= 0; i++) if(ans >= 0 && a[i][1] <= b[ans]) ans--;
cout << m - 1 - ans << '\n';
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1082 ms |
212 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1082 ms |
212 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1082 ms |
212 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |