結果

問題 No.179 塗り分け
ユーザー titiatitia
提出日時 2022-05-05 00:25:58
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 633 bytes
コンパイル時間 71 ms
コンパイル使用メモリ 10,880 KB
実行使用メモリ 8,244 KB
最終ジャッジ日時 2023-09-17 05:39:15
合計ジャッジ時間 4,289 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
8,188 KB
testcase_01 AC 16 ms
7,804 KB
testcase_02 AC 16 ms
8,056 KB
testcase_03 AC 16 ms
7,732 KB
testcase_04 AC 16 ms
8,116 KB
testcase_05 AC 25 ms
7,800 KB
testcase_06 AC 16 ms
8,196 KB
testcase_07 WA -
testcase_08 AC 53 ms
8,244 KB
testcase_09 WA -
testcase_10 AC 18 ms
8,168 KB
testcase_11 AC 17 ms
8,136 KB
testcase_12 AC 144 ms
7,732 KB
testcase_13 AC 16 ms
7,724 KB
testcase_14 AC 16 ms
7,656 KB
testcase_15 AC 16 ms
7,728 KB
testcase_16 AC 15 ms
8,112 KB
testcase_17 WA -
testcase_18 AC 18 ms
8,176 KB
testcase_19 AC 18 ms
8,116 KB
testcase_20 AC 77 ms
7,744 KB
testcase_21 AC 147 ms
7,752 KB
testcase_22 AC 374 ms
7,836 KB
testcase_23 AC 17 ms
8,184 KB
testcase_24 AC 74 ms
7,796 KB
testcase_25 AC 17 ms
8,216 KB
testcase_26 WA -
testcase_27 AC 55 ms
7,780 KB
testcase_28 WA -
testcase_29 AC 56 ms
7,728 KB
testcase_30 WA -
testcase_31 AC 60 ms
7,852 KB
testcase_32 AC 28 ms
8,240 KB
testcase_33 AC 60 ms
7,752 KB
testcase_34 WA -
testcase_35 AC 61 ms
7,736 KB
testcase_36 AC 15 ms
7,744 KB
testcase_37 AC 16 ms
7,792 KB
testcase_38 AC 16 ms
7,720 KB
testcase_39 AC 15 ms
7,804 KB
testcase_40 AC 16 ms
7,744 KB
testcase_41 AC 16 ms
7,800 KB
testcase_42 AC 16 ms
7,792 KB
testcase_43 AC 18 ms
7,748 KB
testcase_44 AC 23 ms
7,916 KB
testcase_45 AC 16 ms
7,804 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

        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
                    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:
            print("YES")
            exit()

print("NO")
0