Submission #364605

#TimeUsernameProblemLanguageResultExecution timeMemory
364605RainbowbunnyExhibition (JOI19_ho_t2)C++17
100 / 100
60 ms4588 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...