結果
問題 | No.2559 眩しい数直線 |
ユーザー |
|
提出日時 | 2023-12-02 14:39:48 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 129 ms / 2,000 ms |
コード長 | 703 bytes |
コンパイル時間 | 256 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 81,536 KB |
最終ジャッジ日時 | 2024-09-26 17:04:41 |
合計ジャッジ時間 | 3,867 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
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:]))