Submission #1282232

#TimeUsernameProblemLanguageResultExecution timeMemory
1282232SSKMFExhibition (JOI19_ho_t2)C++20
100 / 100
35 ms1580 KiB
#include <bits/stdc++.h> using namespace std; pair <int , int> candidat[100001]; int sir[100001]; int main () { ios :: sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int candidati , cantitate; cin >> candidati >> cantitate; for (int indice = 1 ; indice <= candidati ; indice++) { cin >> candidat[indice].second >> candidat[indice].first; } for (int indice = 1 ; indice <= cantitate ; indice++) { cin >> sir[indice]; } sort(candidat + 1 , candidat + candidati + 1); sort(sir + 1 , sir + cantitate + 1); int maxim = 0; for (int indice = cantitate , __indice = candidati ; indice && __indice ; __indice--) { if (sir[indice] >= candidat[__indice].second) { maxim++; indice--; } } cout << maxim; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...