{"version":"1.0","title":"ABC311D - Grid Ice Floor","author_name":"IsThisAPen","image_url":null,"blog_title":"\u7af6\u30d7\u30ed\u306f\u3058\u3081\u307e\u3057\u305f","description":"\u8003\u3048\u65b9 \u56de\u7b54\u4f8b \u8003\u3048\u65b9\u6b62\u307e\u308b\u30de\u30b9\u3068\u8a2a\u308c\u305f\u30de\u30b9\u3092\u5225\u306b\u7ba1\u7406\u3057\u3066BFS\u3092\u3059\u308b\uff0e\u56de\u7b54\u4f8b from collections import deque N, M = map(int, input().split()) S = [input() for _ in range(N)] seen = [[False]*M for _ in range(N)] stop = [[False]*M for _ in range(N)] delta = [(-1, 0), (1, 0), (0, -1), (0, 1)] q = deque() q.append((1, 1)) seen[1][1] = True s\u2026","provider_url":"https://hatena.blog","author_url":"https://blog.hatena.ne.jp/IsThisAPen/","type":"rich","published":"2023-07-22 23:20:59","blog_url":"https://kyo-pro.hatenablog.com/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkyo-pro.hatenablog.com%2Fentry%2FABC311D\" title=\"ABC311D - Grid Ice Floor - \u7af6\u30d7\u30ed\u306f\u3058\u3081\u307e\u3057\u305f\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","url":"https://kyo-pro.hatenablog.com/entry/ABC311D","width":"100%","provider_name":"Hatena Blog","categories":["AtCoder","AtCoder-Beginner Contest","\u30b0\u30e9\u30d5","\u30b0\u30e9\u30d5-BFS","Python"],"height":"190"}