結果

問題 No.210 探し物はどこですか?
ユーザー roiti46roiti46
提出日時 2015-10-06 00:18:11
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 1,662 ms / 2,000 ms
コード長 401 bytes
コンパイル時間 144 ms
コンパイル使用メモリ 77,760 KB
実行使用メモリ 87,324 KB
最終ジャッジ日時 2023-09-27 07:24:37
合計ジャッジ時間 61,985 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,071 ms
81,056 KB
testcase_01 AC 1,327 ms
83,676 KB
testcase_02 AC 1,473 ms
87,036 KB
testcase_03 AC 1,046 ms
80,688 KB
testcase_04 AC 1,024 ms
80,936 KB
testcase_05 AC 913 ms
80,652 KB
testcase_06 AC 904 ms
80,760 KB
testcase_07 AC 1,011 ms
80,756 KB
testcase_08 AC 861 ms
80,896 KB
testcase_09 AC 893 ms
81,468 KB
testcase_10 AC 878 ms
81,124 KB
testcase_11 AC 912 ms
80,836 KB
testcase_12 AC 916 ms
80,860 KB
testcase_13 AC 1,325 ms
81,500 KB
testcase_14 AC 1,525 ms
80,760 KB
testcase_15 AC 1,543 ms
81,052 KB
testcase_16 AC 1,425 ms
81,276 KB
testcase_17 AC 1,568 ms
81,092 KB
testcase_18 AC 1,045 ms
81,508 KB
testcase_19 AC 1,059 ms
80,936 KB
testcase_20 AC 1,044 ms
81,256 KB
testcase_21 AC 1,045 ms
81,068 KB
testcase_22 AC 1,053 ms
81,704 KB
testcase_23 AC 1,494 ms
84,036 KB
testcase_24 AC 1,466 ms
84,348 KB
testcase_25 AC 1,471 ms
84,468 KB
testcase_26 AC 1,480 ms
84,000 KB
testcase_27 AC 1,489 ms
84,712 KB
testcase_28 AC 1,349 ms
83,368 KB
testcase_29 AC 1,353 ms
83,324 KB
testcase_30 AC 1,374 ms
83,816 KB
testcase_31 AC 1,363 ms
83,768 KB
testcase_32 AC 1,361 ms
83,700 KB
testcase_33 AC 1,662 ms
86,776 KB
testcase_34 AC 1,637 ms
87,236 KB
testcase_35 AC 1,623 ms
86,592 KB
testcase_36 AC 1,653 ms
87,324 KB
testcase_37 AC 1,612 ms
87,224 KB
testcase_38 AC 1,525 ms
86,028 KB
testcase_39 AC 1,531 ms
85,816 KB
testcase_40 AC 1,542 ms
86,148 KB
testcase_41 AC 1,533 ms
85,880 KB
testcase_42 AC 1,524 ms
85,756 KB
testcase_43 AC 102 ms
80,024 KB
testcase_44 AC 954 ms
80,340 KB
testcase_45 AC 1,032 ms
80,740 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)]
ans = 0.0
que = [[-p[i] * q[i], i] for i in xrange(n)]
heapq.heapify(que)
i = 1
while i < 1000000:
    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