이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define int long long
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pb push_back
#define ff first
#define ss second
using namespace std;
const int N=2*1e5;
int n,m,k,i,j,ans;
signed main() {
cin>>n>>m;
vector<int> a(m);
vector<pii> p(n);
for(int k=0; k<n; k++) cin>>p[k].ss>>p[k].ff;
for(int k=0; k<m; k++)cin>>a[k];
sort(a.rbegin(),a.rend());
sort(p.rbegin(),p.rend());
int pos=0;
for(int k=0; k<n; k++){
if(p[k].ss<=a[pos])pos++;
}
cout<<pos;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |