結果

問題 No.210 探し物はどこですか?
ユーザー roiti46roiti46
提出日時 2015-10-06 00:24:52
言語 PyPy2
(7.3.15)
結果
TLE  
実行時間 -
コード長 435 bytes
コンパイル時間 138 ms
コンパイル使用メモリ 77,904 KB
実行使用メモリ 91,564 KB
最終ジャッジ日時 2023-09-27 07:22:39
合計ジャッジ時間 20,628 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 273 ms
80,748 KB
testcase_01 AC 1,121 ms
83,120 KB
testcase_02 TLE -
testcase_03 AC 88 ms
79,108 KB
testcase_04 AC 108 ms
80,184 KB
testcase_05 AC 107 ms
80,272 KB
testcase_06 AC 85 ms
78,668 KB
testcase_07 AC 107 ms
80,108 KB
testcase_08 AC 134 ms
81,040 KB
testcase_09 AC 137 ms
80,572 KB
testcase_10 AC 129 ms
81,000 KB
testcase_11 AC 133 ms
80,728 KB
testcase_12 AC 133 ms
80,856 KB
testcase_13 AC 145 ms
81,040 KB
testcase_14 AC 136 ms
80,632 KB
testcase_15 AC 137 ms
80,720 KB
testcase_16 AC 137 ms
81,128 KB
testcase_17 AC 135 ms
80,732 KB
testcase_18 AC 223 ms
81,240 KB
testcase_19 AC 220 ms
80,852 KB
testcase_20 AC 209 ms
80,744 KB
testcase_21 AC 218 ms
80,700 KB
testcase_22 AC 215 ms
81,200 KB
testcase_23 AC 173 ms
80,844 KB
testcase_24 AC 169 ms
81,304 KB
testcase_25 AC 168 ms
81,572 KB
testcase_26 AC 167 ms
81,492 KB
testcase_27 AC 192 ms
81,344 KB
testcase_28 AC 675 ms
81,980 KB
testcase_29 AC 673 ms
81,920 KB
testcase_30 AC 675 ms
82,220 KB
testcase_31 AC 689 ms
82,100 KB
testcase_32 AC 671 ms
82,364 KB
testcase_33 AC 218 ms
81,280 KB
testcase_34 AC 227 ms
81,792 KB
testcase_35 AC 216 ms
81,032 KB
testcase_36 AC 232 ms
81,844 KB
testcase_37 AC 218 ms
81,928 KB
testcase_38 AC 1,186 ms
84,588 KB
testcase_39 AC 1,186 ms
84,624 KB
testcase_40 AC 1,237 ms
85,248 KB
testcase_41 AC 1,154 ms
84,432 KB
testcase_42 AC 1,206 ms
84,548 KB
testcase_43 AC 83 ms
78,052 KB
testcase_44 AC 83 ms
78,324 KB
testcase_45 AC 83 ms
78,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import heapq
n = int(raw_input())
p = map(float, raw_input().split())
q = map(float, raw_input().split())
q = [q[i] / 100. for i in xrange(n)]

que = [[-p[i] * q[i], i] for i in xrange(n)]
heapq.heapify(que)
_ans, ans = -1.0, 0.0
i = 1
while ans - _ans > 1e-3:
    _ans = ans
    pq, j = heapq.heappop(que)
    ans += -i * pq
    p[j] *= (1.0 - q[j])
    heapq.heappush(que, [-p[j] * q[j], j])
    i += 1
print "%.10f" % (ans / 1000.)
0