結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 183 ms
81,052 KB
testcase_01 AC 379 ms
82,120 KB
testcase_02 AC 661 ms
84,252 KB
testcase_03 AC 75 ms
78,884 KB
testcase_04 AC 98 ms
80,052 KB
testcase_05 AC 99 ms
79,816 KB
testcase_06 AC 80 ms
78,640 KB
testcase_07 AC 98 ms
79,872 KB
testcase_08 AC 113 ms
80,724 KB
testcase_09 AC 129 ms
80,900 KB
testcase_10 AC 111 ms
80,536 KB
testcase_11 AC 114 ms
80,672 KB
testcase_12 AC 115 ms
80,852 KB
testcase_13 AC 130 ms
81,004 KB
testcase_14 AC 122 ms
80,552 KB
testcase_15 AC 126 ms
80,664 KB
testcase_16 AC 118 ms
80,668 KB
testcase_17 AC 126 ms
80,920 KB
testcase_18 AC 185 ms
81,508 KB
testcase_19 AC 189 ms
81,844 KB
testcase_20 AC 188 ms
81,432 KB
testcase_21 AC 189 ms
81,528 KB
testcase_22 AC 187 ms
81,424 KB
testcase_23 AC 180 ms
82,256 KB
testcase_24 AC 178 ms
82,380 KB
testcase_25 AC 180 ms
82,360 KB
testcase_26 AC 186 ms
82,612 KB
testcase_27 AC 205 ms
81,832 KB
testcase_28 AC 325 ms
81,952 KB
testcase_29 AC 340 ms
82,020 KB
testcase_30 AC 336 ms
82,080 KB
testcase_31 AC 357 ms
82,676 KB
testcase_32 AC 323 ms
82,388 KB
testcase_33 AC 199 ms
82,492 KB
testcase_34 AC 207 ms
82,324 KB
testcase_35 AC 209 ms
82,752 KB
testcase_36 AC 207 ms
82,592 KB
testcase_37 AC 208 ms
83,164 KB
testcase_38 AC 461 ms
83,100 KB
testcase_39 AC 479 ms
83,136 KB
testcase_40 AC 501 ms
83,072 KB
testcase_41 AC 474 ms
83,536 KB
testcase_42 AC 493 ms
83,100 KB
testcase_43 AC 75 ms
78,064 KB
testcase_44 AC 78 ms
78,168 KB
testcase_45 AC 78 ms
77,824 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 > 5e-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