結果

問題 No.210 探し物はどこですか?
ユーザー roiti46roiti46
提出日時 2015-10-06 00:38:59
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 711 ms / 2,000 ms
コード長 410 bytes
コンパイル時間 203 ms
コンパイル使用メモリ 77,696 KB
実行使用メモリ 84,436 KB
最終ジャッジ日時 2023-09-27 07:27:28
合計ジャッジ時間 12,687 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 191 ms
80,832 KB
testcase_01 AC 419 ms
82,232 KB
testcase_02 AC 711 ms
84,436 KB
testcase_03 AC 81 ms
79,080 KB
testcase_04 AC 100 ms
80,468 KB
testcase_05 AC 96 ms
80,196 KB
testcase_06 AC 81 ms
78,856 KB
testcase_07 AC 97 ms
80,044 KB
testcase_08 AC 115 ms
80,680 KB
testcase_09 AC 137 ms
80,932 KB
testcase_10 AC 115 ms
81,032 KB
testcase_11 AC 121 ms
80,428 KB
testcase_12 AC 123 ms
80,668 KB
testcase_13 AC 129 ms
80,936 KB
testcase_14 AC 124 ms
80,912 KB
testcase_15 AC 135 ms
80,708 KB
testcase_16 AC 128 ms
80,672 KB
testcase_17 AC 135 ms
80,688 KB
testcase_18 AC 198 ms
81,616 KB
testcase_19 AC 201 ms
81,628 KB
testcase_20 AC 200 ms
81,456 KB
testcase_21 AC 199 ms
81,548 KB
testcase_22 AC 197 ms
81,672 KB
testcase_23 AC 191 ms
82,472 KB
testcase_24 AC 196 ms
82,228 KB
testcase_25 AC 189 ms
82,308 KB
testcase_26 AC 187 ms
82,160 KB
testcase_27 AC 207 ms
81,896 KB
testcase_28 AC 352 ms
81,960 KB
testcase_29 AC 365 ms
82,168 KB
testcase_30 AC 361 ms
82,344 KB
testcase_31 AC 374 ms
82,664 KB
testcase_32 AC 357 ms
82,704 KB
testcase_33 AC 220 ms
82,608 KB
testcase_34 AC 223 ms
82,488 KB
testcase_35 AC 221 ms
82,496 KB
testcase_36 AC 226 ms
82,436 KB
testcase_37 AC 218 ms
83,076 KB
testcase_38 AC 529 ms
83,328 KB
testcase_39 AC 499 ms
83,356 KB
testcase_40 AC 549 ms
83,072 KB
testcase_41 AC 510 ms
83,752 KB
testcase_42 AC 520 ms
83,156 KB
testcase_43 AC 74 ms
78,216 KB
testcase_44 AC 76 ms
78,412 KB
testcase_45 AC 77 ms
78,000 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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)]

que = [(-p[i] * q[i] / 1000.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 * (1.0 - q[j]), j))
    i += 1
print "%.10f" % ans
0