結果

問題 No.402 最も海から遠い場所
ユーザー Navier_BoltzmannNavier_Boltzmann
提出日時 2022-09-04 15:20:02
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 546 bytes
コンパイル時間 169 ms
コンパイル使用メモリ 81,792 KB
実行使用メモリ 81,408 KB
最終ジャッジ日時 2024-04-29 15:48:34
合計ジャッジ時間 4,102 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 53 ms
55,424 KB
testcase_01 AC 53 ms
55,424 KB
testcase_02 AC 60 ms
63,360 KB
testcase_03 WA -
testcase_04 AC 50 ms
54,784 KB
testcase_05 AC 49 ms
55,424 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 50 ms
55,424 KB
testcase_09 AC 50 ms
55,552 KB
testcase_10 AC 49 ms
55,296 KB
testcase_11 AC 61 ms
64,768 KB
testcase_12 AC 51 ms
55,680 KB
testcase_13 AC 72 ms
70,016 KB
testcase_14 AC 72 ms
68,992 KB
testcase_15 AC 95 ms
76,416 KB
testcase_16 AC 98 ms
76,800 KB
testcase_17 AC 310 ms
78,336 KB
testcase_18 AC 376 ms
81,280 KB
testcase_19 AC 291 ms
81,152 KB
testcase_20 AC 359 ms
81,024 KB
testcase_21 AC 375 ms
81,408 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# import pypyjit
# pypyjit.set_param('max_unroll_recursion=-1')
from collections import *
from itertools import *
from functools import *
from heapq import *
import sys,math
input = sys.stdin.readline

H,W = map(int,input().split())
M = 0
dp0 = list(input())[:-1]
dp0 = [int(i=='#') for i in dp0]
for _ in range(H-1):
    dp1 = list(input())[:-1]
    dp1 = [int(i=='#') for i in dp1]
    for j in range(1,W):
        if dp1[j]==1:
            dp1[j] = min(dp1[j-1],dp0[j],dp0[j-1])+1
            M = max(M,dp1[j])
    dp0 = dp1[:]
print((M+1)//2)
0