結果

問題 No.402 最も海から遠い場所
ユーザー Navier_BoltzmannNavier_Boltzmann
提出日時 2022-09-04 15:13:48
言語 PyPy3
(7.3.15)
結果
MLE  
実行時間 -
コード長 570 bytes
コンパイル時間 193 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 692,412 KB
最終ジャッジ日時 2024-04-29 15:43:48
合計ジャッジ時間 11,664 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
55,552 KB
testcase_01 AC 45 ms
55,808 KB
testcase_02 AC 57 ms
65,408 KB
testcase_03 AC 47 ms
55,296 KB
testcase_04 AC 46 ms
55,040 KB
testcase_05 AC 43 ms
55,424 KB
testcase_06 AC 45 ms
55,808 KB
testcase_07 AC 44 ms
55,552 KB
testcase_08 AC 46 ms
55,552 KB
testcase_09 AC 48 ms
55,040 KB
testcase_10 AC 46 ms
55,552 KB
testcase_11 AC 56 ms
64,768 KB
testcase_12 AC 48 ms
55,552 KB
testcase_13 AC 68 ms
73,728 KB
testcase_14 AC 66 ms
71,936 KB
testcase_15 AC 105 ms
93,724 KB
testcase_16 AC 113 ms
95,232 KB
testcase_17 AC 967 ms
353,568 KB
testcase_18 MLE -
testcase_19 MLE -
testcase_20 MLE -
testcase_21 MLE -
権限があれば一括ダウンロードができます

ソースコード

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())
S = [list(input())[:-1] for _ in range(H)]
for i in range(H):
    for j in range(W):
        S[i][j] = int(S[i][j]=='#')

dp = [S[i][:] for i in range(H)]
for i in range(1,H):
    for j in range(1,W):
        if S[i][j]==1:
            dp[i][j] = min(dp[i][j-1],dp[i-1][j],dp[i-1][j-1])+1

print((max(max(dp[i]) for i in range(H))+1)//2)
0