Submission #230376

# Submission time Handle Problem Language Result Execution time Memory
230376 2020-05-10T00:06:54 Z nickmet2004 Exhibition (JOI19_ho_t2) C++11
0 / 100
4 ms 384 KB
#include<bits/stdc++.h>
#define f first
#define s second
#define ll long long

using namespace std;

int n , m;
pair<ll , ll> p[100005];
ll fr[100005];

int main (){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cin >> n >> m;
    for(int i = 0; i < n; ++i) cin >> p[i].s >> p[i].f;
    for(int i = 0; i < m; ++i) cin >> fr[i];
    sort(p , p + n); sort(fr , fr + m);
    int ans = 0;
    for(int i = n - 1; i >= 0; --i){
        if(fr[m - ans] >= p[i].s) ans++;
        if(ans == m) break;
    }cout << ans << endl;
}
# Verdict Execution time Memory Grader output
1 Correct 4 ms 384 KB Output is correct
2 Incorrect 4 ms 384 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 4 ms 384 KB Output is correct
2 Incorrect 4 ms 384 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 4 ms 384 KB Output is correct
2 Incorrect 4 ms 384 KB Output isn't correct
3 Halted 0 ms 0 KB -