結果

問題 No.179 塗り分け
ユーザー mkawa2mkawa2
提出日時 2019-10-26 22:21:14
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 808 bytes
コンパイル時間 352 ms
コンパイル使用メモリ 87,056 KB
実行使用メモリ 85,128 KB
最終ジャッジ日時 2023-10-12 20:56:38
合計ジャッジ時間 19,230 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 88 ms
71,460 KB
testcase_01 AC 91 ms
71,568 KB
testcase_02 AC 94 ms
71,652 KB
testcase_03 AC 90 ms
71,512 KB
testcase_04 AC 92 ms
71,408 KB
testcase_05 AC 204 ms
78,788 KB
testcase_06 AC 95 ms
76,420 KB
testcase_07 AC 605 ms
81,992 KB
testcase_08 AC 591 ms
81,660 KB
testcase_09 WA -
testcase_10 AC 104 ms
77,104 KB
testcase_11 AC 104 ms
77,344 KB
testcase_12 AC 812 ms
84,876 KB
testcase_13 AC 98 ms
76,188 KB
testcase_14 AC 106 ms
77,364 KB
testcase_15 AC 89 ms
71,572 KB
testcase_16 AC 90 ms
71,260 KB
testcase_17 AC 90 ms
71,460 KB
testcase_18 AC 124 ms
77,188 KB
testcase_19 AC 122 ms
77,360 KB
testcase_20 AC 745 ms
83,764 KB
testcase_21 AC 645 ms
81,560 KB
testcase_22 AC 669 ms
82,344 KB
testcase_23 AC 103 ms
76,092 KB
testcase_24 AC 631 ms
82,724 KB
testcase_25 AC 114 ms
77,352 KB
testcase_26 WA -
testcase_27 AC 739 ms
83,516 KB
testcase_28 WA -
testcase_29 AC 810 ms
84,068 KB
testcase_30 WA -
testcase_31 AC 841 ms
84,068 KB
testcase_32 AC 308 ms
78,400 KB
testcase_33 AC 833 ms
84,972 KB
testcase_34 WA -
testcase_35 AC 873 ms
84,336 KB
testcase_36 AC 91 ms
71,404 KB
testcase_37 AC 92 ms
71,408 KB
testcase_38 AC 94 ms
71,356 KB
testcase_39 AC 96 ms
71,584 KB
testcase_40 AC 104 ms
76,052 KB
testcase_41 AC 96 ms
71,404 KB
testcase_42 AC 99 ms
71,580 KB
testcase_43 AC 138 ms
77,892 KB
testcase_44 AC 214 ms
78,008 KB
testcase_45 AC 118 ms
77,372 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
from copy import deepcopy

sys.setrecursionlimit(10 ** 6)

def main():
    h, w = map(int, input().split())
    t0 = [[-1 if c == "#" else 0 for c in input()] for _ in range(h)]
    for di in range(h):
        for dj in range(w):
            flag=True
            t = deepcopy(t0)
            br = False
            for i in range(h):
                for j in range(w):
                    if t[i][j] != -1: continue
                    t[i][j] = 1
                    if i + di >= h or j + dj >= w or t[i + di][j + dj] != -1:
                        br = True
                        break
                    flag=False
                    t[i + di][j + dj] = 2
                if br: break
            if br or flag: continue
            print("YES")
            exit()
    print("NO")

main()
0