結果

問題 No.179 塗り分け
ユーザー 👑 KazunKazun
提出日時 2020-11-18 02:19:49
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 557 bytes
コンパイル時間 368 ms
コンパイル使用メモリ 87,296 KB
実行使用メモリ 79,736 KB
最終ジャッジ日時 2023-09-30 14:49:27
合計ジャッジ時間 15,652 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
71,192 KB
testcase_01 AC 78 ms
71,668 KB
testcase_02 AC 86 ms
76,516 KB
testcase_03 AC 79 ms
71,316 KB
testcase_04 AC 95 ms
76,580 KB
testcase_05 AC 171 ms
78,652 KB
testcase_06 AC 158 ms
78,476 KB
testcase_07 WA -
testcase_08 AC 297 ms
78,292 KB
testcase_09 AC 303 ms
78,976 KB
testcase_10 AC 472 ms
78,784 KB
testcase_11 AC 414 ms
78,552 KB
testcase_12 AC 411 ms
78,372 KB
testcase_13 AC 90 ms
76,504 KB
testcase_14 AC 99 ms
77,360 KB
testcase_15 AC 75 ms
71,468 KB
testcase_16 AC 74 ms
71,388 KB
testcase_17 WA -
testcase_18 AC 481 ms
79,280 KB
testcase_19 AC 477 ms
79,144 KB
testcase_20 AC 452 ms
78,912 KB
testcase_21 AC 350 ms
78,372 KB
testcase_22 AC 516 ms
78,828 KB
testcase_23 AC 542 ms
78,728 KB
testcase_24 AC 359 ms
78,824 KB
testcase_25 AC 373 ms
78,764 KB
testcase_26 AC 442 ms
79,736 KB
testcase_27 AC 480 ms
78,508 KB
testcase_28 AC 590 ms
79,692 KB
testcase_29 AC 624 ms
78,968 KB
testcase_30 AC 598 ms
79,288 KB
testcase_31 AC 643 ms
78,984 KB
testcase_32 AC 577 ms
79,456 KB
testcase_33 AC 590 ms
79,480 KB
testcase_34 AC 643 ms
79,532 KB
testcase_35 AC 602 ms
78,808 KB
testcase_36 AC 74 ms
71,584 KB
testcase_37 AC 74 ms
71,272 KB
testcase_38 AC 75 ms
71,320 KB
testcase_39 AC 80 ms
76,404 KB
testcase_40 AC 84 ms
76,588 KB
testcase_41 AC 76 ms
71,184 KB
testcase_42 AC 89 ms
76,848 KB
testcase_43 AC 134 ms
77,548 KB
testcase_44 AC 190 ms
78,716 KB
testcase_45 AC 118 ms
77,472 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

H,W=map(int,input().split())
S=[input() for _ in range(H)]

Flag=0
for y in range(0,H+1):
    for x in range(-W-1,W+1):
        if x==y==0:
            continue

        T=[[int(S[y][x]=="#") for x in range(W)] for y in range(H)]
        G=1

        for b in range(H):
            for a in range(W):
                if T[b][a]:
                    if 0<=b+y<H and 0<=a+x<W and T[b+y][a+x]:
                        T[b][a]=T[b+y][a+x]=0
                    else:
                        G=0
        Flag|=G

if Flag:
    print("YES")
else:
    print("NO")

0