結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
75,900 KB
testcase_01 WA -
testcase_02 AC 69 ms
75,292 KB
testcase_03 WA -
testcase_04 AC 69 ms
75,412 KB
testcase_05 AC 203 ms
78,904 KB
testcase_06 AC 135 ms
79,220 KB
testcase_07 AC 296 ms
78,364 KB
testcase_08 AC 197 ms
78,464 KB
testcase_09 AC 192 ms
78,728 KB
testcase_10 AC 76 ms
77,604 KB
testcase_11 AC 77 ms
77,584 KB
testcase_12 WA -
testcase_13 AC 80 ms
77,728 KB
testcase_14 WA -
testcase_15 AC 69 ms
75,536 KB
testcase_16 AC 72 ms
75,836 KB
testcase_17 AC 68 ms
75,548 KB
testcase_18 AC 76 ms
77,856 KB
testcase_19 AC 79 ms
77,708 KB
testcase_20 AC 600 ms
79,196 KB
testcase_21 AC 356 ms
79,500 KB
testcase_22 AC 586 ms
79,588 KB
testcase_23 AC 209 ms
78,860 KB
testcase_24 AC 346 ms
79,140 KB
testcase_25 AC 247 ms
79,328 KB
testcase_26 AC 143 ms
78,728 KB
testcase_27 AC 595 ms
79,208 KB
testcase_28 AC 130 ms
79,116 KB
testcase_29 AC 890 ms
79,520 KB
testcase_30 AC 287 ms
78,832 KB
testcase_31 AC 923 ms
79,732 KB
testcase_32 AC 237 ms
79,028 KB
testcase_33 AC 855 ms
79,844 KB
testcase_34 AC 214 ms
79,744 KB
testcase_35 AC 975 ms
79,804 KB
testcase_36 AC 71 ms
75,436 KB
testcase_37 AC 68 ms
75,796 KB
testcase_38 AC 71 ms
75,692 KB
testcase_39 AC 69 ms
75,408 KB
testcase_40 AC 77 ms
77,728 KB
testcase_41 AC 70 ms
75,660 KB
testcase_42 AC 77 ms
77,852 KB
testcase_43 AC 138 ms
79,264 KB
testcase_44 AC 220 ms
78,764 KB
testcase_45 AC 120 ms
78,864 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

for dx in range(-H+1,H,+1):
    for dy in range(-W+1,W,+1):
        if dx==0 and dy==0:
            continue
        used=[[False for i in range(W)]for j in range(H)]
        ok=True
        cnt=0
        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:
                        cnt+=1
                        used[h+dx][w+dy]=True
        if ok and cnt>0:
            print"YES"
            exit()
print "NO"
0