Submission #1015246

#TimeUsernameProblemLanguageResultExecution timeMemory
1015246snpmrnhlolExhibition (JOI19_ho_t2)C++17
0 / 100
0 ms444 KiB
#include<bits/stdc++.h> using namespace std; const int N = 2e5; int picval[N],picsz[N],p[N],framesz[N]; int main(){ int n,m; cin>>n>>m; for(int i = 0;i < n;i++){ cin>>picsz[i]>>picval[i]; p[i] = i; } for(int i = 0;i < m;i++){ cin>>framesz[i]; } sort(framesz,framesz + m); sort(p,p + n,[&](int a,int b){ return picval[a] < picval[b]; }); int pt = m - 1; for(int i = n - 1;i >= 0;i--){ int id = p[i]; if(pt != -1 && picsz[id] <= framesz[pt]){ pt--; } } cout<<m - 1 - pt; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...