Submission #671104

#TimeUsernameProblemLanguageResultExecution timeMemory
671104GrandTiger1729Exhibition (JOI19_ho_t2)C++17
100 / 100
47 ms4556 KiB
#include <iostream> #include <algorithm> using namespace std; int main(){ cin.tie(0)->sync_with_stdio(0); int n, m; cin >> n >> m; pair<int, int> a[n]; for (int i = 0; i < n; i++){ cin >> a[i].second >> a[i].first; } sort(a, a + n, greater<pair<int, int>>()); int b[m]; for (int i = 0; i < m; i++){ cin >> b[i]; } sort(b, b + m, greater<int>()); int i = 0, j = 0; while (i < n && j < m){ if (a[i].second <= b[j]){ i++, j++; }else{ i++; } } cout << j; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...