Submission #574719

# Submission time Handle Problem Language Result Execution time Memory
574719 2022-06-09T10:14:24 Z luka1234 Exhibition (JOI19_ho_t2) C++14
0 / 100
0 ms 212 KB
#include <bits/stdc++.h>
#define ll long long
#define ff first
#define ss second
#define db double
using namespace std;
int n,m;
pair<int,int> a[100001];
int b[100001];
int main(){
	cin>>n>>m;
	for(int k=1;k<=n;k++){
		cin>>a[k].ss>>a[k].ff;
	}
	for(int k=1;k<=m;k++){
		cin>>b[k];
	}
	sort(b+1,b+m+1);
	int bolo=m;
	int cnt=0;
	for(int k=n;k>=1;k--){
		if(a[k].ss<=b[bolo]){
			cnt++;
			bolo--;
		}
	}
	cout<<cnt;
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 0 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 0 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 0 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -