結果

問題 No.210 探し物はどこですか?
ユーザー roiti46roiti46
提出日時 2015-10-06 00:33:28
言語 PyPy2
(7.3.15)
結果
TLE  
実行時間 -
コード長 387 bytes
コンパイル時間 192 ms
コンパイル使用メモリ 77,740 KB
実行使用メモリ 91,224 KB
最終ジャッジ日時 2023-09-27 07:26:01
合計ジャッジ時間 19,708 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 270 ms
80,600 KB
testcase_01 AC 1,093 ms
83,216 KB
testcase_02 TLE -
testcase_03 AC 82 ms
78,952 KB
testcase_04 AC 101 ms
80,176 KB
testcase_05 AC 101 ms
80,220 KB
testcase_06 AC 81 ms
78,640 KB
testcase_07 AC 103 ms
80,212 KB
testcase_08 AC 125 ms
80,940 KB
testcase_09 AC 133 ms
80,644 KB
testcase_10 AC 126 ms
80,924 KB
testcase_11 AC 126 ms
80,648 KB
testcase_12 AC 130 ms
81,048 KB
testcase_13 AC 135 ms
81,096 KB
testcase_14 AC 138 ms
80,640 KB
testcase_15 AC 132 ms
80,776 KB
testcase_16 AC 134 ms
80,912 KB
testcase_17 AC 135 ms
80,920 KB
testcase_18 AC 205 ms
80,624 KB
testcase_19 AC 213 ms
80,788 KB
testcase_20 AC 203 ms
80,716 KB
testcase_21 AC 208 ms
80,644 KB
testcase_22 AC 207 ms
80,644 KB
testcase_23 AC 169 ms
81,304 KB
testcase_24 AC 160 ms
81,268 KB
testcase_25 AC 166 ms
81,520 KB
testcase_26 AC 165 ms
81,456 KB
testcase_27 AC 188 ms
81,488 KB
testcase_28 AC 667 ms
82,292 KB
testcase_29 AC 658 ms
81,992 KB
testcase_30 AC 663 ms
82,356 KB
testcase_31 AC 674 ms
82,380 KB
testcase_32 AC 657 ms
82,448 KB
testcase_33 AC 218 ms
81,744 KB
testcase_34 AC 215 ms
81,192 KB
testcase_35 AC 205 ms
81,296 KB
testcase_36 AC 225 ms
81,824 KB
testcase_37 AC 212 ms
81,340 KB
testcase_38 AC 1,151 ms
84,724 KB
testcase_39 AC 1,164 ms
84,592 KB
testcase_40 AC 1,198 ms
85,296 KB
testcase_41 AC 1,134 ms
84,576 KB
testcase_42 AC 1,158 ms
84,544 KB
testcase_43 AC 78 ms
77,916 KB
testcase_44 AC 78 ms
78,392 KB
testcase_45 AC 80 ms
78,016 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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
0