Submission #377893

#TimeUsernameProblemLanguageResultExecution timeMemory
377893astoriaExhibition (JOI19_ho_t2)C++14
100 / 100
65 ms2028 KiB
#include "bits/stdc++.h" using namespace std; #define fi first #define se second int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n,m; cin>>n>>m; pair<int,int> vs[n+5]; for(int i=1; i<=n; i++) cin>>vs[i].se>>vs[i].fi; sort(vs+1,vs+n+1); int c[m+5]; for(int i=1; i<=m; i++) cin>>c[i]; sort(c+1,c+m+1); int t = m+1; //last taken for(int i=n; i>=1; i--){ if(t==1) break; if(c[t-1] >= vs[i].se) t--; } cout<<(m+1-t); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...