結果

問題 No.179 塗り分け
ユーザー Woo-CieWoo-Cie
提出日時 2019-03-23 11:36:38
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 958 bytes
コンパイル時間 129 ms
コンパイル使用メモリ 11,856 KB
実行使用メモリ 42,560 KB
最終ジャッジ日時 2023-10-22 02:09:29
合計ジャッジ時間 46,902 ms
ジャッジサーバーID
(参考情報)
judge9 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 486 ms
42,268 KB
testcase_01 AC 490 ms
42,268 KB
testcase_02 AC 483 ms
42,308 KB
testcase_03 AC 483 ms
42,268 KB
testcase_04 AC 488 ms
42,268 KB
testcase_05 AC 602 ms
42,268 KB
testcase_06 AC 488 ms
42,268 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 492 ms
42,308 KB
testcase_11 AC 488 ms
42,268 KB
testcase_12 AC 1,990 ms
42,268 KB
testcase_13 AC 494 ms
42,268 KB
testcase_14 AC 489 ms
42,268 KB
testcase_15 AC 496 ms
42,268 KB
testcase_16 AC 490 ms
42,308 KB
testcase_17 AC 492 ms
42,268 KB
testcase_18 AC 547 ms
42,268 KB
testcase_19 AC 541 ms
42,268 KB
testcase_20 AC 1,596 ms
42,308 KB
testcase_21 AC 1,381 ms
42,308 KB
testcase_22 AC 1,376 ms
42,520 KB
testcase_23 AC 504 ms
42,268 KB
testcase_24 AC 1,357 ms
42,268 KB
testcase_25 AC 514 ms
42,268 KB
testcase_26 WA -
testcase_27 AC 1,581 ms
42,308 KB
testcase_28 WA -
testcase_29 AC 1,726 ms
42,268 KB
testcase_30 WA -
testcase_31 AC 1,797 ms
42,268 KB
testcase_32 AC 1,230 ms
42,268 KB
testcase_33 AC 1,864 ms
42,268 KB
testcase_34 WA -
testcase_35 AC 1,939 ms
42,268 KB
testcase_36 AC 486 ms
42,268 KB
testcase_37 AC 491 ms
42,268 KB
testcase_38 AC 489 ms
42,268 KB
testcase_39 AC 489 ms
42,308 KB
testcase_40 AC 494 ms
42,268 KB
testcase_41 AC 492 ms
42,268 KB
testcase_42 AC 498 ms
42,268 KB
testcase_43 AC 512 ms
42,268 KB
testcase_44 AC 627 ms
42,308 KB
testcase_45 AC 489 ms
42,268 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
# -*- coding: utf-8-*-
import numpy as np
if __name__ == '__main__':
    h, w = map(int, input().split(" "))
    l = []
    for i in range(h):
        l.append(list(input()))
    l = np.array(l)
    for i in range(0, h//2+1):
        for j in range(0,w//2+1):
            if i == 0 and j == 0:
                continue
            tl = np.copy(l)
            flag = True
            for a in range(h):
                for b in range(w):
                    if tl[a, b] == "#":
                        if a+i >= h:
                            flag = False
                        elif b+j >= w:
                            flag = False
                        elif tl[a+i, b+j] == "#":
                            tl[a,b] = "."
                            tl[a+i, b+j] = "."
                        else:
                            flag = False
            if flag:
                print("YES")
                exit()
    print("NO")

0