結果

問題 No.2687 所により大雨
ユーザー t98slidert98slider
提出日時 2024-03-22 02:46:26
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
RE  
実行時間 -
コード長 811 bytes
コンパイル時間 2,365 ms
コンパイル使用メモリ 208,304 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2024-03-22 02:46:30
合計ジャッジ時間 4,287 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
6,676 KB
testcase_01 AC 35 ms
6,676 KB
testcase_02 AC 35 ms
6,676 KB
testcase_03 AC 35 ms
6,676 KB
testcase_04 AC 35 ms
6,676 KB
testcase_05 AC 1 ms
6,676 KB
testcase_06 AC 2 ms
6,676 KB
testcase_07 RE -
testcase_08 AC 2 ms
6,676 KB
testcase_09 AC 2 ms
6,676 KB
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
testcase_21 AC 2 ms
6,676 KB
testcase_22 RE -
testcase_23 RE -
testcase_24 RE -
testcase_25 RE -
testcase_26 RE -
testcase_27 RE -
testcase_28 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = long long;

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n, m, k;
    cin >> n >> m;
    vector<pair<int,int>> L(n), R(m);
    bool flg = false;
    for(auto &&[l, r] : L){
        cin >> l >> r;
        l *= 2, r *= 2;
    }
    for(auto &&[l, r] : R){
        cin >> l >> r;
        l *= 2, r *= 2;
    }
    sort(L.begin(), L.end());
    sort(R.begin(), R.end());
    for(int i = 0; i + 1 < L.size() && !flg; i++){
        if(L[i + 1].first <= L[i].second) flg = true;
    }
    for(int i = 0; i + 1 < R.size() && !flg; i++){
        if(R[i + 1].first <= R[i].second) flg = true;
    }
    cin >> k;
    if(flg){
        for(int i = 0; i < k; i++) cout << 1 << (i + 1 == k ? '\n' : ' ');
        return 0;
    }
    return 1;
}
0