結果

問題 No.179 塗り分け
ユーザー とりすけとりすけ
提出日時 2023-05-02 00:55:42
言語 PyPy3
(7.3.13)
結果
WA  
実行時間 -
コード長 537 bytes
コンパイル時間 330 ms
コンパイル使用メモリ 86,964 KB
実行使用メモリ 81,428 KB
最終ジャッジ日時 2023-08-13 03:34:23
合計ジャッジ時間 11,533 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
71,700 KB
testcase_01 AC 82 ms
71,664 KB
testcase_02 AC 84 ms
71,648 KB
testcase_03 AC 88 ms
71,792 KB
testcase_04 AC 85 ms
71,792 KB
testcase_05 AC 167 ms
79,768 KB
testcase_06 AC 86 ms
71,744 KB
testcase_07 WA -
testcase_08 AC 362 ms
79,708 KB
testcase_09 WA -
testcase_10 AC 93 ms
76,548 KB
testcase_11 AC 92 ms
76,484 KB
testcase_12 AC 335 ms
79,416 KB
testcase_13 AC 90 ms
76,544 KB
testcase_14 AC 98 ms
77,404 KB
testcase_15 AC 83 ms
71,676 KB
testcase_16 AC 85 ms
71,608 KB
testcase_17 AC 86 ms
71,564 KB
testcase_18 AC 107 ms
78,300 KB
testcase_19 AC 110 ms
77,976 KB
testcase_20 AC 356 ms
80,852 KB
testcase_21 AC 388 ms
80,992 KB
testcase_22 AC 439 ms
80,804 KB
testcase_23 AC 96 ms
76,500 KB
testcase_24 AC 377 ms
80,552 KB
testcase_25 AC 105 ms
78,280 KB
testcase_26 WA -
testcase_27 AC 398 ms
79,976 KB
testcase_28 WA -
testcase_29 AC 416 ms
80,196 KB
testcase_30 WA -
testcase_31 AC 371 ms
79,860 KB
testcase_32 AC 182 ms
78,524 KB
testcase_33 AC 384 ms
79,928 KB
testcase_34 WA -
testcase_35 AC 399 ms
80,864 KB
testcase_36 AC 85 ms
71,740 KB
testcase_37 AC 84 ms
71,580 KB
testcase_38 AC 84 ms
71,612 KB
testcase_39 AC 89 ms
71,320 KB
testcase_40 AC 91 ms
76,524 KB
testcase_41 AC 87 ms
71,712 KB
testcase_42 AC 89 ms
71,460 KB
testcase_43 AC 116 ms
77,408 KB
testcase_44 AC 148 ms
77,848 KB
testcase_45 AC 104 ms
77,796 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', end='')
   exit()
print('NO', end='')
0