結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
75,552 KB
testcase_01 AC 75 ms
75,524 KB
testcase_02 AC 75 ms
75,140 KB
testcase_03 AC 76 ms
75,624 KB
testcase_04 AC 75 ms
75,400 KB
testcase_05 AC 136 ms
78,628 KB
testcase_06 AC 75 ms
75,620 KB
testcase_07 WA -
testcase_08 AC 161 ms
78,356 KB
testcase_09 WA -
testcase_10 AC 80 ms
77,068 KB
testcase_11 AC 82 ms
77,052 KB
testcase_12 AC 265 ms
78,624 KB
testcase_13 AC 84 ms
77,472 KB
testcase_14 AC 83 ms
77,820 KB
testcase_15 AC 76 ms
75,692 KB
testcase_16 AC 77 ms
75,900 KB
testcase_17 AC 75 ms
75,832 KB
testcase_18 AC 109 ms
78,340 KB
testcase_19 AC 108 ms
78,884 KB
testcase_20 AC 223 ms
78,624 KB
testcase_21 AC 173 ms
78,644 KB
testcase_22 AC 231 ms
78,980 KB
testcase_23 AC 82 ms
77,588 KB
testcase_24 AC 183 ms
78,620 KB
testcase_25 AC 95 ms
78,492 KB
testcase_26 WA -
testcase_27 AC 227 ms
78,520 KB
testcase_28 WA -
testcase_29 AC 293 ms
78,960 KB
testcase_30 WA -
testcase_31 AC 317 ms
78,644 KB
testcase_32 AC 170 ms
78,484 KB
testcase_33 AC 286 ms
79,116 KB
testcase_34 WA -
testcase_35 AC 306 ms
79,140 KB
testcase_36 AC 76 ms
75,556 KB
testcase_37 AC 75 ms
75,416 KB
testcase_38 AC 75 ms
75,692 KB
testcase_39 AC 76 ms
75,428 KB
testcase_40 AC 74 ms
75,540 KB
testcase_41 AC 76 ms
75,420 KB
testcase_42 AC 76 ms
75,304 KB
testcase_43 AC 112 ms
79,144 KB
testcase_44 AC 133 ms
78,616 KB
testcase_45 AC 99 ms
78,476 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