제출 #220574

#제출 시각아이디문제언어결과실행 시간메모리
220574pavementExhibition (JOI19_ho_t2)C++17
50 / 100
1098 ms6136 KiB
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define pf push_front
#define ppb pop_back
#define ppf pop_front
#define eb emplace_back
typedef long double ld;

int N, M, mto, S[100005], V[100005], C[100005];
pair<int, int> O[100005];

main() {
	ios::sync_with_stdio(0);
	cin.tie(0);
	cin >> N >> M;
	for (int i = 1; i <= N; i++)
		cin >> O[i].second >> O[i].first;
	sort(O + 1, O + 1 + N);
	for (int i = 1; i <= N; i++)
		tie(V[i], S[i]) = O[i];
	for (int i = 1; i <= M; i++) cin >> C[i];
	sort(C + 1, C + 1 + M, greater<int>());
	for (int i = 1; i <= N; i++) {
		int cur = 1, tt = 0;
		for (int j = i; j >= 1; j--)
			if (cur <= M && C[cur] >= S[j]) {
				tt++;
				cur++;
			}
		mto = max(mto, tt);
	}
	cout << mto << '\n';
}

컴파일 시 표준 에러 (stderr) 메시지

joi2019_ho_t2.cpp:16:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
 main() {
      ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...