Submission #1295871

#TimeUsernameProblemLanguageResultExecution timeMemory
1295871AbdullahIshfaqExhibition (JOI19_ho_t2)C++20
100 / 100
48 ms6300 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define MOD 998244353 void solve() { int n, m, ans = 0; cin >> n >> m; vector<vector<int>> v(n, vector<int>(2)); vector<int> c(m); for (int i = 0; i < n; i++) { cin >> v[i][1] >> v[i][0]; } for (int i = 0; i < m; i++) { cin >> c[i]; } sort(v.rbegin(), v.rend()); sort(c.rbegin(), c.rend()); for (int i = 0; i < n; i++) { ans += (v[i][1] <= c[ans]); } cout << ans << '\n'; } int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); ll t = 1; // cin >> t; // cout << fixed << setprecision(12); for (ll i = 1; i <= t; i++) { solve(); } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...