| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 355373 | dolphingarlic | Handcrafted Gift (IOI20_gift) | C++14 | 237 ms | 24916 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "gift.h"
#include <bits/stdc++.h>
using namespace std;
int construct(int n, int r, vector<int> a, vector<int> b, vector<int> x) {
    vector<pair<int, int>> sing, doub, itv;
    for (int i = 0; i < r; i++) {
        if (x[i] == 1) sing.push_back({a[i], b[i]});
        else doub.push_back({a[i], b[i]});
    }
    sort(sing.begin(), sing.end());
    pair<int, int> curr = {-1, -1};
    for (pair<int, int> i : sing) {
        if (i.first > curr.second) {
            itv.push_back(curr);
            curr = i;
        } else curr.second = max(curr.second, i.second);
    }
    itv.push_back(curr);
    sort(doub.begin(), doub.end());
    int s_ptr = 1;
    for (pair<int, int> i : doub) {
        while (s_ptr < itv.size() - 1 && itv[s_ptr].second < i.first)
            s_ptr++;
        if (i.first == i.second || (i.first >= itv[s_ptr].first && i.second <= itv[s_ptr].second))
            return 0;
    }
    string ret(n, '.');
    char c = 'R';
    for (int i = 1; i < itv.size(); i++) {
        for (int j = itv[i - 1].second + 1; j < itv[i].first; j++) {
            ret[j] = c;
            c = 'R' + 'B' - c;
        }
        for (int j = itv[i].first; j <= itv[i].second; j++)
            ret[j] = c;
        c = 'R' + 'B' - c;
    }
    for (int j = itv.back().second + 1; j < n; j++) {
        ret[j] = c;
        c = 'R' + 'B' - c;
    }
    craft(ret);
    return 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... | ||||
