結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
55,608 KB
testcase_01 AC 37 ms
55,608 KB
testcase_02 AC 39 ms
55,608 KB
testcase_03 AC 55 ms
66,376 KB
testcase_04 AC 51 ms
66,380 KB
testcase_05 AC 52 ms
66,376 KB
testcase_06 AC 59 ms
66,348 KB
testcase_07 AC 57 ms
66,344 KB
testcase_08 AC 56 ms
66,344 KB
testcase_09 AC 54 ms
66,368 KB
testcase_10 AC 51 ms
66,380 KB
testcase_11 AC 47 ms
64,456 KB
testcase_12 AC 47 ms
64,284 KB
testcase_13 AC 56 ms
66,368 KB
testcase_14 AC 57 ms
66,348 KB
testcase_15 AC 58 ms
66,344 KB
testcase_16 AC 50 ms
66,380 KB
testcase_17 AC 55 ms
66,352 KB
testcase_18 AC 51 ms
66,380 KB
testcase_19 AC 57 ms
66,356 KB
testcase_20 AC 53 ms
66,360 KB
testcase_21 AC 52 ms
66,380 KB
testcase_22 AC 56 ms
66,360 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
#sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10**9 + 7
MOD2 = 998244353
from collections import defaultdict
def ceil(A,B):
    return -(-A//B)
def solve():
    def II(): return int(sys.stdin.readline())
    def LI(): return list(map(int, sys.stdin.readline().split()))
    def LC(): return list(sys.stdin.readline().rstrip())
    def IC(): return [int(c) for c in sys.stdin.readline().rstrip()]
    def MI(): return map(int, sys.stdin.readline().split())
    N,X = MI()
    AB = [0]*N
    for i in range(N):
        A,B = MI()
        AB[i] = (A,B)
    for j in range(1,X+1):
        ans = 0
        for a,b in AB:
            ans = max(b-abs(j-a),ans)
        print(ans,end=" ")
    print()
    return
solve()
0