結果

問題 No.210 探し物はどこですか?
ユーザー roiti46roiti46
提出日時 2015-10-06 00:16:55
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 1,661 ms / 2,000 ms
コード長 395 bytes
コンパイル時間 853 ms
コンパイル使用メモリ 77,596 KB
実行使用メモリ 87,240 KB
最終ジャッジ日時 2023-09-27 07:21:12
合計ジャッジ時間 61,306 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,058 ms
80,972 KB
testcase_01 AC 1,317 ms
83,860 KB
testcase_02 AC 1,438 ms
87,044 KB
testcase_03 AC 1,043 ms
80,732 KB
testcase_04 AC 1,008 ms
80,632 KB
testcase_05 AC 888 ms
80,748 KB
testcase_06 AC 916 ms
80,832 KB
testcase_07 AC 995 ms
80,952 KB
testcase_08 AC 858 ms
81,196 KB
testcase_09 AC 891 ms
81,052 KB
testcase_10 AC 885 ms
80,880 KB
testcase_11 AC 942 ms
81,164 KB
testcase_12 AC 899 ms
81,228 KB
testcase_13 AC 1,290 ms
81,396 KB
testcase_14 AC 1,509 ms
80,772 KB
testcase_15 AC 1,518 ms
81,044 KB
testcase_16 AC 1,395 ms
80,984 KB
testcase_17 AC 1,570 ms
80,972 KB
testcase_18 AC 1,032 ms
81,536 KB
testcase_19 AC 1,033 ms
80,956 KB
testcase_20 AC 1,037 ms
81,496 KB
testcase_21 AC 1,037 ms
81,668 KB
testcase_22 AC 1,028 ms
81,524 KB
testcase_23 AC 1,478 ms
84,000 KB
testcase_24 AC 1,438 ms
84,104 KB
testcase_25 AC 1,434 ms
84,724 KB
testcase_26 AC 1,483 ms
84,528 KB
testcase_27 AC 1,450 ms
84,768 KB
testcase_28 AC 1,391 ms
83,848 KB
testcase_29 AC 1,360 ms
83,624 KB
testcase_30 AC 1,360 ms
84,096 KB
testcase_31 AC 1,348 ms
84,060 KB
testcase_32 AC 1,363 ms
83,948 KB
testcase_33 AC 1,622 ms
86,652 KB
testcase_34 AC 1,634 ms
86,740 KB
testcase_35 AC 1,661 ms
86,792 KB
testcase_36 AC 1,644 ms
86,764 KB
testcase_37 AC 1,635 ms
87,240 KB
testcase_38 AC 1,542 ms
86,780 KB
testcase_39 AC 1,543 ms
86,216 KB
testcase_40 AC 1,548 ms
86,256 KB
testcase_41 AC 1,570 ms
86,520 KB
testcase_42 AC 1,539 ms
86,144 KB
testcase_43 AC 104 ms
79,836 KB
testcase_44 AC 967 ms
80,100 KB
testcase_45 AC 1,043 ms
80,660 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)]
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 - q[j])
    heapq.heappush(que, [-p[j] * q[j], j])
    i += 1
print "%.10f" % (ans / 1000.)
0