結果

問題 No.2559 眩しい数直線
ユーザー KemtyKemty
提出日時 2023-12-02 14:39:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 108 ms / 2,000 ms
コード長 703 bytes
コンパイル時間 158 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 81,112 KB
最終ジャッジ日時 2023-12-02 14:39:55
合計ジャッジ時間 3,147 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
80,088 KB
testcase_01 AC 81 ms
80,088 KB
testcase_02 AC 82 ms
80,088 KB
testcase_03 AC 89 ms
80,600 KB
testcase_04 AC 96 ms
80,724 KB
testcase_05 AC 93 ms
81,112 KB
testcase_06 AC 101 ms
81,112 KB
testcase_07 AC 100 ms
81,112 KB
testcase_08 AC 108 ms
81,108 KB
testcase_09 AC 94 ms
81,112 KB
testcase_10 AC 94 ms
81,112 KB
testcase_11 AC 85 ms
80,600 KB
testcase_12 AC 88 ms
81,112 KB
testcase_13 AC 95 ms
81,112 KB
testcase_14 AC 93 ms
81,112 KB
testcase_15 AC 99 ms
81,112 KB
testcase_16 AC 91 ms
80,596 KB
testcase_17 AC 93 ms
81,112 KB
testcase_18 AC 93 ms
80,596 KB
testcase_19 AC 100 ms
81,112 KB
testcase_20 AC 97 ms
81,112 KB
testcase_21 AC 94 ms
80,728 KB
testcase_22 AC 97 ms
81,108 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict, deque, Counter
import copy
from itertools import combinations, permutations, product, accumulate, groupby, chain
from heapq import heapify, heappop, heappush
import math
import bisect
from pprint import pprint
from random import randint
import sys
# sys.setrecursionlimit(200000)
input = lambda: sys.stdin.readline().rstrip('\n')
inf = float('inf')
mod1 = 10**9+7
mod2 = 998244353
def ceil_div(x, y): return -(-x//y)

#################################################    

N, X = map(int, input().split())
L = [0]*(X+1)
for _ in range(N):
    a, b = map(int, input().split())
    k = 0
    for x in range(1, X+1):
        L[x] = max(b-abs(x-a), L[x])
print(*(L[1:]))
0