# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
574693 | MateGiorbelidze | Exhibition (JOI19_ho_t2) | C++14 | 133 ms | 5548 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ff first
#define sc second
#define pb push_back
#define in insert
int main () {
ll n , m; cin>>n>>m;
pair <ll,ll> a[n + 1];
for (int i = 1; i <= n; i++) {
cin>>a[i].sc>>a[i].ff;
}
sort(a + 1, a + n + 1);
ll d[m + 1];
for (int i = 1; i <= m; i++) {
cin>>d[i];
}
sort(d + 1,d + m + 1);
ll r = m;
for (int i = n; i > 0; i--) {
ll val = a[i].ff, sz = a[i].sc;
if (r == 0) break;
if (d[r] >= sz) {
r--;
}
}
cout<<m - r;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |