結果
問題 |
No.3018 目隠し宝探し
|
ユーザー |
![]() |
提出日時 | 2025-06-12 21:32:22 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 565 bytes |
コンパイル時間 | 374 ms |
コンパイル使用メモリ | 81,656 KB |
実行使用メモリ | 84,136 KB |
平均クエリ数 | 1.00 |
最終ジャッジ日時 | 2025-06-12 21:33:37 |
合計ジャッジ時間 | 4,901 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 1 |
other | RE * 21 |
ソースコード
n = int(input()) m = int(input()) edges = [[] for _ in range(n)] for _ in range(m): a, b, c = map(int, input().split()) edges[a].append((b, c)) U = [10.0] * n for _ in range(100): next_U = [0.0] * n for u in range(n): current = U[u] if current == 0.0: continue out_edges = edges[u] sum_c = sum(c for (v, c) in out_edges) if sum_c == 0: continue for (v, c) in out_edges: next_U[v] += current * (c / sum_c) U = next_U for u in U: print("{0:.6f}".format(u))