結果

問題 No.179 塗り分け
ユーザー convexineqconvexineq
提出日時 2020-12-13 13:48:51
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 619 bytes
コンパイル時間 160 ms
コンパイル使用メモリ 81,672 KB
実行使用メモリ 75,944 KB
最終ジャッジ日時 2023-10-20 03:41:00
合計ジャッジ時間 4,650 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
53,400 KB
testcase_01 AC 40 ms
53,400 KB
testcase_02 AC 39 ms
53,400 KB
testcase_03 AC 40 ms
53,400 KB
testcase_04 AC 40 ms
53,400 KB
testcase_05 AC 55 ms
68,144 KB
testcase_06 AC 40 ms
53,400 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 47 ms
59,528 KB
testcase_11 AC 46 ms
59,528 KB
testcase_12 AC 80 ms
75,788 KB
testcase_13 AC 39 ms
53,400 KB
testcase_14 AC 40 ms
53,400 KB
testcase_15 AC 39 ms
53,400 KB
testcase_16 WA -
testcase_17 AC 40 ms
53,400 KB
testcase_18 AC 49 ms
61,776 KB
testcase_19 AC 49 ms
61,776 KB
testcase_20 AC 78 ms
75,760 KB
testcase_21 AC 81 ms
75,768 KB
testcase_22 AC 109 ms
75,808 KB
testcase_23 AC 46 ms
59,264 KB
testcase_24 AC 76 ms
75,752 KB
testcase_25 AC 46 ms
59,468 KB
testcase_26 WA -
testcase_27 AC 76 ms
75,724 KB
testcase_28 WA -
testcase_29 AC 81 ms
75,944 KB
testcase_30 WA -
testcase_31 AC 76 ms
75,740 KB
testcase_32 AC 63 ms
75,096 KB
testcase_33 AC 82 ms
75,712 KB
testcase_34 WA -
testcase_35 AC 80 ms
75,688 KB
testcase_36 AC 39 ms
53,400 KB
testcase_37 AC 39 ms
53,400 KB
testcase_38 AC 39 ms
53,400 KB
testcase_39 AC 39 ms
53,400 KB
testcase_40 AC 40 ms
53,400 KB
testcase_41 AC 40 ms
53,400 KB
testcase_42 AC 40 ms
53,400 KB
testcase_43 AC 46 ms
61,212 KB
testcase_44 AC 51 ms
67,484 KB
testcase_45 AC 40 ms
53,400 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def check(a,b):
    valid = [vi[:] for vi in V]
    for i in range(h):
        for j in range(w):
            if valid[i][j]:
                if i+a >= h or j+b >= w or valid[i+a][j+b]==0:
                    return 0
                else:
                    valid[i+a][j+b] = 0
    return 1
    
h,w = map(int,input().split())
b = [input() for _ in range(h)]
V = [[1 if b[i][j]== "#" else 0 for j in range(w)] for i in range(h)]

ok = 0
for i in range(h-1):
    for j in range(w-1):
        if i==j==0: continue
        if check(i,j):
            ok = 1
            break
    if ok: break
print("YES" if ok else "NO")
0