結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 571 ms
80,788 KB
testcase_01 AC 693 ms
81,876 KB
testcase_02 WA -
testcase_03 AC 555 ms
80,616 KB
testcase_04 AC 548 ms
80,692 KB
testcase_05 AC 500 ms
80,520 KB
testcase_06 AC 487 ms
80,708 KB
testcase_07 AC 534 ms
80,532 KB
testcase_08 AC 389 ms
80,916 KB
testcase_09 AC 404 ms
80,960 KB
testcase_10 AC 411 ms
81,032 KB
testcase_11 AC 444 ms
80,632 KB
testcase_12 AC 456 ms
80,764 KB
testcase_13 AC 631 ms
81,248 KB
testcase_14 AC 716 ms
80,660 KB
testcase_15 AC 719 ms
80,876 KB
testcase_16 AC 686 ms
81,024 KB
testcase_17 AC 759 ms
80,992 KB
testcase_18 AC 562 ms
81,136 KB
testcase_19 AC 572 ms
80,680 KB
testcase_20 AC 564 ms
80,832 KB
testcase_21 AC 561 ms
80,712 KB
testcase_22 AC 570 ms
81,384 KB
testcase_23 AC 783 ms
82,272 KB
testcase_24 AC 772 ms
82,584 KB
testcase_25 AC 786 ms
82,684 KB
testcase_26 AC 772 ms
82,428 KB
testcase_27 AC 802 ms
82,860 KB
testcase_28 AC 718 ms
81,880 KB
testcase_29 AC 734 ms
82,020 KB
testcase_30 AC 732 ms
82,320 KB
testcase_31 AC 711 ms
82,228 KB
testcase_32 AC 732 ms
82,352 KB
testcase_33 AC 871 ms
83,712 KB
testcase_34 AC 876 ms
84,336 KB
testcase_35 AC 876 ms
83,552 KB
testcase_36 AC 862 ms
84,216 KB
testcase_37 AC 868 ms
84,132 KB
testcase_38 AC 819 ms
83,264 KB
testcase_39 AC 825 ms
83,188 KB
testcase_40 AC 820 ms
83,152 KB
testcase_41 AC 825 ms
83,212 KB
testcase_42 AC 824 ms
83,584 KB
testcase_43 AC 92 ms
79,912 KB
testcase_44 AC 524 ms
80,228 KB
testcase_45 AC 572 ms
80,640 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 < 500000:
    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