結果

問題 No.179 塗り分け
ユーザー AT274_AT274_
提出日時 2019-10-23 21:27:41
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 864 bytes
コンパイル時間 1,166 ms
コンパイル使用メモリ 86,728 KB
実行使用メモリ 77,928 KB
最終ジャッジ日時 2023-09-21 10:20:44
合計ジャッジ時間 8,394 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,176 KB
testcase_01 AC 75 ms
71,176 KB
testcase_02 AC 75 ms
70,784 KB
testcase_03 AC 77 ms
71,204 KB
testcase_04 AC 76 ms
71,240 KB
testcase_05 AC 141 ms
76,876 KB
testcase_06 AC 76 ms
71,360 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 85 ms
76,072 KB
testcase_11 AC 85 ms
75,892 KB
testcase_12 AC 135 ms
77,624 KB
testcase_13 AC 80 ms
75,280 KB
testcase_14 AC 82 ms
76,084 KB
testcase_15 AC 74 ms
71,180 KB
testcase_16 WA -
testcase_17 AC 75 ms
71,212 KB
testcase_18 AC 96 ms
76,280 KB
testcase_19 AC 95 ms
76,324 KB
testcase_20 AC 153 ms
77,528 KB
testcase_21 AC 142 ms
77,424 KB
testcase_22 AC 151 ms
77,348 KB
testcase_23 AC 81 ms
75,708 KB
testcase_24 AC 127 ms
77,432 KB
testcase_25 AC 90 ms
75,972 KB
testcase_26 WA -
testcase_27 AC 143 ms
77,504 KB
testcase_28 WA -
testcase_29 AC 153 ms
77,476 KB
testcase_30 WA -
testcase_31 AC 140 ms
77,644 KB
testcase_32 AC 132 ms
77,400 KB
testcase_33 AC 150 ms
77,688 KB
testcase_34 WA -
testcase_35 AC 149 ms
77,928 KB
testcase_36 AC 76 ms
71,180 KB
testcase_37 AC 76 ms
71,024 KB
testcase_38 AC 77 ms
71,168 KB
testcase_39 AC 76 ms
71,244 KB
testcase_40 AC 77 ms
71,164 KB
testcase_41 AC 79 ms
71,172 KB
testcase_42 AC 77 ms
71,084 KB
testcase_43 AC 90 ms
76,052 KB
testcase_44 AC 96 ms
76,240 KB
testcase_45 AC 81 ms
75,272 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

break_flg = False
for d in range((H + 1) // 2):
    for r in range((W + 1) // 2):

        if (d == 0) and (r == 0):
            continue

        T = [[0 if G[i][j] == '#' else -1 for j in range(W)] for i in range(H)]
        for i in range(H):
            for j in range(W):
                if T[i][j] == 0:
                    if not ((0 <= i + d < H) and (0 <= j + r < W)):
                        break_flg = True
                        break

                    if T[i + d][j + r] == 0:
                        T[i + d][j + r] += 1
                    else:
                        break_flg = True
                        break

            if break_flg:
                break_flg = False
                break

        else:
            print('YES')
            exit()

print('NO')
0