| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 126515 | tri | Exhibition (JOI19_ho_t2) | C++14 | 288 ms | 5148 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pi;
typedef vector<int> vi;
typedef vector<ld> vd;
typedef vector<ll> vl;
#define pb push_back
#define f first
#define s second
int main() {
int N, M;
cin >> N >> M;
vector<pi> pictures;
for (int i = 0; i < N; i++) {
int s, v;
cin >> s >> v;
pictures.pb({v, s});
}
vi frames;
for (int i = 0; i < M; i++) {
int s;
cin >> s;
frames.pb(s);
}
sort(pictures.begin(), pictures.end());
sort(frames.begin(), frames.end());
reverse(pictures.begin(), pictures.end());
reverse(frames.begin(), frames.end());
int nP = 0, ans = 0;
for (int i = 0; i < frames.size(); i++) {
while (nP < pictures.size() && pictures[nP].s > frames[i]) {
nP++;
}
if (nP == pictures.size()) {
break;
}
ans++;
nP++;
}
cout << ans << endl;
}컴파일 시 표준 에러 (stderr) 메시지
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
