Submission #775479

# Submission time Handle Problem Language Result Execution time Memory
775479 2023-07-06T12:32:59 Z Trisanu_Das Exhibition (JOI19_ho_t2) C++17
0 / 100
1000 ms 212 KB
#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 -