結果

問題 No.179 塗り分け
ユーザー yaoshimaxyaoshimax
提出日時 2015-05-06 21:28:09
言語 PyPy2
(7.3.15)
結果
WA  
実行時間 -
コード長 654 bytes
コンパイル時間 684 ms
コンパイル使用メモリ 76,800 KB
実行使用メモリ 79,232 KB
最終ジャッジ日時 2024-10-02 14:15:52
合計ジャッジ時間 9,222 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
75,392 KB
testcase_01 AC 84 ms
75,392 KB
testcase_02 AC 83 ms
75,392 KB
testcase_03 AC 86 ms
75,264 KB
testcase_04 AC 85 ms
75,520 KB
testcase_05 AC 140 ms
78,336 KB
testcase_06 AC 85 ms
75,136 KB
testcase_07 WA -
testcase_08 AC 172 ms
77,952 KB
testcase_09 WA -
testcase_10 AC 90 ms
77,440 KB
testcase_11 AC 89 ms
76,928 KB
testcase_12 AC 266 ms
79,104 KB
testcase_13 AC 95 ms
77,440 KB
testcase_14 AC 91 ms
77,824 KB
testcase_15 AC 83 ms
75,520 KB
testcase_16 AC 84 ms
75,648 KB
testcase_17 AC 92 ms
76,032 KB
testcase_18 AC 113 ms
78,080 KB
testcase_19 AC 116 ms
78,720 KB
testcase_20 AC 225 ms
78,720 KB
testcase_21 AC 179 ms
78,592 KB
testcase_22 AC 229 ms
79,104 KB
testcase_23 AC 91 ms
77,568 KB
testcase_24 AC 188 ms
78,592 KB
testcase_25 AC 105 ms
78,208 KB
testcase_26 WA -
testcase_27 AC 235 ms
78,720 KB
testcase_28 WA -
testcase_29 AC 296 ms
78,336 KB
testcase_30 WA -
testcase_31 AC 314 ms
78,720 KB
testcase_32 AC 176 ms
79,232 KB
testcase_33 AC 285 ms
78,720 KB
testcase_34 WA -
testcase_35 AC 318 ms
78,592 KB
testcase_36 AC 83 ms
75,392 KB
testcase_37 AC 83 ms
75,264 KB
testcase_38 AC 83 ms
75,776 KB
testcase_39 AC 87 ms
75,264 KB
testcase_40 AC 85 ms
75,264 KB
testcase_41 AC 86 ms
75,520 KB
testcase_42 AC 85 ms
75,520 KB
testcase_43 AC 120 ms
78,464 KB
testcase_44 AC 143 ms
78,592 KB
testcase_45 AC 108 ms
78,080 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

H,W=map(int,raw_input().split())
board=[raw_input() for i in range(H)]

for dx in range(H):
    for dy in range(W):
        if dx==0 and dy==0:
            continue
        used=[[False for i in range(W)]for j in range(H)]
        ok=True
        for h in range(H):
            for w in range(W):
                if board[h][w]=='#' and used[h][w]==False:
                    if h+dx>=H or w+dy>=W:
                        ok=False
                    elif board[h+dx][w+dy]=='.':
                        ok=False
                    else:
                        used[h+dx][w+dy]=True
        if ok:
            print"YES"
            exit()
print "NO"
0