結果

問題 No.2559 眩しい数直線
ユーザー hatonobuhatonobu
提出日時 2023-12-02 14:43:42
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 75 ms / 2,000 ms
コード長 558 bytes
コンパイル時間 162 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 72,864 KB
最終ジャッジ日時 2023-12-02 14:43:46
合計ジャッジ時間 2,326 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
55,732 KB
testcase_01 AC 38 ms
55,732 KB
testcase_02 AC 39 ms
55,732 KB
testcase_03 AC 55 ms
68,072 KB
testcase_04 AC 56 ms
68,072 KB
testcase_05 AC 59 ms
68,328 KB
testcase_06 AC 75 ms
70,788 KB
testcase_07 AC 67 ms
72,736 KB
testcase_08 AC 70 ms
70,656 KB
testcase_09 AC 63 ms
70,396 KB
testcase_10 AC 57 ms
68,328 KB
testcase_11 AC 47 ms
63,804 KB
testcase_12 AC 49 ms
64,192 KB
testcase_13 AC 68 ms
72,864 KB
testcase_14 AC 67 ms
70,660 KB
testcase_15 AC 68 ms
70,656 KB
testcase_16 AC 55 ms
68,332 KB
testcase_17 AC 65 ms
70,660 KB
testcase_18 AC 59 ms
68,072 KB
testcase_19 AC 68 ms
70,792 KB
testcase_20 AC 59 ms
68,460 KB
testcase_21 AC 57 ms
68,076 KB
testcase_22 AC 71 ms
70,664 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
from collections import deque,defaultdict
import itertools
import heapq
import bisect
import math

#sys.setrecursionlimit(10 ** 9)
input = lambda: sys.stdin.readline().rstrip()
ii = lambda: int(input())
mi = lambda: map(int, input().split())
ml = lambda: map(str, input().split())
li = lambda: list(mi())
li_st = lambda: list(map(str, input().split()))
lli = lambda n: [li() for _ in range(n)]
mod = 998244353

N,X = mi()
AB = lli(N)

ans = [0]*X
for a,b in AB:
    for i in range(X):
        ans[i] =max(max(b - abs(i+1-a),0),ans[i])

print(*ans)
0