結果

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

テストケース

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

ソースコード

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;
                } else if(j == 1280) cout << "0" << "\n";
            }
        }
    }

    return 0;
}
0