結果

問題 No.179 塗り分け
ユーザー FromBooskaFromBooska
提出日時 2024-02-23 18:42:50
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 819 bytes
コンパイル時間 201 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 83,260 KB
最終ジャッジ日時 2024-02-23 18:43:07
合計ジャッジ時間 15,628 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,460 KB
testcase_01 AC 37 ms
53,460 KB
testcase_02 AC 37 ms
53,460 KB
testcase_03 AC 37 ms
53,460 KB
testcase_04 AC 37 ms
53,460 KB
testcase_05 AC 113 ms
75,824 KB
testcase_06 AC 93 ms
75,700 KB
testcase_07 WA -
testcase_08 AC 50 ms
64,340 KB
testcase_09 WA -
testcase_10 AC 1,194 ms
83,260 KB
testcase_11 AC 1,000 ms
81,348 KB
testcase_12 AC 1,022 ms
81,340 KB
testcase_13 AC 37 ms
53,460 KB
testcase_14 AC 38 ms
53,460 KB
testcase_15 AC 36 ms
53,460 KB
testcase_16 AC 37 ms
53,460 KB
testcase_17 AC 37 ms
53,460 KB
testcase_18 AC 600 ms
77,872 KB
testcase_19 AC 548 ms
77,740 KB
testcase_20 AC 557 ms
77,616 KB
testcase_21 AC 150 ms
75,672 KB
testcase_22 AC 159 ms
75,988 KB
testcase_23 AC 358 ms
76,528 KB
testcase_24 AC 135 ms
75,712 KB
testcase_25 AC 153 ms
75,916 KB
testcase_26 WA -
testcase_27 AC 396 ms
76,516 KB
testcase_28 WA -
testcase_29 AC 579 ms
77,748 KB
testcase_30 WA -
testcase_31 AC 699 ms
78,616 KB
testcase_32 AC 726 ms
78,876 KB
testcase_33 AC 689 ms
78,724 KB
testcase_34 WA -
testcase_35 AC 807 ms
79,652 KB
testcase_36 AC 37 ms
53,460 KB
testcase_37 AC 38 ms
53,460 KB
testcase_38 AC 38 ms
53,460 KB
testcase_39 AC 37 ms
53,460 KB
testcase_40 AC 37 ms
53,460 KB
testcase_41 AC 37 ms
53,460 KB
testcase_42 AC 37 ms
53,460 KB
testcase_43 AC 65 ms
72,720 KB
testcase_44 AC 123 ms
75,824 KB
testcase_45 AC 53 ms
66,168 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

H, W = map(int, input().split())
S = []
dots = []
for i in range(H):
    temp = list(input())
    S.append(temp)
    for j in range(W):
        if temp[j] == '#':
            dots.append((i, j))

#print(S)
#print(dots)

dots_set = set(dots)
ans = 'NO'

for di in range(0, H):
    for dj in range(0, W):
        if di==0 and dj==0:
            continue
        covered = set()
        test = True
        for i, j in dots:
            if (i, j) in covered:
                continue
            #print('i', i, 'j', j, (i+di, j+dj) in dots_set, test)
            if (i+di, j+dj) in dots_set:
                covered.add((i+di, j+dj))
            else:
                test = False
            covered.add((i, j))
        #print('di', di, 'dj', dj, covered, test)
        if test == True:
            ans = 'YES'
print(ans)
0