| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 779597 | 79brue | Bodyguards (CEOI10_bodyguards) | C++17 | 87 ms | 13388 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int n, m;
pair<ll, ll> a[200002];
pair<ll, ll> b[200002];
ll c[2002], d[2002];
int main(){
    scanf("%d", &n);
    for(int i=1; i<=n; i++) scanf("%lld %lld", &a[i].first, &a[i].second);
    scanf("%d", &m);
    for(int i=1; i<=m; i++) scanf("%lld %lld", &b[i].first, &b[i].second);
    sort(a+1, a+n+1), reverse(a+1, a+n+1);
    sort(b+1, b+m+1), reverse(b+1, b+m+1);
    {
        int pnt = 0;
        for(int i=1; i<=n; i++) for(ll j=1; j<=a[i].second; j++) c[++pnt] = a[i].first;
        n = pnt;
        pnt = 0;
        for(int i=1; i<=m; i++) for(ll j=1; j<=b[i].second; j++) d[++pnt] = b[i].first;
        m = pnt;
    }
    int pnt = 1;
    for(int i=1; i<=n; i++){
        int st = pnt;
        while(c[i]){
            if(d[pnt]) c[i]--, d[pnt]--, pnt++;
            else pnt++;
            if(pnt==m+1) pnt=1;
            if(pnt == st){
                puts("0");
                return 0;
            }
        }
    }
    puts("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... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
