結果

問題 No.179 塗り分け
ユーザー とりすけとりすけ
提出日時 2023-05-02 00:49:08
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 521 bytes
コンパイル時間 175 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 79,744 KB
最終ジャッジ日時 2024-11-20 20:04:56
合計ジャッジ時間 9,080 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 46 ms
53,376 KB
testcase_01 AC 42 ms
53,504 KB
testcase_02 AC 42 ms
53,612 KB
testcase_03 AC 43 ms
53,504 KB
testcase_04 AC 44 ms
53,504 KB
testcase_05 AC 123 ms
77,076 KB
testcase_06 AC 43 ms
54,272 KB
testcase_07 WA -
testcase_08 AC 356 ms
78,592 KB
testcase_09 WA -
testcase_10 AC 52 ms
62,336 KB
testcase_11 AC 53 ms
62,976 KB
testcase_12 AC 296 ms
77,916 KB
testcase_13 AC 51 ms
61,952 KB
testcase_14 AC 57 ms
67,328 KB
testcase_15 AC 44 ms
53,120 KB
testcase_16 AC 42 ms
53,376 KB
testcase_17 AC 42 ms
52,864 KB
testcase_18 AC 66 ms
72,960 KB
testcase_19 AC 66 ms
72,576 KB
testcase_20 AC 330 ms
78,216 KB
testcase_21 AC 378 ms
78,676 KB
testcase_22 AC 395 ms
78,336 KB
testcase_23 AC 53 ms
61,952 KB
testcase_24 AC 374 ms
78,720 KB
testcase_25 AC 61 ms
67,584 KB
testcase_26 WA -
testcase_27 AC 362 ms
78,672 KB
testcase_28 WA -
testcase_29 AC 365 ms
78,496 KB
testcase_30 WA -
testcase_31 AC 346 ms
78,176 KB
testcase_32 AC 144 ms
76,924 KB
testcase_33 AC 359 ms
78,464 KB
testcase_34 WA -
testcase_35 AC 356 ms
77,916 KB
testcase_36 AC 43 ms
53,504 KB
testcase_37 AC 43 ms
53,248 KB
testcase_38 AC 42 ms
53,780 KB
testcase_39 AC 43 ms
53,632 KB
testcase_40 AC 49 ms
60,800 KB
testcase_41 AC 42 ms
53,376 KB
testcase_42 AC 45 ms
53,760 KB
testcase_43 AC 75 ms
76,032 KB
testcase_44 AC 109 ms
76,800 KB
testcase_45 AC 59 ms
65,920 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