# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
97623 | maruii | Exhibition (JOI19_ho_t2) | C++14 | 95 ms | 1668 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;
using pii = pair<int, int>;
int N, M, C[100000];
pii A[100000];
int main(){
scanf("%d%d",&N,&M);
for(int i=0; i<N; ++i) scanf("%d%d",&A[i].second,&A[i].first);
for(int i=0; i<M; ++i) scanf("%d",C+i);
sort(C, C+M, greater<int>()), sort(A, A+N, greater<pii>());
int ans=0;
for(int i=0; i<N && ans<M; ++i) if(C[ans]>=A[i].second) ++ans;
printf("%d",ans);
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... |