답안 #799698

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
799698 2023-07-31T20:34:33 Z Alkarat Exhibition (JOI19_ho_t2) C++14
0 / 100
1 ms 212 KB
#include <bits/stdc++.h>
#define ll long long
#define f first
#define s second
const int N=1e5+10;
using namespace std;
int n,m,sz[N];
pair<int,int>a[N];
int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    cin>>n>>m;
    for(int i=1; i<=n; i++) cin>>a[i].s>>a[i].f;
    for(int i=1; i<=m; i++) cin>>sz[i];
    sort(a+1,a+n+1);
    sort(sz+1,sz+m+1,greater<int>());
    int run=n,kq=0;
    for(int i=1; i<=m; i++)
    {
        while(run>0&&a[run].s>sz[i]) run--;
        if(!run) return cout<<kq,0;
        run--;
        kq++;
    }

}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 0 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 0 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 0 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -