結果
| 問題 | No.455 冬の大三角 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-12-07 16:57:41 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 724 bytes |
| コンパイル時間 | 299 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 52,736 KB |
| 最終ジャッジ日時 | 2024-11-28 03:24:51 |
| 合計ジャッジ時間 | 4,875 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 31 WA * 23 |
ソースコード
def solve():
w, h = map(int, input().split())
px, py, qx, qy = -1, -1, -1, -1
for y in range(w):
line = input()
idx = line.find("*")
if idx >= 0:
if px == -1:
px, py = idx, y
else:
qx, qy = idx, y
tx, ty = 0, 0
if px == py and qx == qy:
tx += 1
if px == 0 and qx == 0:
tx += 1
if py == 0 and qy == 0:
ty += 1
points = [[px, qx, tx], [py, qy, ty]]
for y in range(w):
line = "-" * h
if y in points[1]:
idx = points[1].index(y)
line = line[:points[0][idx]] + "*" + line[points[0][idx]+1:]
print(line)
if __name__=="__main__":
solve()