# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
938052 | Andrey | Exhibition (JOI19_ho_t2) | C++14 | 38 ms | 4700 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;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n,m,a,b,ans = 0;
cin >> n >> m;
vector<pair<int,int>> haha(n);
vector<int> bruh(m);
for(int i = 0; i < n; i++) {
cin >> a >> b;
haha[i] = {b,a};
}
for(int i = 0; i < m; i++) {
cin >> bruh[i];
}
sort(haha.begin(),haha.end());
sort(bruh.begin(),bruh.end());
int y = m-1;
for(int i = n-1; i >= 0; i--) {
if(y >= 0 && bruh[y] >= haha[i].second) {
y--;
}
}
cout << m-1-y;
return 0;
}
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... |