Submission #311747

#TimeUsernameProblemLanguageResultExecution timeMemory
311747grtExhibition (JOI19_ho_t2)C++17
100 / 100
55 ms4600 KiB
#include <bits/stdc++.h> using namespace std; using vi = vector<int>; using ll = long long; using pi = pair<int,int>; #define ST first #define ND second #define PB push_back const int nax = 100 * 1000 + 10; int n, m; int c[nax]; pi p[nax]; int check() { int cur = m; for(int i = n; i >= 1; --i) { if(cur >= 1 && c[cur] >= p[i].ND) { cur--; } } return m - cur; } int main() { ios_base::sync_with_stdio(0); cin.tie(0); cin >> n >> m; for(int i = 1; i <= n; ++i) { cin >> p[i].ND >> p[i].ST; } for(int i = 1; i <= m; ++i) { cin >> c[i]; } sort(p+1, p+n+1); sort(c+1, c+m+1); //int l = 0, r = min(n, m), mid; //while(l <= r) { // mid = (l + r) / 2; // //} cout << check(); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...