結果

問題 No.678 2Dシューティングゲームの必殺ビーム
ユーザー fumofumofunifumofumofuni
提出日時 2023-06-21 01:15:25
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 85 ms / 2,000 ms
コード長 404 bytes
コンパイル時間 1,284 ms
コンパイル使用メモリ 86,636 KB
実行使用メモリ 76,488 KB
最終ジャッジ日時 2023-09-10 20:53:34
合計ジャッジ時間 3,150 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,160 KB
testcase_01 AC 73 ms
71,464 KB
testcase_02 AC 71 ms
71,488 KB
testcase_03 AC 73 ms
71,056 KB
testcase_04 AC 79 ms
76,460 KB
testcase_05 AC 82 ms
76,292 KB
testcase_06 AC 81 ms
76,332 KB
testcase_07 AC 79 ms
76,316 KB
testcase_08 AC 81 ms
76,476 KB
testcase_09 AC 79 ms
76,180 KB
testcase_10 AC 79 ms
76,284 KB
testcase_11 AC 79 ms
76,204 KB
testcase_12 AC 80 ms
76,000 KB
testcase_13 AC 82 ms
76,488 KB
testcase_14 AC 82 ms
76,188 KB
testcase_15 AC 85 ms
76,260 KB
testcase_16 AC 80 ms
76,312 KB
testcase_17 AC 82 ms
76,412 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,L,R=map(int,input().split())
l=[0]*N
r=[0]*N
d=[0]*N
for i in range(N):
    a,b,c,f=map(int,input().split())
    l[i]=a
    r[i]=c
    d[i]=f

ans=[0]*N
for i in range(L,R+1):
    res=-1
    idx=-1
    for j in range(N):
        if l[j]<=i and i<=r[j]:
            if res<d[j]:
                idx=j
                res=d[j]
    if idx != -1:
        ans[idx]=1

for i in range(N):
    print(ans[i])


0