結果

問題 No.179 塗り分け
ユーザー AEnAEn
提出日時 2022-05-13 13:14:30
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 862 bytes
コンパイル時間 227 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 76,928 KB
最終ジャッジ日時 2024-07-21 11:04:10
合計ジャッジ時間 4,372 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
51,968 KB
testcase_01 AC 39 ms
52,096 KB
testcase_02 AC 39 ms
52,096 KB
testcase_03 AC 39 ms
51,968 KB
testcase_04 AC 38 ms
52,224 KB
testcase_05 AC 60 ms
66,944 KB
testcase_06 AC 41 ms
52,096 KB
testcase_07 WA -
testcase_08 AC 51 ms
62,592 KB
testcase_09 WA -
testcase_10 AC 48 ms
60,672 KB
testcase_11 AC 49 ms
60,928 KB
testcase_12 AC 105 ms
76,928 KB
testcase_13 AC 40 ms
51,840 KB
testcase_14 AC 41 ms
51,968 KB
testcase_15 AC 39 ms
51,968 KB
testcase_16 AC 40 ms
51,968 KB
testcase_17 AC 40 ms
51,712 KB
testcase_18 AC 49 ms
60,672 KB
testcase_19 AC 50 ms
61,056 KB
testcase_20 AC 86 ms
76,620 KB
testcase_21 AC 76 ms
70,144 KB
testcase_22 AC 122 ms
75,904 KB
testcase_23 AC 47 ms
59,520 KB
testcase_24 AC 75 ms
72,704 KB
testcase_25 AC 49 ms
60,032 KB
testcase_26 WA -
testcase_27 AC 70 ms
70,656 KB
testcase_28 WA -
testcase_29 AC 76 ms
72,832 KB
testcase_30 WA -
testcase_31 AC 64 ms
68,224 KB
testcase_32 AC 60 ms
66,044 KB
testcase_33 AC 70 ms
71,296 KB
testcase_34 WA -
testcase_35 AC 69 ms
70,784 KB
testcase_36 AC 38 ms
51,840 KB
testcase_37 AC 38 ms
51,840 KB
testcase_38 AC 39 ms
52,352 KB
testcase_39 AC 39 ms
51,968 KB
testcase_40 AC 39 ms
51,968 KB
testcase_41 AC 39 ms
52,096 KB
testcase_42 AC 41 ms
52,480 KB
testcase_43 AC 42 ms
52,992 KB
testcase_44 AC 52 ms
61,568 KB
testcase_45 AC 41 ms
51,968 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