結果
問題 |
No.402 最も海から遠い場所
|
ユーザー |
|
提出日時 | 2022-09-04 15:20:58 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 332 ms / 3,000 ms |
コード長 | 546 bytes |
コンパイル時間 | 508 ms |
コンパイル使用メモリ | 82,944 KB |
実行使用メモリ | 81,696 KB |
最終ジャッジ日時 | 2024-11-18 20:44:44 |
合計ジャッジ時間 | 4,418 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 |
ソースコード
# 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()) M = 1 dp0 = list(input())[:-1] dp0 = [int(i=='#') for i in dp0] for _ in range(H-1): dp1 = list(input())[:-1] dp1 = [int(i=='#') for i in dp1] for j in range(1,W): if dp1[j]==1: dp1[j] = min(dp1[j-1],dp0[j],dp0[j-1])+1 M = max(M,dp1[j]) dp0 = dp1[:] print((M+1)//2)