結果
| 問題 | No.2559 眩しい数直線 |
| コンテスト | |
| ユーザー |
Suchmos
|
| 提出日時 | 2024-12-28 17:55:03 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 40 ms / 2,000 ms |
| + 454µs | |
| コード長 | 324 bytes |
| 記録 | |
| コンパイル時間 | 50 ms |
| コンパイル使用メモリ | 14,592 KB |
| 実行使用メモリ | 11,520 KB |
| 最終ジャッジ日時 | 2026-10-15 02:06:59 |
| 合計ジャッジ時間 | 2,381 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
N,X=map(int,input().split())
L=[0]*X
for i in range(N):
A,B=map(int,input().split())
if L[A-1]<B:
L[A-1]=B
l,r=A-1,A-1
while l>0 and L[l]>0:
L[l-1]=max(L[l-1],L[l]-1)
l-=1
while r<X-1 and L[r]>0:
L[r+1]=max(L[r+1],L[r]-1)
r+=1
print(*L)
Suchmos