結果

問題 No.402 最も海から遠い場所
ユーザー eitahoeitaho
提出日時 2016-07-26 22:49:09
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 327 bytes
コンパイル時間 241 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 16,384 KB
最終ジャッジ日時 2024-04-24 09:41:42
合計ジャッジ時間 9,098 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
16,384 KB
testcase_01 AC 26 ms
10,880 KB
testcase_02 AC 27 ms
10,880 KB
testcase_03 AC 30 ms
10,880 KB
testcase_04 AC 27 ms
10,752 KB
testcase_05 AC 27 ms
10,880 KB
testcase_06 AC 27 ms
10,880 KB
testcase_07 AC 27 ms
10,880 KB
testcase_08 AC 26 ms
10,752 KB
testcase_09 AC 26 ms
10,752 KB
testcase_10 AC 26 ms
10,880 KB
testcase_11 AC 26 ms
10,880 KB
testcase_12 AC 27 ms
10,880 KB
testcase_13 AC 51 ms
10,752 KB
testcase_14 AC 42 ms
10,752 KB
testcase_15 AC 159 ms
10,752 KB
testcase_16 AC 335 ms
10,880 KB
testcase_17 AC 2,648 ms
10,752 KB
testcase_18 TLE -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

H, W = map(int, input().split())
curr = [0] * (W + 2)
maxLen = 0
for r in range(H):
    s = input()
    prev, curr = curr, [0] * (W + 2)
    for c in range(1, W + 1):
        if s[c - 1] == "#":
            curr[c] = min(prev[c - 1], prev[c], curr[c - 1]) + 1
            maxLen = max(maxLen, curr[c])
print((maxLen + 1) // 2)
0