結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 50 ms
55,168 KB
testcase_01 AC 57 ms
55,680 KB
testcase_02 AC 64 ms
65,152 KB
testcase_03 AC 51 ms
55,168 KB
testcase_04 AC 51 ms
55,424 KB
testcase_05 AC 51 ms
55,552 KB
testcase_06 AC 50 ms
55,424 KB
testcase_07 AC 51 ms
55,552 KB
testcase_08 AC 51 ms
55,168 KB
testcase_09 AC 51 ms
55,552 KB
testcase_10 AC 51 ms
55,168 KB
testcase_11 AC 62 ms
64,256 KB
testcase_12 AC 51 ms
55,552 KB
testcase_13 AC 81 ms
73,600 KB
testcase_14 AC 78 ms
71,424 KB
testcase_15 AC 123 ms
93,824 KB
testcase_16 AC 131 ms
95,360 KB
testcase_17 AC 1,065 ms
353,468 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