結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,628 KB
testcase_01 AC 76 ms
71,120 KB
testcase_02 AC 81 ms
76,432 KB
testcase_03 AC 75 ms
71,576 KB
testcase_04 AC 97 ms
76,872 KB
testcase_05 AC 170 ms
78,780 KB
testcase_06 AC 158 ms
78,524 KB
testcase_07 WA -
testcase_08 AC 285 ms
78,224 KB
testcase_09 AC 298 ms
78,688 KB
testcase_10 AC 465 ms
78,856 KB
testcase_11 AC 416 ms
78,452 KB
testcase_12 AC 404 ms
78,260 KB
testcase_13 AC 86 ms
76,428 KB
testcase_14 AC 95 ms
76,992 KB
testcase_15 AC 75 ms
71,272 KB
testcase_16 AC 74 ms
71,500 KB
testcase_17 WA -
testcase_18 AC 467 ms
79,180 KB
testcase_19 AC 471 ms
79,188 KB
testcase_20 AC 443 ms
78,808 KB
testcase_21 AC 343 ms
78,428 KB
testcase_22 AC 499 ms
78,796 KB
testcase_23 AC 532 ms
78,684 KB
testcase_24 AC 356 ms
78,692 KB
testcase_25 AC 372 ms
78,856 KB
testcase_26 AC 434 ms
79,324 KB
testcase_27 AC 467 ms
78,648 KB
testcase_28 AC 583 ms
79,364 KB
testcase_29 AC 608 ms
78,976 KB
testcase_30 AC 571 ms
79,340 KB
testcase_31 AC 628 ms
78,968 KB
testcase_32 AC 564 ms
79,336 KB
testcase_33 AC 579 ms
79,352 KB
testcase_34 AC 626 ms
79,868 KB
testcase_35 AC 587 ms
78,748 KB
testcase_36 AC 76 ms
71,588 KB
testcase_37 AC 77 ms
71,412 KB
testcase_38 AC 77 ms
71,588 KB
testcase_39 AC 77 ms
71,340 KB
testcase_40 AC 80 ms
76,344 KB
testcase_41 AC 74 ms
71,168 KB
testcase_42 AC 85 ms
76,648 KB
testcase_43 AC 134 ms
77,588 KB
testcase_44 AC 186 ms
78,584 KB
testcase_45 AC 113 ms
77,352 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