Submission #336438

#TimeUsernameProblemLanguageResultExecution timeMemory
336438arujbansalExhibition (JOI19_ho_t2)C++17
100 / 100
61 ms4588 KiB
#include <bits/stdc++.h> #define rng_init mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()) using namespace std; using ll = long long; const int MAXN = 1e5 + 5, INF = 1e9 + 5; void solve() { int n, m; cin >> n >> m; vector<pair<int, int>> pictures(n); for (auto &[val, sz] : pictures) cin >> sz >> val; vector<int> frames(m); for (auto &x : frames) cin >> x; sort(pictures.begin(), pictures.end(), greater<>()); sort(frames.begin(), frames.end()); int ans = 0; for (const auto &[val, sz] : pictures) ans += (frames[m - ans - 1] >= sz); cout << ans; } signed main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int tc = 1; // cin >> tc; while (tc--) solve(); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...