제출 #1093320

#제출 시각아이디문제언어결과실행 시간메모리
1093320emptypringlescanExhibition (JOI19_ho_t2)C++17
100 / 100
42 ms5592 KiB
#include <bits/stdc++.h> using namespace std; int32_t main() { ios::sync_with_stdio(false); cin.tie(nullptr); int n,m; cin >> n >> m; pair<long long,long long> arr[n]; for(int i=0; i<n; i++) cin >> arr[i].second >> arr[i].first; sort(arr,arr+n); long long brr[m]; for(int i=0; i<m; i++) cin >> brr[i]; sort(brr,brr+m); int ans=0,cnt=m-1; for(int i=n-1; i>=0; i--){ if(cnt<0) break; if(arr[i].second<=brr[cnt]){ ans++; cnt--; } } cout << ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...