結果

問題 No.678 2Dシューティングゲームの必殺ビーム
ユーザー dazydazy
提出日時 2018-05-03 03:30:07
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 904 bytes
コンパイル時間 1,282 ms
コンパイル使用メモリ 144,048 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-10 09:11:05
合計ジャッジ時間 2,028 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 2 ms
4,376 KB
testcase_10 AC 2 ms
4,376 KB
testcase_11 AC 1 ms
4,384 KB
testcase_12 AC 2 ms
4,376 KB
testcase_13 AC 2 ms
4,376 KB
testcase_14 AC 2 ms
4,380 KB
testcase_15 WA -
testcase_16 AC 2 ms
4,380 KB
testcase_17 AC 1 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include "bits/stdc++.h"
#define fastcin {\
    cin.tie(0);\
    ios::sync_with_stdio(false);\
}
using namespace std;

int main() {
    fastcin;

    int N, LB, RB;
    int f[1281] = {-1};
    int a[1281] = {-1};
    cin >> N >> LB >> RB;

    for(int i = 0; i < N; i++) {
        int XL, YU, XR, YD;
        cin >> XL >> YU >> XR >> YD;
        if(XL < 0) XL = 0;
        if(XR > 1280) XR = 1280;
        if(YD > 1680) YD = 1680;
        for(int j = XL; j <= XR; j++) {
            if(f[j] < YD) {
                f[j] = YD;
                a[j] = i;
            }
        }
    }

    for(int i = 0; i < N; i++) {
        for(int j = 0; j < 1281; j++) {
            if(j >= LB && j <= RB) {
                if(a[j] == i) {
                    cout << "1" << "\n";
                    break;
                }
            }
            if(j == 1280) cout << "0" << "\n";
        }
    }

    return 0;
}
0