結果
| 問題 |
No.210 探し物はどこですか?
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-10-06 00:14:32 |
| 言語 | Python2 (2.7.18) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 387 bytes |
| コンパイル時間 | 557 ms |
| コンパイル使用メモリ | 6,912 KB |
| 実行使用メモリ | 6,784 KB |
| 最終ジャッジ日時 | 2024-07-20 01:17:28 |
| 合計ジャッジ時間 | 44,169 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 42 WA * 1 |
ソースコード
import heapq
n = int(raw_input())
p = map(int, raw_input().split())
q = map(int, raw_input().split())
q = [q[i] / 100. for i in xrange(n)]
ans = 0.0
que = [[-p[i] * q[i], i] for i in xrange(n)]
heapq.heapify(que)
for i in xrange(1, 500000):
pq, j = heapq.heappop(que)
ans += -i * pq
p[j] *= (1 - q[j])
heapq.heappush(que, [-p[j] * q[j], j])
print "%.10f" % (ans / 1000.)