이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <vector>
#include <algorithm>
#include <string>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <cstdio>
#include <memory.h>
#include <cmath>
#include <array>
using namespace std;
void re(int& x);
template<class T, class... Ts> void re(T& t, Ts&... ts);
void pr(int x);
void pr(const char *x);
void ps();
template<class T, class... Ts> void ps(const T& t, const Ts&... ts);
#ifdef FFDBG
#else
#define dbg(x...) dsfdsfsdfasd
#endif
void re(int& x) { scanf("%d", &x); }
template<class T, class... Ts> void re(T& t, Ts&... ts) { 
    re(t); re(ts...); 
}
void pr(int x) { printf("%d", x); }
void pr(const char *x) { printf("%s", x); }
void ps() { pr("\n"); }
template<class T, class... Ts> void ps(const T& t, const Ts&... ts) { 
    pr(t); if (sizeof...(ts)) pr(" "); ps(ts...); 
}
typedef pair<int, int> pii;
#define rep(i, a, b) for(int i = a; i < (b); ++i)
int n,m;
pii pictures[110000];
int frames[110000];
void solve()
{
    re(n,m);
    rep(i,0,n) re(pictures[i].second, pictures[i].first);
    rep(i,0,m) re(frames[i]);
    sort(pictures,pictures+n,greater<pii>());
    sort(frames,frames+m,greater<int>());
    int curf = 0;
    rep(i,0,n) if (curf < m && pictures[i].second <= frames[curf]) curf++;
    ps(curf);
}
int main() {
    solve();
}
컴파일 시 표준 에러 (stderr) 메시지
joi2019_ho_t2.cpp: In function 'void re(int&)':
joi2019_ho_t2.cpp:32:24: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
 void re(int& x) { scanf("%d", &x); }
                   ~~~~~^~~~~~~~~~| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... |