結果
問題 |
No.3018 目隠し宝探し
|
ユーザー |
![]() |
提出日時 | 2025-04-16 15:27:46 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 546 bytes |
コンパイル時間 | 436 ms |
コンパイル使用メモリ | 81,792 KB |
実行使用メモリ | 81,664 KB |
平均クエリ数 | 1.00 |
最終ジャッジ日時 | 2025-04-16 15:31:06 |
合計ジャッジ時間 | 4,444 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 1 |
other | RE * 21 |
ソースコード
n = int(input()) m = int(input()) sum_links = [0] * n links = [[] for _ in range(n)] for _ in range(m): a, b, c = map(int, input().split()) links[a].append((b, c)) sum_links[a] += c current = [10.0] * n for _ in range(100): next_ = [0.0] * n for i in range(n): total = sum_links[i] if total == 0: continue contribution = current[i] / total for (b, c) in links[i]: next_[b] += contribution * c current = next_ for val in current: print("{0:.6f}".format(val))