# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
522651 | Monarchuwu | Exhibition (JOI19_ho_t2) | C++17 | 54 ms | 1536 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
// sort các tranh giảm theo V, bằng V giảm S
// sort các khung giảm theo C
#include<iostream>
#include<algorithm>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
#define ff first
#define ss second
const int N = 1e5 + 9;
int n, m;
pii a[N];
int c[N];
int main() {
cin.tie(NULL)->sync_with_stdio(false);
cin >> n >> m;
for (int i = 1; i <= n; ++i) cin >> a[i].ss >> a[i].ff;
for (int i = 1; i <= m; ++i) cin >> c[i];
sort(a + 1, a + n + 1, greater<pii>());
sort(c + 1, c + m + 1, greater<int>());
int ans(0);
for (int i = 1, p; i <= n && ans < m; ++i)
if (c[ans + 1] >= a[i].ss) ++ans; // cho dùng khung thứ ans+1
cout << ans << '\n';
}
/** /\_/\
* (= ._.)
* / >0 \>1
**/
컴파일 시 표준 에러 (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... |