結果

問題 No.678 2Dシューティングゲームの必殺ビーム
ユーザー Pump0129Pump0129
提出日時 2018-05-11 16:45:17
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 984 bytes
コンパイル時間 102 ms
コンパイル使用メモリ 10,800 KB
実行使用メモリ 8,332 KB
最終ジャッジ日時 2023-09-10 12:37:29
合計ジャッジ時間 1,391 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,824 KB
testcase_01 AC 17 ms
7,896 KB
testcase_02 AC 15 ms
7,740 KB
testcase_03 AC 16 ms
7,896 KB
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 AC 15 ms
7,792 KB
testcase_09 RE -
testcase_10 RE -
testcase_11 AC 16 ms
7,712 KB
testcase_12 AC 16 ms
7,764 KB
testcase_13 AC 17 ms
7,800 KB
testcase_14 AC 17 ms
7,788 KB
testcase_15 AC 17 ms
8,332 KB
testcase_16 AC 16 ms
7,744 KB
testcase_17 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

if __name__ == "__main__":
    n, lb, lr = tuple(map(int, input().split(" ")))
    enemy_list = []
    ans_list = []
    laser_range = [False for i in range(1281)]
    for i in range(lb, lr + 1):
        laser_range[i] = True
    for i in range(n):
        enemy_list.append((i,) + tuple(map(int, input().split(" "))))
    enemy_list = sorted(enemy_list, key=lambda x: x[4])
    enemy_list.reverse()

    for enemy in enemy_list:
        xl = enemy[1]
        if xl < 0:
            xl = 1
        xr = enemy[3]
        yu = enemy[2]
        if yu < 0:
            yu = 0
        yd = enemy[4]
        is_die = False
        for i in range(xl, xr + 1):
            if laser_range[i]:
                laser_range[i] = False
                is_die = True
        ans_list.append((enemy[0], is_die))

    ans_list = sorted(ans_list, key=lambda x: x[0])
    for ans in ans_list:
        if ans[1]:
            print(1)
        else:
            print(0)
0