답안 #372465

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
372465 2021-02-28T09:31:43 Z mariowong Exhibition (JOI19_ho_t2) C++14
0 / 100
1 ms 364 KB
#include <bits/stdc++.h>
using namespace std;

long long n,m,pt,b[100005];
pair<long long,long long> a[100005];
int main(){
	ios::sync_with_stdio(false);
	cin >> n >> m;
	for (int i=1;i<=n;i++){
		cin >> a[i].second >> a[i].first;
	}
	for (int i=1;i<=m;i++){
		cin >> b[i];
	}
	sort(a+1,a+1+n); reverse(a+1,a+1+n);sort(b+1,b+1+m); 
	for (int i=m;i>=1;i--){
		if (pt+1 <= n && a[pt+1].second <= b[i])
		pt++;
	}
	cout << pt << "\n";
	return 0;
}	
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Correct 1 ms 364 KB Output is correct
6 Correct 1 ms 364 KB Output is correct
7 Incorrect 1 ms 364 KB Output isn't correct
8 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Correct 1 ms 364 KB Output is correct
6 Correct 1 ms 364 KB Output is correct
7 Incorrect 1 ms 364 KB Output isn't correct
8 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Correct 1 ms 364 KB Output is correct
6 Correct 1 ms 364 KB Output is correct
7 Incorrect 1 ms 364 KB Output isn't correct
8 Halted 0 ms 0 KB -