結果
| 問題 |
No.402 最も海から遠い場所
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-09-04 15:13:31 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 570 bytes |
| コンパイル時間 | 300 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 162,944 KB |
| 最終ジャッジ日時 | 2024-11-18 20:31:29 |
| 合計ジャッジ時間 | 23,644 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 TLE * 5 |
ソースコード
# 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)