結果
| 問題 |
No.3018 目隠し宝探し
|
| コンテスト | |
| ユーザー |
gew1fw
|
| 提出日時 | 2025-06-12 18:47:11 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 516 bytes |
| コンパイル時間 | 344 ms |
| コンパイル使用メモリ | 82,636 KB |
| 実行使用メモリ | 84,344 KB |
| 平均クエリ数 | 1.00 |
| 最終ジャッジ日時 | 2025-06-12 18:47:31 |
| 合計ジャッジ時間 | 4,278 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 1 |
| other | RE * 21 |
ソースコード
n = int(input())
m = int(input())
sum_links = [0.0] * n
edges = []
for _ in range(m):
a, b, c = map(int, input().split())
edges.append((a, b, c))
sum_links[a] += c
processed_edges = []
for a, b, c in edges:
f = c / sum_links[a]
processed_edges.append((a, b, f))
current_pop = [10.0] * n
for _ in range(100):
new_pop = [0.0] * n
for a, b, f in processed_edges:
new_pop[b] += current_pop[a] * f
current_pop = new_pop
for val in current_pop:
print("{0:.6f}".format(val))
gew1fw