結果

問題 No.179 塗り分け
ユーザー gorugo30gorugo30
提出日時 2021-03-16 23:13:44
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 864 bytes
コンパイル時間 345 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 76,772 KB
最終ジャッジ日時 2024-04-26 06:13:46
合計ジャッジ時間 5,642 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
52,224 KB
testcase_01 AC 37 ms
52,352 KB
testcase_02 AC 37 ms
52,224 KB
testcase_03 AC 37 ms
51,968 KB
testcase_04 AC 38 ms
51,968 KB
testcase_05 AC 83 ms
76,288 KB
testcase_06 AC 38 ms
52,352 KB
testcase_07 WA -
testcase_08 AC 150 ms
76,288 KB
testcase_09 WA -
testcase_10 AC 44 ms
59,264 KB
testcase_11 AC 46 ms
59,648 KB
testcase_12 AC 149 ms
76,572 KB
testcase_13 AC 44 ms
59,648 KB
testcase_14 AC 44 ms
60,416 KB
testcase_15 AC 37 ms
51,968 KB
testcase_16 AC 37 ms
52,224 KB
testcase_17 AC 37 ms
51,968 KB
testcase_18 AC 65 ms
70,528 KB
testcase_19 AC 66 ms
70,912 KB
testcase_20 AC 149 ms
76,544 KB
testcase_21 AC 158 ms
76,416 KB
testcase_22 AC 203 ms
76,544 KB
testcase_23 AC 46 ms
59,776 KB
testcase_24 AC 171 ms
76,416 KB
testcase_25 AC 56 ms
65,152 KB
testcase_26 WA -
testcase_27 AC 166 ms
76,672 KB
testcase_28 WA -
testcase_29 AC 176 ms
76,772 KB
testcase_30 WA -
testcase_31 AC 172 ms
76,416 KB
testcase_32 AC 114 ms
76,544 KB
testcase_33 AC 177 ms
76,544 KB
testcase_34 WA -
testcase_35 AC 173 ms
76,544 KB
testcase_36 AC 37 ms
52,352 KB
testcase_37 AC 38 ms
52,352 KB
testcase_38 AC 37 ms
52,352 KB
testcase_39 AC 38 ms
52,096 KB
testcase_40 AC 37 ms
52,224 KB
testcase_41 AC 37 ms
52,224 KB
testcase_42 AC 37 ms
52,224 KB
testcase_43 AC 65 ms
71,296 KB
testcase_44 AC 87 ms
76,160 KB
testcase_45 AC 53 ms
63,744 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

for tatehoukounoshift in range(H):
    for yokohoukounoshift in range(W):
        if tatehoukounoshift == yokohoukounoshift == 0:
            continue
        can = True
        used = [[False] * W for i in range(H)]
        for i in range(H):
            for j in range(W):
                if used[i][j] or grid[i][j] == ".":
                    continue
                if not (0 <= i + tatehoukounoshift < H and 0 <= j + yokohoukounoshift < W):
                    can = False
                    break
                if grid[i + tatehoukounoshift][j + yokohoukounoshift] == ".":
                    can = False
                used[i][j] = True
                used[i + tatehoukounoshift][j + yokohoukounoshift] = True
        if can:
            print("YES")
            exit()
print("NO")
0