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