結果

問題 No.179 塗り分け
ユーザー とりすけとりすけ
提出日時 2023-05-02 00:49:08
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 521 bytes
コンパイル時間 2,243 ms
コンパイル使用メモリ 86,768 KB
実行使用メモリ 81,676 KB
最終ジャッジ日時 2023-08-13 03:29:21
合計ジャッジ時間 12,022 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
71,304 KB
testcase_01 AC 86 ms
71,304 KB
testcase_02 AC 87 ms
71,444 KB
testcase_03 AC 86 ms
71,804 KB
testcase_04 AC 89 ms
71,444 KB
testcase_05 AC 172 ms
79,296 KB
testcase_06 AC 85 ms
71,592 KB
testcase_07 WA -
testcase_08 AC 358 ms
79,868 KB
testcase_09 WA -
testcase_10 AC 95 ms
76,472 KB
testcase_11 AC 95 ms
76,512 KB
testcase_12 AC 347 ms
79,040 KB
testcase_13 AC 93 ms
76,248 KB
testcase_14 AC 101 ms
77,476 KB
testcase_15 AC 83 ms
71,292 KB
testcase_16 AC 84 ms
71,616 KB
testcase_17 AC 86 ms
71,536 KB
testcase_18 AC 109 ms
78,048 KB
testcase_19 AC 109 ms
78,064 KB
testcase_20 AC 368 ms
80,688 KB
testcase_21 AC 408 ms
80,948 KB
testcase_22 AC 426 ms
80,804 KB
testcase_23 AC 94 ms
76,528 KB
testcase_24 AC 369 ms
80,392 KB
testcase_25 AC 104 ms
78,040 KB
testcase_26 WA -
testcase_27 AC 397 ms
79,856 KB
testcase_28 WA -
testcase_29 AC 395 ms
80,144 KB
testcase_30 WA -
testcase_31 AC 391 ms
79,756 KB
testcase_32 AC 182 ms
78,632 KB
testcase_33 AC 401 ms
80,068 KB
testcase_34 WA -
testcase_35 AC 400 ms
80,864 KB
testcase_36 AC 86 ms
71,340 KB
testcase_37 AC 87 ms
71,364 KB
testcase_38 AC 86 ms
71,736 KB
testcase_39 AC 87 ms
71,624 KB
testcase_40 AC 89 ms
76,228 KB
testcase_41 AC 85 ms
71,536 KB
testcase_42 AC 89 ms
71,536 KB
testcase_43 AC 115 ms
77,448 KB
testcase_44 AC 148 ms
77,924 KB
testcase_45 AC 106 ms
77,760 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
import copy

input = sys.stdin.readline

h, w = map(int, input().split())
s = [list(input().strip()) for i in range(h)]

for dy in range(h):
 for dx in range(w):
  if dy == 0 and dx == 0:
   continue
  sc = copy.deepcopy(s)
  flag = True
  for i in range(h):
   for j in range(w):
    if sc[i][j] == '#':
     if i + dy >= h or j + dx >= w or sc[i+dy][j+dx] == '.':
      flag = False
      break
     else:
      sc[i+dy][j+dx] = '.'
   if not flag:
    break
  if flag:
   print('YES')
   exit()
print('NO')
0