結果

問題 No.2559 眩しい数直線
ユーザー bluebery1001bluebery1001
提出日時 2023-11-02 19:18:30
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 358 bytes
コンパイル時間 198 ms
コンパイル使用メモリ 11,920 KB
実行使用メモリ 10,356 KB
最終ジャッジ日時 2023-11-02 19:42:09
合計ジャッジ時間 3,593 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 WA -
testcase_10 RE -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 RE -
testcase_15 RE -
testcase_16 WA -
testcase_17 RE -
testcase_18 WA -
testcase_19 WA -
testcase_20 RE -
testcase_21 WA -
testcase_22 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n,x = map(int,input().split())
a = [-1]*n
b = [-1]*n
for i in range(n):
    a[i],b[i] = map(int,input().split())
    a[i]-=1
ans = [0]*x
for i in range(n):
    for j in range(b[i]):
        if i+j<x:
            if ans[i+j]<b[i]-j:
                ans[i+j]=b[i]-j
        if i-j>=0:
            if ans[i-j]<b[i]-j:
                ans[i-j]=b[i]-j
print(*ans)
0