結果

問題 No.179 塗り分け
ユーザー ntudantuda
提出日時 2023-12-31 17:56:58
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 821 bytes
コンパイル時間 312 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 79,312 KB
最終ジャッジ日時 2023-12-31 17:57:08
合計ジャッジ時間 9,505 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
53,460 KB
testcase_01 AC 40 ms
55,616 KB
testcase_02 AC 39 ms
53,460 KB
testcase_03 AC 39 ms
53,460 KB
testcase_04 AC 41 ms
55,616 KB
testcase_05 AC 120 ms
76,724 KB
testcase_06 AC 41 ms
55,616 KB
testcase_07 WA -
testcase_08 AC 339 ms
78,184 KB
testcase_09 WA -
testcase_10 AC 50 ms
64,468 KB
testcase_11 AC 50 ms
64,468 KB
testcase_12 AC 292 ms
77,508 KB
testcase_13 AC 49 ms
62,088 KB
testcase_14 AC 54 ms
68,476 KB
testcase_15 AC 39 ms
53,460 KB
testcase_16 AC 39 ms
53,460 KB
testcase_17 AC 39 ms
53,460 KB
testcase_18 AC 62 ms
73,192 KB
testcase_19 AC 68 ms
72,936 KB
testcase_20 AC 324 ms
77,672 KB
testcase_21 AC 356 ms
78,460 KB
testcase_22 AC 386 ms
77,956 KB
testcase_23 AC 73 ms
62,304 KB
testcase_24 AC 347 ms
78,204 KB
testcase_25 AC 57 ms
68,708 KB
testcase_26 WA -
testcase_27 AC 351 ms
78,168 KB
testcase_28 WA -
testcase_29 AC 355 ms
77,928 KB
testcase_30 WA -
testcase_31 AC 361 ms
77,672 KB
testcase_32 AC 138 ms
76,520 KB
testcase_33 AC 346 ms
78,312 KB
testcase_34 WA -
testcase_35 AC 367 ms
77,904 KB
testcase_36 AC 39 ms
53,460 KB
testcase_37 AC 39 ms
55,616 KB
testcase_38 AC 39 ms
53,460 KB
testcase_39 AC 39 ms
53,460 KB
testcase_40 AC 44 ms
61,960 KB
testcase_41 AC 39 ms
53,460 KB
testcase_42 AC 41 ms
55,616 KB
testcase_43 AC 72 ms
75,952 KB
testcase_44 AC 104 ms
76,400 KB
testcase_45 AC 55 ms
66,404 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from copy import deepcopy

H, W = map(int, input().split())
S = [list(input()) for _ in range(H)]
for i in range(H):
    for j in range(W):
        if i == 0 and j == 0:
            continue
        T = deepcopy(S)
        f = True
        for h in range(H):
            for w in range(W):
                if T[h][w] == "#":
                    T[h][w] == "."
                    if i + h < H and j + w < W:
                        if T[i + h][j + w] == "#":
                            T[i + h][j + w] = "."
                        else:
                            f = False
                    else:
                        f = False
                if f == False:
                    break
            if f == False:
                break
        if f == True:
            print("YES")
            exit()
print("NO")
0