답안 #101700

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
101700 2019-03-19T13:55:19 Z KCSC Exhibition (JOI19_ho_t2) C++14
0 / 100
4 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 = n; 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 2 ms 384 KB Output is correct
2 Correct 3 ms 384 KB Output is correct
3 Correct 2 ms 256 KB Output is correct
4 Correct 4 ms 384 KB Output is correct
5 Correct 2 ms 384 KB Output is correct
6 Correct 3 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 2 ms 384 KB Output is correct
2 Correct 3 ms 384 KB Output is correct
3 Correct 2 ms 256 KB Output is correct
4 Correct 4 ms 384 KB Output is correct
5 Correct 2 ms 384 KB Output is correct
6 Correct 3 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 2 ms 384 KB Output is correct
2 Correct 3 ms 384 KB Output is correct
3 Correct 2 ms 256 KB Output is correct
4 Correct 4 ms 384 KB Output is correct
5 Correct 2 ms 384 KB Output is correct
6 Correct 3 ms 384 KB Output is correct
7 Incorrect 2 ms 256 KB Output isn't correct
8 Halted 0 ms 0 KB -