Submission #129372

#TimeUsernameProblemLanguageResultExecution timeMemory
129372iqvocucExhibition (JOI19_ho_t2)C++14
100 / 100
393 ms2160 KiB
/*** * _ _ _ _ _ _ _ _ _ _ * | |_ ___ (_) ___| |__ ___ __| | ___ (_) __ _(_) __ _ _ _ _ __ | |__ _ _| |_ ___ _ __ ___ _ _ ___ _ _| |_ ___ (_) * | __/ _ \| |/ __| '_ \ / _ \ / _` |/ _ \| |/ _` | |/ _` | | | | '_ \| '_ \| | | | __/ _ \ '_ ` _ \| | | |/ _ \ | | | __/ _ \| | * | || (_) | | (__| | | | (_) | (_| | (_) | | (_| | | (_| | |_| | |_) | | | | |_| | || __/ | | | | | |_| | __/ |_| | || (_) | | * \__\___/|_|\___|_| |_|\___/ \__,_|\___/|_|\__, |_|\__,_|\__, | .__/|_| |_|\__,_|\__\___|_| |_| |_|\__, |\___|\__,_|\__\___/|_| * |___/ |___/|_| |___/ */ #include<bits/stdc++.h> using namespace std; vector<int>r; vector<pair<int,int>>v1; int main(){ int n,m,s,v,x; cin>>n>>m; for(int i=0;i<n;i++){ cin>>s>>v; v1.push_back(make_pair(v,s)); } for(int i=0;i<m;i++){ cin>>x; r.push_back(x); } sort(v1.begin(),v1.end()); sort(r.begin(),r.end()); int ans=m-1; for(int i=n-1;i>=0;i--){ if(v1[i].second<=r[ans]) ans--; if(ans<0) break; } cout<<m-ans-1; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...