제출 #210215

#제출 시각아이디문제언어결과실행 시간메모리
210215shart23Exhibition (JOI19_ho_t2)C++14
100 / 100
81 ms5656 KiB
#include <bits/stdc++.h> #define int long long #define endl "\n" using namespace std; signed main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); int n, m, s1, v1; cin >> n >> m; vector<pair<int, int>> pict; for (int i = 0; i < n; i++) { cin >> s1 >> v1; pict.emplace_back(v1, s1); } vector<int> board(m); for (int &el : board) { cin >> el; } sort(pict.begin(), pict.end()); sort(board.begin(), board.end()); int j = m - 1; for (int i = n - 1; i >= 0; i--) { if (pict[i].second <= board[j]) { j--; if (j < 0) { break; } } } cout << m - j - 1 << endl; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...