This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <iostream>
#include <algorithm>
int n, m;
std::pair <int, int> picture[100005];
int frame[100005];
int main()
{
std::ios_base::sync_with_stdio(false);
std::cin.tie(0);
std::cout.tie(0);
std::cin >> n >> m;
for(int i = 1; i <= n; i++)
{
std::cin >> picture[i].second >> picture[i].first;
}
for(int i = 1; i <= m; i++)
{
std::cin >> frame[i];
}
std::sort(picture + 1, picture + n + 1);
std::sort(frame + 1, frame + m + 1);
int cur = m;
for(int i = n; i >= 1; i--)
{
if(cur > 0 and frame[cur] >= picture[i].second)
{
cur--;
}
}
std::cout << m - cur;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |