結果

問題 No.179 塗り分け
ユーザー aqua_tenhouaqua_tenhou
提出日時 2021-06-20 22:22:46
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 639 bytes
コンパイル時間 926 ms
コンパイル使用メモリ 87,120 KB
実行使用メモリ 78,120 KB
最終ジャッジ日時 2023-09-05 01:42:07
合計ジャッジ時間 10,148 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,468 KB
testcase_01 AC 72 ms
71,380 KB
testcase_02 AC 68 ms
71,336 KB
testcase_03 AC 73 ms
71,360 KB
testcase_04 AC 68 ms
71,328 KB
testcase_05 AC 127 ms
77,512 KB
testcase_06 AC 66 ms
71,308 KB
testcase_07 WA -
testcase_08 AC 169 ms
77,788 KB
testcase_09 WA -
testcase_10 AC 75 ms
76,244 KB
testcase_11 AC 77 ms
76,256 KB
testcase_12 AC 281 ms
77,424 KB
testcase_13 AC 76 ms
75,844 KB
testcase_14 AC 78 ms
76,668 KB
testcase_15 AC 69 ms
71,500 KB
testcase_16 AC 69 ms
71,532 KB
testcase_17 AC 70 ms
71,376 KB
testcase_18 AC 93 ms
76,704 KB
testcase_19 AC 95 ms
76,744 KB
testcase_20 AC 229 ms
77,652 KB
testcase_21 AC 207 ms
77,624 KB
testcase_22 AC 248 ms
77,916 KB
testcase_23 AC 74 ms
76,032 KB
testcase_24 AC 202 ms
77,940 KB
testcase_25 AC 86 ms
76,508 KB
testcase_26 WA -
testcase_27 AC 253 ms
77,940 KB
testcase_28 WA -
testcase_29 AC 310 ms
77,752 KB
testcase_30 WA -
testcase_31 AC 340 ms
77,708 KB
testcase_32 AC 168 ms
77,604 KB
testcase_33 AC 309 ms
77,840 KB
testcase_34 WA -
testcase_35 AC 335 ms
77,976 KB
testcase_36 AC 70 ms
71,284 KB
testcase_37 AC 68 ms
71,332 KB
testcase_38 AC 71 ms
71,356 KB
testcase_39 AC 68 ms
71,312 KB
testcase_40 AC 69 ms
71,424 KB
testcase_41 AC 69 ms
71,528 KB
testcase_42 AC 70 ms
71,332 KB
testcase_43 AC 104 ms
77,304 KB
testcase_44 AC 129 ms
77,696 KB
testcase_45 AC 91 ms
76,352 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

h,w = map(int,input().split())
s = [list(input()) for i in range(h)]

for i in range(h):
    for j in range(w):
        use = [[0 for _ in range(w)] for __ in range(h)]
        if i == j == 0: continue
        flg = True
        for x in range(h):
             for y in range(w):
                 if s[x][y] == "#" and use[x][y] == 0:
                    if x+i < h and y+j < w and s[x+i][y+j] == "#" and use[x+i][y+j] == 0:
                        use[x][y] = 1
                        use[x+i][y+j] = 1
                    else:
                        flg = False
        if flg:
            print("YES")
            exit()
print("NO")
0