結果

問題 No.179 塗り分け
ユーザー 👑 KazunKazun
提出日時 2020-11-18 02:16:37
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 553 bytes
コンパイル時間 200 ms
コンパイル使用メモリ 82,424 KB
実行使用メモリ 77,976 KB
最終ジャッジ日時 2024-07-23 08:49:57
合計ジャッジ時間 13,581 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
53,116 KB
testcase_01 AC 40 ms
53,620 KB
testcase_02 AC 46 ms
61,272 KB
testcase_03 AC 38 ms
52,888 KB
testcase_04 AC 54 ms
66,236 KB
testcase_05 AC 132 ms
76,508 KB
testcase_06 AC 123 ms
76,988 KB
testcase_07 WA -
testcase_08 AC 253 ms
76,884 KB
testcase_09 AC 270 ms
76,956 KB
testcase_10 AC 433 ms
77,624 KB
testcase_11 AC 382 ms
77,408 KB
testcase_12 AC 371 ms
77,136 KB
testcase_13 AC 51 ms
63,824 KB
testcase_14 AC 61 ms
72,368 KB
testcase_15 AC 38 ms
52,660 KB
testcase_16 AC 37 ms
52,444 KB
testcase_17 WA -
testcase_18 AC 451 ms
77,568 KB
testcase_19 AC 444 ms
77,792 KB
testcase_20 AC 408 ms
77,656 KB
testcase_21 AC 312 ms
77,112 KB
testcase_22 AC 475 ms
77,428 KB
testcase_23 AC 505 ms
77,536 KB
testcase_24 AC 327 ms
77,548 KB
testcase_25 AC 345 ms
77,240 KB
testcase_26 AC 426 ms
77,864 KB
testcase_27 AC 444 ms
77,128 KB
testcase_28 AC 541 ms
77,852 KB
testcase_29 AC 582 ms
77,288 KB
testcase_30 AC 545 ms
77,976 KB
testcase_31 AC 599 ms
77,556 KB
testcase_32 AC 535 ms
77,836 KB
testcase_33 AC 543 ms
77,400 KB
testcase_34 AC 595 ms
77,664 KB
testcase_35 AC 550 ms
77,656 KB
testcase_36 AC 38 ms
54,044 KB
testcase_37 AC 37 ms
52,912 KB
testcase_38 AC 36 ms
53,040 KB
testcase_39 AC 38 ms
53,028 KB
testcase_40 AC 45 ms
60,952 KB
testcase_41 AC 37 ms
53,436 KB
testcase_42 AC 48 ms
63,712 KB
testcase_43 AC 100 ms
76,540 KB
testcase_44 AC 149 ms
76,752 KB
testcase_45 AC 84 ms
76,388 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

Flag=0
for y in range(0,H):
    for x in range(-W-1,W):
        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