Submission #1091726

#TimeUsernameProblemLanguageResultExecution timeMemory
1091726BlueGlaucus1Exhibition (JOI19_ho_t2)C++17
0 / 100
1 ms348 KiB
#include <iostream> #include <algorithm> using namespace std; int main(){ int n,m; cin >> n >> m; pair<int, int> paint[n]; int frame[m]; for(int i =0; i <n;i++){ cin >> paint[i].second >> paint[i].first; } for(int i = 0; i <m;i++){ cin >> frame[i]; } sort(paint, paint+n); sort(frame, frame+m); int frame_ind = 0; int answer = 0; for(int i = 0; i <n;i++){ int size = paint[i].second; while(frame_ind < n && frame[frame_ind] < size){ frame_ind++; } if(frame_ind==n){ cout << answer <<'\n'; return 0; } answer +=1; } cout << answer <<'\n'; return 0 ; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...