結果

問題 No.210 探し物はどこですか?
ユーザー roiti46roiti46
提出日時 2015-10-06 00:40:16
言語 PyPy2
(7.3.15)
結果
WA  
実行時間 -
コード長 410 bytes
コンパイル時間 185 ms
コンパイル使用メモリ 77,792 KB
実行使用メモリ 83,712 KB
最終ジャッジ日時 2023-09-27 07:28:01
合計ジャッジ時間 11,490 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 187 ms
80,800 KB
testcase_01 AC 386 ms
82,028 KB
testcase_02 WA -
testcase_03 AC 79 ms
79,248 KB
testcase_04 AC 96 ms
80,264 KB
testcase_05 AC 96 ms
80,152 KB
testcase_06 AC 77 ms
78,640 KB
testcase_07 AC 99 ms
80,060 KB
testcase_08 AC 119 ms
80,668 KB
testcase_09 AC 139 ms
80,996 KB
testcase_10 AC 115 ms
80,656 KB
testcase_11 AC 114 ms
81,040 KB
testcase_12 AC 114 ms
80,720 KB
testcase_13 AC 130 ms
81,308 KB
testcase_14 AC 129 ms
80,740 KB
testcase_15 AC 134 ms
80,652 KB
testcase_16 AC 126 ms
80,724 KB
testcase_17 AC 128 ms
80,552 KB
testcase_18 AC 183 ms
81,176 KB
testcase_19 AC 206 ms
81,716 KB
testcase_20 AC 199 ms
81,412 KB
testcase_21 AC 196 ms
81,428 KB
testcase_22 AC 192 ms
81,452 KB
testcase_23 AC 192 ms
82,180 KB
testcase_24 AC 194 ms
82,332 KB
testcase_25 AC 189 ms
82,496 KB
testcase_26 AC 191 ms
82,112 KB
testcase_27 AC 212 ms
82,276 KB
testcase_28 AC 335 ms
82,140 KB
testcase_29 AC 326 ms
82,528 KB
testcase_30 AC 334 ms
82,180 KB
testcase_31 AC 346 ms
82,596 KB
testcase_32 AC 325 ms
82,608 KB
testcase_33 AC 212 ms
82,540 KB
testcase_34 AC 222 ms
82,484 KB
testcase_35 AC 219 ms
82,696 KB
testcase_36 AC 220 ms
82,476 KB
testcase_37 AC 219 ms
83,200 KB
testcase_38 AC 470 ms
83,080 KB
testcase_39 AC 482 ms
83,080 KB
testcase_40 AC 493 ms
82,752 KB
testcase_41 AC 470 ms
83,712 KB
testcase_42 AC 484 ms
83,144 KB
testcase_43 AC 79 ms
78,000 KB
testcase_44 AC 79 ms
78,020 KB
testcase_45 AC 77 ms
78,008 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)]

que = [(-p[i] * q[i] / 1000.0, i) for i in xrange(n)]
heapq.heapify(que)
_ans, ans = -1.0, 0.0
i = 1
while ans - _ans > 1e-5:
    _ans = ans
    pq, j = heapq.heappop(que)
    ans += -i * pq
    heapq.heappush(que, (pq * (1.0 - q[j]), j))
    i += 1
print "%.10f" % ans
0