답안 #954793

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
954793 2024-03-28T14:39:44 Z 4QT0R Exhibition (JOI19_ho_t2) C++17
0 / 100
1 ms 348 KB
#include <bits/stdc++.h>
using namespace std;
#define pii pair<int,int>

pii pic[100003];
int fra[100003];

void init(int &n, int &m){
	cin >> n >> m;
	for (int i = 1; i<=n; i++){
		cin >> pic[i].second >> pic[i].first;
	}
	for (int i = 1; i<=m; i++){
		cin >> fra[i];
	}
	sort(pic+1,pic+n+1);
	sort(fra+1,fra+n+1);
}

int main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);

	int n,m;
	init(n,m);
	int ans=0,frames=m;
	for (int i = n; i>=1; i--){
		if (frames>0 && fra[frames]>=pic[i].second){
			frames--;
			ans++;
		}
	}
	cout << ans << '\n';
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Incorrect 0 ms 348 KB Output isn't correct
8 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Incorrect 0 ms 348 KB Output isn't correct
8 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Incorrect 0 ms 348 KB Output isn't correct
8 Halted 0 ms 0 KB -