結果
| 問題 | No.179 塗り分け |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-04-06 00:00:42 |
| 言語 | PyPy2 (7.3.20) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 701 bytes |
| 記録 | |
| コンパイル時間 | 67 ms |
| コンパイル使用メモリ | 80,324 KB |
| 実行使用メモリ | 83,412 KB |
| 最終ジャッジ日時 | 2026-07-17 12:38:27 |
| 合計ジャッジ時間 | 5,799 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 6 |
| other | AC * 32 WA * 8 |
ソースコード
H, W = map(int, raw_input().split())
S = [list(raw_input()) for i in xrange(H)]
for dy in xrange((H+1)/2):
for dx in xrange((W+1)/2):
if dx + dy == 0: continue
flag = True
used = [[S[y][x] == "." for x in xrange(W)] for y in xrange(H)]
for y in xrange(H):
for x in xrange(W):
if used[y][x]: continue
if not (x+dx < W and y+dy < H) or used[y+dy][x+dx]:
flag = False
break
used[y][x] = used[y+dy][x+dx] = True
if not flag: break
else:
if sum(map(sum, used)) != H*W: continue
print "YES"
exit()
print "NO"