結果

問題 No.402 最も海から遠い場所
ユーザー Navier_BoltzmannNavier_Boltzmann
提出日時 2022-09-04 15:15:38
言語 PyPy3
(7.3.15)
結果
MLE  
実行時間 -
コード長 537 bytes
コンパイル時間 217 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 640,844 KB
最終ジャッジ日時 2024-04-29 15:45:32
合計ジャッジ時間 10,281 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 50 ms
55,424 KB
testcase_01 AC 51 ms
55,552 KB
testcase_02 AC 64 ms
64,896 KB
testcase_03 AC 49 ms
55,424 KB
testcase_04 AC 50 ms
55,168 KB
testcase_05 AC 51 ms
55,680 KB
testcase_06 AC 50 ms
55,680 KB
testcase_07 AC 51 ms
55,296 KB
testcase_08 AC 50 ms
55,424 KB
testcase_09 AC 51 ms
55,424 KB
testcase_10 AC 50 ms
54,912 KB
testcase_11 AC 63 ms
64,768 KB
testcase_12 AC 52 ms
55,936 KB
testcase_13 AC 78 ms
73,344 KB
testcase_14 AC 78 ms
71,424 KB
testcase_15 AC 121 ms
91,264 KB
testcase_16 AC 126 ms
95,744 KB
testcase_17 AC 866 ms
319,136 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())
dp = [list(input())[:-1] for _ in range(H)]
for i in range(H):
    for j in range(W):
        dp[i][j] = int(dp[i][j]=='#')

for i in range(1,H):
    for j in range(1,W):
        if dp[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