Submission #615516

#TimeUsernameProblemLanguageResultExecution timeMemory
615516nohaxjustsofloExhibition (JOI19_ho_t2)C++17
100 / 100
60 ms4428 KiB
#include <bits/stdc++.h> #include <iostream> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; typedef tree<ll,null_type,less_equal<ll>,rb_tree_tag,tree_order_statistics_node_update> order_set; mt19937 mt_rand(chrono::high_resolution_clock::now().time_since_epoch().count()); //uniform_int_distribution<int> gen; ///(min, max) //int random() {return gen(mt_rand);} const int mxN=2e5+5; const int mod=998244353; const int mxlogN=40; const int mxK=26; const int inf=2e9; const int K=600; pair<int,int> a[mxN]; int b[mxN]; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n, m; cin >> n >> m; for(int i=0; i<n; i++) cin >> a[i].second >> a[i].first; sort(a,a+n); for(int i=0; i<m; i++) cin >> b[i]; sort(b,b+m); int j=m-1; for(int i=n-1; i>=0; i--) if(~j&&a[i].second<=b[j]) j--; cout << m-1-j << "\n"; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...