結果

問題 No.179 塗り分け
ユーザー tomiyancetomiyance
提出日時 2019-11-26 09:16:35
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 627 bytes
コンパイル時間 76 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-04-24 01:36:44
合計ジャッジ時間 5,211 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
10,752 KB
testcase_01 AC 28 ms
10,752 KB
testcase_02 WA -
testcase_03 AC 28 ms
10,752 KB
testcase_04 WA -
testcase_05 AC 41 ms
10,752 KB
testcase_06 AC 26 ms
10,752 KB
testcase_07 WA -
testcase_08 AC 167 ms
10,752 KB
testcase_09 WA -
testcase_10 AC 27 ms
10,752 KB
testcase_11 AC 29 ms
10,752 KB
testcase_12 AC 171 ms
10,752 KB
testcase_13 AC 26 ms
10,752 KB
testcase_14 AC 26 ms
10,752 KB
testcase_15 AC 26 ms
10,752 KB
testcase_16 AC 26 ms
10,752 KB
testcase_17 AC 27 ms
10,880 KB
testcase_18 AC 30 ms
10,752 KB
testcase_19 AC 29 ms
10,880 KB
testcase_20 AC 165 ms
10,880 KB
testcase_21 AC 219 ms
10,752 KB
testcase_22 AC 376 ms
10,752 KB
testcase_23 AC 71 ms
10,880 KB
testcase_24 AC 186 ms
10,752 KB
testcase_25 AC 29 ms
10,752 KB
testcase_26 WA -
testcase_27 AC 169 ms
10,752 KB
testcase_28 WA -
testcase_29 AC 169 ms
10,880 KB
testcase_30 WA -
testcase_31 AC 168 ms
10,752 KB
testcase_32 WA -
testcase_33 AC 170 ms
10,752 KB
testcase_34 WA -
testcase_35 AC 164 ms
10,752 KB
testcase_36 AC 26 ms
10,880 KB
testcase_37 AC 26 ms
10,752 KB
testcase_38 AC 27 ms
10,752 KB
testcase_39 AC 25 ms
10,752 KB
testcase_40 AC 26 ms
10,752 KB
testcase_41 AC 26 ms
10,752 KB
testcase_42 AC 25 ms
10,880 KB
testcase_43 AC 29 ms
10,752 KB
testcase_44 AC 43 ms
10,880 KB
testcase_45 AC 26 ms
10,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

H,W = map(int,input().split())
S = []
for i in range(H):
  S.append(input())
def translation(px,py):
  C = [[0 for x in range(W)] for y in range(H)]
  for y in range(H):
    for x in range(W):
      if C[y][x] == 0:
        C[y][x] = 1
        if x + px < W and y + py < H:
          if S[y][x] != S[y + py][x + px]:
            return False
          C[y + py][x + px] = 1
        else:
          if S[y][x] != '.':
            return False
  return True
def check():
  for y in range(H):
    for x in range(W):
      if not(x == 0 and y == 0 ):
        if translation(x,y):
          return 'YES'
  return 'NO'
print(check())
0