# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1281268 | flo | Exhibition (JOI19_ho_t2) | C++20 | 39 ms | 2920 KiB |
#include <bits/stdc++.h>
#define task "testing"
#define int long long
#define multitest 0
using namespace std;
const int N = 1e5;
int c[N+5];
pair<int, int> a[N+5];
void flo(int ID) {
int n, m; cin >> n >> m;
for (int x = 1; x <= n; x++) {
cin >> a[x].second >> a[x].first;
}
sort(a+1, a+n+1);
for (int x = 1; x <= m; x++) cin >> c[x];
sort(c+1, c+m+1, greater<int>());
int cnt = 1;
for (int x = n; x >= 1 && cnt <= m; x--) {
if (a[x].second <= c[cnt]) cnt++;
}
cout << cnt-1 << "\n";
}
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
if (fopen(task".inp", "r")) {
freopen(task".inp", "r", stdin);
freopen(task".out", "w", stdout);
}
int TCS = 1, ID = 1;
if (multitest) {
cin >> TCS;
}
while (TCS--) flo(ID++);
return 0;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |