Submission #787337

# Submission time Handle Problem Language Result Execution time Memory
787337 2023-07-19T05:51:48 Z makanhulia Exhibition (JOI19_ho_t2) C++17
0 / 100
1 ms 212 KB
#include<bits/stdc++.h>
#define int long long
using namespace std;
signed main() {
  ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
  int n, m; cin >> n >> m;
  vector<pair<int, int>> a(n);
  vector<int> b(m);
  for(auto &p : a) cin >> p.second >> p.first;
  for(int &p : b) cin >> p;
  sort(a.begin(), a.end());
  sort(b.rbegin(), b.rend());
  int idx=0;
  for(auto p : a) {
    if(p.second<=b[idx]) idx++;
  }
  cout << idx << '\n';
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 1 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 1 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 1 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -