結果

問題 No.179 塗り分け
ユーザー caleicalei
提出日時 2020-01-01 19:13:08
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 665 bytes
コンパイル時間 147 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 78,464 KB
最終ジャッジ日時 2024-05-02 05:03:38
合計ジャッジ時間 8,809 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
53,376 KB
testcase_01 AC 42 ms
53,760 KB
testcase_02 AC 43 ms
53,632 KB
testcase_03 AC 43 ms
53,632 KB
testcase_04 AC 43 ms
54,144 KB
testcase_05 AC 105 ms
77,056 KB
testcase_06 AC 58 ms
65,664 KB
testcase_07 AC 389 ms
77,696 KB
testcase_08 AC 324 ms
77,952 KB
testcase_09 WA -
testcase_10 AC 55 ms
64,128 KB
testcase_11 AC 56 ms
64,256 KB
testcase_12 AC 300 ms
78,208 KB
testcase_13 AC 53 ms
62,080 KB
testcase_14 AC 60 ms
67,328 KB
testcase_15 AC 40 ms
53,248 KB
testcase_16 AC 41 ms
53,248 KB
testcase_17 AC 41 ms
53,376 KB
testcase_18 AC 86 ms
76,800 KB
testcase_19 AC 83 ms
76,672 KB
testcase_20 AC 311 ms
77,952 KB
testcase_21 AC 336 ms
77,824 KB
testcase_22 AC 409 ms
77,952 KB
testcase_23 AC 64 ms
69,504 KB
testcase_24 AC 337 ms
77,824 KB
testcase_25 AC 203 ms
77,952 KB
testcase_26 WA -
testcase_27 AC 313 ms
77,824 KB
testcase_28 WA -
testcase_29 AC 330 ms
77,952 KB
testcase_30 WA -
testcase_31 AC 311 ms
77,824 KB
testcase_32 AC 178 ms
77,312 KB
testcase_33 AC 335 ms
77,824 KB
testcase_34 WA -
testcase_35 AC 308 ms
77,952 KB
testcase_36 AC 41 ms
53,632 KB
testcase_37 AC 39 ms
53,504 KB
testcase_38 AC 39 ms
53,760 KB
testcase_39 AC 39 ms
53,632 KB
testcase_40 AC 49 ms
60,800 KB
testcase_41 AC 40 ms
53,632 KB
testcase_42 AC 44 ms
54,144 KB
testcase_43 AC 81 ms
76,416 KB
testcase_44 AC 106 ms
76,672 KB
testcase_45 AC 62 ms
67,712 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# 2020/01/01
# 解答かんにんぐ

from copy import deepcopy

h,w=map(int,input().split())
s=[list(input()) for _ in range(h)]


def check(x,y):
    g=deepcopy(s)
    flag=False
    for i in range(h):
        for j in range(w):
            if g[i][j] in ['.','R','B']:continue
            if i+y>=h or j+x>=w:return False
            if g[i][j]==g[i+y][j+x]=='#':
                flag=True
                g[i][j]='R'
                g[i+y][j+x]='B'
            else:return False
    return flag


for x in range(w):
    for y in range(h):
        if x==y==0:continue
        res=check(x,y)
        if res:
            print('YES')
            exit()
print('NO')
0