Submission #167264

#TimeUsernameProblemLanguageResultExecution timeMemory
167264combi1k1Exhibition (JOI19_ho_t2)C++14
100 / 100
67 ms4604 KiB
#include<bits/stdc++.h> using namespace std; #define X first #define Y second typedef pair<int,int> ii; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n; cin >> n; int m; cin >> m; vector<ii> Picts(n); vector<int> Frame(m); for(ii &p : Picts) cin >> p.Y >> p.X; for(int&s : Frame) cin >> s; sort(Picts.begin(),Picts.end(),greater<ii>()); sort(Frame.begin(),Frame.end(),greater<int>()); int p = 0; for(int i = 0 ; i < m ; ++i, ++p) { for(; p < n && Picts[p].Y > Frame[i] ; ++p); if (p == n) { cout << i; exit(0); } } cout << m << endl; } /* 8 8 508917604 35617051 501958939 840246141 485338402 32896484 957730250 357542366 904165504 137209882 684085683 775621730 552953629 20004459 125090903 607302990 433255278 979756183 28423637 856448848 276518245 314201319 666094038 149542543 */
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...