結果

問題 No.402 最も海から遠い場所
ユーザー pluto77pluto77
提出日時 2017-03-25 11:33:59
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 319 ms / 3,000 ms
コード長 278 bytes
コンパイル時間 1,148 ms
コンパイル使用メモリ 77,392 KB
実行使用メモリ 150,252 KB
最終ジャッジ日時 2023-09-20 10:33:00
合計ジャッジ時間 6,124 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
76,336 KB
testcase_01 AC 70 ms
76,184 KB
testcase_02 AC 83 ms
78,672 KB
testcase_03 AC 71 ms
76,440 KB
testcase_04 AC 71 ms
76,144 KB
testcase_05 AC 71 ms
76,200 KB
testcase_06 AC 71 ms
76,348 KB
testcase_07 AC 70 ms
76,620 KB
testcase_08 AC 71 ms
76,200 KB
testcase_09 AC 71 ms
76,536 KB
testcase_10 AC 73 ms
76,204 KB
testcase_11 AC 79 ms
78,720 KB
testcase_12 AC 71 ms
76,436 KB
testcase_13 AC 85 ms
79,024 KB
testcase_14 AC 94 ms
79,944 KB
testcase_15 AC 99 ms
80,160 KB
testcase_16 AC 105 ms
80,164 KB
testcase_17 AC 238 ms
113,672 KB
testcase_18 AC 319 ms
150,252 KB
testcase_19 AC 215 ms
150,168 KB
testcase_20 AC 298 ms
150,012 KB
testcase_21 AC 279 ms
150,064 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki_402

h,w=map(int,raw_input().split())
dp=[[0 for i in xrange(w+2)] for j in xrange(h+2)]
res=0
for i in xrange(1,h+1):
 s=raw_input()
 for j in xrange(1,w+1):
  if s[j-1]=='#':
   dp[i][j]=min(dp[i-1][j-1],dp[i-1][j],dp[i][j-1])+1
   res=max(res,dp[i][j])
print (res+1)/2
0