제출 #1129262

#제출 시각아이디문제언어결과실행 시간메모리
1129262tsengangExhibition (JOI19_ho_t2)C++20
10 / 100
1 ms328 KiB
#include <bits/stdc++.h> #define ll long long #define ff first #define ss second #define pb push_back #define all(x) x.begin(), x.end() #define vodka void #define ertunt return using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); ll n,m; cin >> n >> m; pair<ll,ll>a[n]; for(ll i = 0; i < n; i++)cin >> a[i].ss >> a[i].ff; ll c[m]; for(ll i = 0; i < n; i++)cin >> c[i]; sort(a,a+n); sort(c,c+m); ll ans = 0, cur = m-1; for(ll i = n-1; i >= 0; i--){ if(cur>=0 && c[cur]>=a[i].ss){ ans++; cur--; } } cout << ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...