Submission #1027097

#TimeUsernameProblemLanguageResultExecution timeMemory
1027097giorgi_pkhaladzeExhibition (JOI19_ho_t2)C++17
50 / 100
42 ms4696 KiB
#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() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cin>>n>>m; vector<int> a(m); vector<pii> p(n); for(k=0; k<n; k++){ int x,y; cin>>x>>y; p[k]={y,x}; } for(k=0; k<m; k++){ int x; cin>>x; a[k]=x; } sort(p.rbegin(),p.rend()); sort(a.rbegin(),a.rend()); ans=0; for(k=0; k<n; k++){ if(p[k].ss<=a[ans])ans++; } cout<<ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...