Submission #465104

#TimeUsernameProblemLanguageResultExecution timeMemory
465104ardaak33Exhibition (JOI19_ho_t2)C++17
100 / 100
202 ms5004 KiB
#include <bits/stdc++.h> using namespace std; int main() { int n,m; cin >> n >> m; vector<pair<int, int> >v; vector<int> frame; for (int i = 0; i < n; i++) { int value,size; cin >> size >> value; v.push_back(make_pair(value,size)); } sort(v.begin(),v.end()); for (int i = 0; i < m; i++){ int sayi=0; cin >> sayi; frame.push_back(sayi); } sort(frame.begin(),frame.end()); int cevap=0; int indis=frame.size()-1; for (int i = n-1; i >= 0; i--) { if(v[i].second <=frame[indis]){ cevap++; indis--; } } cout << cevap; } /* 4 4 10 20 3 19 7 18 5 17 10 2 6 */
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...