結果

問題 No.179 塗り分け
ユーザー NoneNone
提出日時 2021-05-01 09:16:38
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 835 bytes
コンパイル時間 287 ms
コンパイル使用メモリ 86,940 KB
実行使用メモリ 77,744 KB
最終ジャッジ日時 2023-09-26 21:30:44
合計ジャッジ時間 6,632 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,424 KB
testcase_01 AC 71 ms
71,280 KB
testcase_02 AC 72 ms
71,060 KB
testcase_03 AC 71 ms
71,284 KB
testcase_04 AC 75 ms
71,384 KB
testcase_05 AC 93 ms
76,648 KB
testcase_06 AC 75 ms
71,332 KB
testcase_07 WA -
testcase_08 AC 107 ms
77,684 KB
testcase_09 WA -
testcase_10 AC 81 ms
75,912 KB
testcase_11 AC 82 ms
76,044 KB
testcase_12 AC 115 ms
77,380 KB
testcase_13 AC 75 ms
71,160 KB
testcase_14 AC 77 ms
75,352 KB
testcase_15 AC 73 ms
70,928 KB
testcase_16 AC 71 ms
71,280 KB
testcase_17 AC 73 ms
71,108 KB
testcase_18 AC 84 ms
76,172 KB
testcase_19 AC 83 ms
76,316 KB
testcase_20 AC 108 ms
77,420 KB
testcase_21 AC 115 ms
77,616 KB
testcase_22 AC 143 ms
77,224 KB
testcase_23 AC 82 ms
75,896 KB
testcase_24 AC 109 ms
77,308 KB
testcase_25 AC 80 ms
76,108 KB
testcase_26 WA -
testcase_27 AC 101 ms
77,288 KB
testcase_28 WA -
testcase_29 AC 113 ms
77,588 KB
testcase_30 WA -
testcase_31 AC 103 ms
77,172 KB
testcase_32 AC 98 ms
77,744 KB
testcase_33 AC 109 ms
77,672 KB
testcase_34 WA -
testcase_35 AC 107 ms
77,524 KB
testcase_36 AC 71 ms
71,280 KB
testcase_37 AC 74 ms
71,064 KB
testcase_38 AC 73 ms
71,440 KB
testcase_39 AC 73 ms
71,448 KB
testcase_40 AC 72 ms
71,164 KB
testcase_41 AC 71 ms
71,260 KB
testcase_42 AC 71 ms
71,400 KB
testcase_43 AC 77 ms
75,708 KB
testcase_44 AC 84 ms
76,228 KB
testcase_45 AC 73 ms
71,332 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

H,W=map(int,input().split())
grid=[[0]*W for _ in range(H)]
for h in range(H):
    for w,s in enumerate(input().rstrip()):
        grid[h][w]=s

for h0 in range(H):
    for w0 in range(W):
        if (h0,w0)==(0,0):
            continue
        flg=0
        used=[[0]*W for _ in range(H)]
        for h in range(H):
            for w in range(W):
                if grid[h][w]==".":
                    continue
                if grid[h][w]=="#":
                    if used[h][w]==1:
                        continue
                    if not (h+h0>=H or w+w0>=W or grid[h+h0][w+w0]=="."):
                        used[h+h0][w+w0]=1
                        continue
                flg=1
                break
            if flg==1:
                break
        if flg==0:
            print("YES")
            exit()
print("NO")

0