結果
| 問題 | No.179 塗り分け |
| コンテスト | |
| ユーザー |
goto_isyuku
|
| 提出日時 | 2017-06-04 11:45:37 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 512 bytes |
| 記録 | |
| コンパイル時間 | 95 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-10-03 04:02:04 |
| 合計ジャッジ時間 | 2,646 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 6 |
| other | AC * 4 WA * 1 RE * 35 |
ソースコード
h, w = [int(x) for x in input().split()]
point = []
for i in range(h):
l = input().split()
for j in range(w):
if l[j] == "#":
point.append([i, j])
dp = [[1 for x in range(w * 2 - 1)] for x in range(h)]
center = w - 1
dp[0][center] = 0
count = h * w - 1
for y in range(h):
for x in range(w * 2 - 1):
if dp[y][x] == 1:
for p in point:
if [p[0] + y, p[1] + x - w + 1] not in point:
dp[y][x] = 0
count -= 1
if count > 0:
print("YES")
else:
print("NO")
goto_isyuku