답안 #101698

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
101698 2019-03-19T13:54:17 Z KCSC Exhibition (JOI19_ho_t2) C++14
0 / 100
3 ms 384 KB
#include <bits/stdc++.h>
using namespace std;

const int DIM = 100005;

int frm[DIM];
pair<int, int> pic[DIM];

int main(void) {
#ifdef HOME
	freopen("exhibition.in", "r", stdin);
	freopen("exhibition.out", "w", stdout);
#endif
	int n, 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 >> frm[i]; }
	sort(pic + 1, pic + n + 1);
	sort(frm + 1, frm + m + 1);
	int ans = 0;
	for (int i = m, it = m; i >= 1; --i) {
		while (it > 0 and frm[it] < pic[i].second) {
			--it; }
		if (!it) {
			break; }
		else {
			++ans; --it; } }
	cout << ans;
	return 0; }
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 384 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Correct 3 ms 256 KB Output is correct
4 Correct 2 ms 256 KB Output is correct
5 Correct 2 ms 384 KB Output is correct
6 Correct 2 ms 384 KB Output is correct
7 Incorrect 2 ms 256 KB Output isn't correct
8 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 384 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Correct 3 ms 256 KB Output is correct
4 Correct 2 ms 256 KB Output is correct
5 Correct 2 ms 384 KB Output is correct
6 Correct 2 ms 384 KB Output is correct
7 Incorrect 2 ms 256 KB Output isn't correct
8 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 384 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Correct 3 ms 256 KB Output is correct
4 Correct 2 ms 256 KB Output is correct
5 Correct 2 ms 384 KB Output is correct
6 Correct 2 ms 384 KB Output is correct
7 Incorrect 2 ms 256 KB Output isn't correct
8 Halted 0 ms 0 KB -