# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
120139 | antimirage | Exhibition (JOI19_ho_t2) | C++14 | 124 ms | 6108 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
/**
GOT A FEELING THAT I"M GOING UNDER
**/
#include <bits/stdc++.h>
#define fr first
#define sc second
#define mk make_pair
#define pb push_back
#define all(s) s.begin(), s.end()
using namespace std;
const int N = 1e5 + 5;
int n, m, x, y, c[N], ans, last = 1e9 + 7;
multiset < pair <int, int>, greater < pair <int, int> > > st;
main(){
cin >> n >> m;
for (int i = 1; i <= n; i++) {
scanf("%d%d", &x, &y);
st.insert( mk( y, x ) );
}
for (int i = 1; i <= m; i++) {
scanf("%d", &c[i]);
}
sort(c + 1, c + m + 1);
for (int i = m; i >= 1; i--) {
while (!st.empty() && st.begin()->sc > c[i])
st.erase(st.begin());
if (st.empty()) break;
st.erase(st.begin());
ans++;
}
cout << ans << endl;
}
컴파일 시 표준 에러 (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... |