結果

問題 No.2559 眩しい数直線
ユーザー ゼットゼット
提出日時 2023-12-20 23:35:25
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 101 ms / 2,000 ms
コード長 231 bytes
コンパイル時間 349 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 70,944 KB
最終ジャッジ日時 2023-12-20 23:35:28
合計ジャッジ時間 3,188 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,460 KB
testcase_01 AC 36 ms
53,460 KB
testcase_02 AC 37 ms
53,460 KB
testcase_03 AC 57 ms
65,984 KB
testcase_04 AC 56 ms
65,976 KB
testcase_05 AC 63 ms
68,852 KB
testcase_06 AC 101 ms
70,944 KB
testcase_07 AC 67 ms
68,864 KB
testcase_08 AC 65 ms
68,852 KB
testcase_09 AC 65 ms
68,852 KB
testcase_10 AC 62 ms
68,860 KB
testcase_11 AC 46 ms
61,732 KB
testcase_12 AC 51 ms
63,924 KB
testcase_13 AC 70 ms
70,932 KB
testcase_14 AC 71 ms
70,928 KB
testcase_15 AC 70 ms
70,928 KB
testcase_16 AC 55 ms
66,120 KB
testcase_17 AC 89 ms
68,868 KB
testcase_18 AC 58 ms
66,124 KB
testcase_19 AC 67 ms
68,864 KB
testcase_20 AC 63 ms
68,852 KB
testcase_21 AC 71 ms
66,136 KB
testcase_22 AC 66 ms
68,864 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,X=map(int,input().split())
result=[0]*(X+1)
for i in range(N):
  a,b=map(int,input().split())
  for j in range(a-b,a+b+1):
    if j<0 or j>X:
      continue
    result[j]=max(result[j],b-abs(a-j))
result=result[1:]
print(*result)
0