# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
127596 | arnold518 | Exhibition (JOI19_ho_t2) | C++14 | 94 ms | 4984 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int MAXN = 1e5;
int N, M;
pii V[MAXN+10];
int S[MAXN+10], C[MAXN+10];
int ans;
int main()
{
int i, j;
scanf("%d%d", &N, &M);
for(i=1; i<=N; i++) scanf("%d%d", &V[i].second, &V[i].first);
for(i=1; i<=M; i++) scanf("%d", &C[i]);
sort(V+1, V+N+1);
sort(C+1, C+M+1);
for(i=1; i<=N; i++) S[i]=V[i].second;
for(i=N, j=M; i>=1 && j>=1;)
{
if(C[j]<S[i]) i--;
else i--, j--, ans++;
컴파일 시 표준 에러 (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... |