結果

問題 No.179 塗り分け
ユーザー AEnAEn
提出日時 2022-05-13 13:14:30
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 862 bytes
コンパイル時間 290 ms
コンパイル使用メモリ 87,180 KB
実行使用メモリ 77,960 KB
最終ジャッジ日時 2023-09-28 16:20:06
合計ジャッジ時間 7,084 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,312 KB
testcase_01 AC 76 ms
71,576 KB
testcase_02 AC 80 ms
71,236 KB
testcase_03 AC 80 ms
71,504 KB
testcase_04 AC 75 ms
71,328 KB
testcase_05 AC 97 ms
76,780 KB
testcase_06 AC 77 ms
71,452 KB
testcase_07 WA -
testcase_08 AC 91 ms
76,588 KB
testcase_09 WA -
testcase_10 AC 85 ms
76,424 KB
testcase_11 AC 83 ms
76,120 KB
testcase_12 AC 137 ms
77,768 KB
testcase_13 AC 78 ms
71,424 KB
testcase_14 AC 78 ms
71,300 KB
testcase_15 AC 77 ms
71,500 KB
testcase_16 AC 77 ms
71,464 KB
testcase_17 AC 77 ms
71,372 KB
testcase_18 AC 84 ms
76,320 KB
testcase_19 AC 88 ms
76,100 KB
testcase_20 AC 116 ms
77,548 KB
testcase_21 AC 110 ms
76,964 KB
testcase_22 AC 157 ms
77,960 KB
testcase_23 AC 84 ms
76,076 KB
testcase_24 AC 110 ms
77,932 KB
testcase_25 AC 84 ms
76,264 KB
testcase_26 WA -
testcase_27 AC 107 ms
77,192 KB
testcase_28 WA -
testcase_29 AC 112 ms
77,320 KB
testcase_30 WA -
testcase_31 AC 99 ms
76,736 KB
testcase_32 AC 96 ms
76,384 KB
testcase_33 AC 106 ms
77,020 KB
testcase_34 WA -
testcase_35 AC 107 ms
77,320 KB
testcase_36 AC 78 ms
71,368 KB
testcase_37 AC 80 ms
71,528 KB
testcase_38 AC 78 ms
71,336 KB
testcase_39 AC 77 ms
71,224 KB
testcase_40 AC 77 ms
71,364 KB
testcase_41 AC 76 ms
71,500 KB
testcase_42 AC 78 ms
71,568 KB
testcase_43 AC 78 ms
71,668 KB
testcase_44 AC 89 ms
76,156 KB
testcase_45 AC 81 ms
71,284 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

H, W = map(int, input().split())
c = []
for _ in range(H):
    c.append(list(input()))
for i in range(H):
    for j in range(W):
        if i == j == 0:
            continue
        b = set()
        f = False
        for x in range(H):
            for y in range(W):
                if x+i>H-1 or y+j>W-1:
                    if (x, y) not in b and c[x][y] == '#':
                        f = True
                        break
                    else:
                        continue
                if c[x][y]=='.' or (x, y) in b:
                    continue
                b.add((x, y))
                if c[x+i][y+j] == '.':
                    f = True
                    break
                else:
                    b.add((x+i, y+j))
            if f:
                break
        if not f:
            print('YES')
            exit()
print('NO')
0