結果

問題 No.179 塗り分け
ユーザー titiatitia
提出日時 2022-05-05 00:27:52
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 712 bytes
コンパイル時間 86 ms
コンパイル使用メモリ 10,704 KB
実行使用メモリ 8,276 KB
最終ジャッジ日時 2023-09-17 05:43:50
合計ジャッジ時間 5,614 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
8,204 KB
testcase_01 AC 16 ms
7,796 KB
testcase_02 AC 16 ms
8,228 KB
testcase_03 AC 16 ms
7,808 KB
testcase_04 AC 16 ms
8,080 KB
testcase_05 AC 25 ms
7,792 KB
testcase_06 AC 16 ms
8,132 KB
testcase_07 AC 897 ms
7,868 KB
testcase_08 AC 53 ms
8,260 KB
testcase_09 WA -
testcase_10 AC 17 ms
8,168 KB
testcase_11 AC 17 ms
8,244 KB
testcase_12 AC 155 ms
7,872 KB
testcase_13 AC 16 ms
7,716 KB
testcase_14 AC 16 ms
7,792 KB
testcase_15 AC 16 ms
7,888 KB
testcase_16 AC 16 ms
8,072 KB
testcase_17 AC 15 ms
7,780 KB
testcase_18 AC 17 ms
8,096 KB
testcase_19 AC 18 ms
8,192 KB
testcase_20 AC 78 ms
7,932 KB
testcase_21 AC 143 ms
7,708 KB
testcase_22 AC 372 ms
7,792 KB
testcase_23 AC 17 ms
8,172 KB
testcase_24 AC 73 ms
7,824 KB
testcase_25 AC 17 ms
8,276 KB
testcase_26 WA -
testcase_27 AC 55 ms
7,736 KB
testcase_28 WA -
testcase_29 AC 57 ms
7,740 KB
testcase_30 WA -
testcase_31 AC 60 ms
7,928 KB
testcase_32 AC 28 ms
8,096 KB
testcase_33 AC 60 ms
7,808 KB
testcase_34 WA -
testcase_35 AC 61 ms
7,940 KB
testcase_36 AC 15 ms
7,748 KB
testcase_37 AC 15 ms
7,816 KB
testcase_38 AC 16 ms
7,808 KB
testcase_39 AC 16 ms
7,788 KB
testcase_40 AC 15 ms
7,888 KB
testcase_41 AC 16 ms
7,736 KB
testcase_42 AC 16 ms
7,824 KB
testcase_43 AC 17 ms
7,928 KB
testcase_44 AC 22 ms
7,744 KB
testcase_45 AC 16 ms
7,788 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

H,W=map(int,input().split())
MAP=[input().strip() for i in range(H)]

for i in range(H):
    for j in range(W):
        S=[[0]*W for i in range(H)]

        flag=0
        count=0

        for k in range(H):
            if flag==1:
                break
            for l in range(W):
                if MAP[k][l]=="#" and S[k][l]==0:
                    S[k][l]=1
                    count+=1
                    if k+i<H and j+l<W and MAP[k+i][j+l]=="#" and S[k+i][j+l]==0:
                        S[k+i][j+l]=2
                    else:
                        flag=1
                        break

        if flag==0 and count>0:
            print("YES")
            exit()

print("NO")
                    
0