제출 #1124959

#제출 시각아이디문제언어결과실행 시간메모리
1124959imarnExhibition (JOI19_ho_t2)C++20
0 / 100
2 ms2632 KiB
#include<bits/stdc++.h> #pragma GCC optimize("O3") #pragma GCC target("avx2") #define ll long long #define pii pair<int,int> #define pll pair<ll,ll> #define plx pair<ll,int> #define f first #define s second #define pb push_back #define all(x) x.begin(),x.end() #define vi vector<int> #define vvi vector<vi> #define pp pair<ll,int> #define ub(x,i) upper_bound(all(x),i)-x.begin() using namespace std; const int mxn=1e5+5; vector<int>g[mxn]; int main(){ ios_base::sync_with_stdio(0);cin.tie(0); int n,m;cin>>n>>m; pii a[n];int c[n]; for(int i=0;i<n;i++)cin>>a[i].s>>a[i].f; for(int i=0;i<m;i++)cin>>c[i]; sort(a,a+n);sort(c,c+m,greater<int>()); int cur=0; for(int i=n-1;i>=0;i--){ if(cur==m)break; if(a[i].s<=c[cur])cur++; }cout<<cur; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...