Submission #885706

#TimeUsernameProblemLanguageResultExecution timeMemory
885706goodspeed0208Exhibition (JOI19_ho_t2)C++14
100 / 100
134 ms5972 KiB
#include<iostream> #include<algorithm> #include<vector> #include<queue> #include<stack> #include<map> #include<utility> #define int long long #define INF 10000000000000000 #define MOD 1000000007 #define pii pair<long long, long long> using namespace std; signed main() { int n, m; cin >> n >> m; vector<pii>v(n); vector<int>f(m); for (auto &i : v) cin >> i.second >> i.first; for (auto &i : f) cin >> i; sort(v.begin(), v.end()); sort(f.begin(), f.end()); int k = m-1; for (int i = n-1 ; i >= 0 ; i--) { if (k == -1) break; if (v[i].second <= f[k]) { k--; } } cout << m-k-1 << endl; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...