結果

問題 No.210 探し物はどこですか?
ユーザー roiti46roiti46
提出日時 2015-10-06 00:25:43
言語 PyPy2
(7.3.15)
結果
WA  
実行時間 -
コード長 435 bytes
コンパイル時間 2,023 ms
コンパイル使用メモリ 77,388 KB
実行使用メモリ 84,468 KB
最終ジャッジ日時 2023-09-27 07:25:04
合計ジャッジ時間 16,080 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 234 ms
80,608 KB
testcase_01 AC 880 ms
82,744 KB
testcase_02 WA -
testcase_03 AC 76 ms
78,844 KB
testcase_04 AC 94 ms
80,024 KB
testcase_05 AC 98 ms
80,260 KB
testcase_06 AC 79 ms
78,772 KB
testcase_07 AC 96 ms
79,932 KB
testcase_08 AC 114 ms
80,856 KB
testcase_09 AC 121 ms
80,640 KB
testcase_10 AC 117 ms
81,052 KB
testcase_11 AC 116 ms
80,684 KB
testcase_12 AC 122 ms
80,832 KB
testcase_13 AC 129 ms
80,980 KB
testcase_14 AC 121 ms
80,904 KB
testcase_15 AC 118 ms
80,700 KB
testcase_16 AC 119 ms
80,972 KB
testcase_17 AC 120 ms
80,588 KB
testcase_18 AC 180 ms
81,328 KB
testcase_19 AC 188 ms
80,688 KB
testcase_20 AC 181 ms
80,724 KB
testcase_21 AC 183 ms
80,680 KB
testcase_22 AC 183 ms
81,020 KB
testcase_23 AC 153 ms
80,852 KB
testcase_24 AC 149 ms
81,076 KB
testcase_25 AC 149 ms
81,108 KB
testcase_26 AC 142 ms
80,840 KB
testcase_27 AC 165 ms
81,284 KB
testcase_28 AC 536 ms
81,648 KB
testcase_29 AC 539 ms
81,664 KB
testcase_30 AC 556 ms
81,972 KB
testcase_31 AC 549 ms
82,084 KB
testcase_32 AC 529 ms
82,256 KB
testcase_33 AC 189 ms
81,276 KB
testcase_34 AC 191 ms
81,580 KB
testcase_35 AC 196 ms
81,012 KB
testcase_36 AC 204 ms
81,740 KB
testcase_37 AC 188 ms
81,668 KB
testcase_38 AC 960 ms
84,192 KB
testcase_39 AC 970 ms
84,468 KB
testcase_40 AC 1,006 ms
84,152 KB
testcase_41 AC 942 ms
83,728 KB
testcase_42 AC 974 ms
83,840 KB
testcase_43 AC 74 ms
78,140 KB
testcase_44 AC 74 ms
78,044 KB
testcase_45 AC 74 ms
77,812 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-2:
    _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