結果

問題 No.210 探し物はどこですか?
ユーザー convexineqconvexineq
提出日時 2020-12-18 20:49:56
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 612 ms / 2,000 ms
コード長 392 bytes
コンパイル時間 243 ms
コンパイル使用メモリ 81,732 KB
実行使用メモリ 80,028 KB
最終ジャッジ日時 2023-10-21 08:20:00
合計ジャッジ時間 22,662 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 358 ms
76,396 KB
testcase_01 AC 404 ms
77,380 KB
testcase_02 AC 421 ms
78,704 KB
testcase_03 AC 421 ms
76,232 KB
testcase_04 AC 368 ms
75,988 KB
testcase_05 AC 375 ms
75,996 KB
testcase_06 AC 410 ms
76,136 KB
testcase_07 AC 380 ms
75,992 KB
testcase_08 AC 360 ms
76,408 KB
testcase_09 AC 370 ms
76,736 KB
testcase_10 AC 423 ms
76,428 KB
testcase_11 AC 366 ms
76,216 KB
testcase_12 AC 364 ms
76,472 KB
testcase_13 AC 432 ms
76,844 KB
testcase_14 AC 507 ms
76,672 KB
testcase_15 AC 503 ms
76,864 KB
testcase_16 AC 490 ms
76,604 KB
testcase_17 AC 473 ms
76,432 KB
testcase_18 AC 393 ms
76,820 KB
testcase_19 AC 392 ms
76,760 KB
testcase_20 AC 402 ms
76,844 KB
testcase_21 AC 361 ms
76,712 KB
testcase_22 AC 382 ms
76,880 KB
testcase_23 AC 499 ms
78,128 KB
testcase_24 AC 506 ms
78,304 KB
testcase_25 AC 487 ms
78,228 KB
testcase_26 AC 516 ms
78,248 KB
testcase_27 AC 505 ms
78,244 KB
testcase_28 AC 491 ms
77,576 KB
testcase_29 AC 480 ms
77,676 KB
testcase_30 AC 503 ms
77,628 KB
testcase_31 AC 495 ms
77,700 KB
testcase_32 AC 515 ms
77,696 KB
testcase_33 AC 585 ms
79,464 KB
testcase_34 AC 582 ms
79,724 KB
testcase_35 AC 559 ms
80,028 KB
testcase_36 AC 571 ms
79,516 KB
testcase_37 AC 612 ms
79,752 KB
testcase_38 AC 552 ms
78,828 KB
testcase_39 AC 579 ms
78,976 KB
testcase_40 AC 538 ms
78,876 KB
testcase_41 AC 549 ms
78,860 KB
testcase_42 AC 546 ms
78,828 KB
testcase_43 AC 61 ms
75,556 KB
testcase_44 AC 238 ms
75,740 KB
testcase_45 AC 362 ms
75,992 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
*p, = map(int,input().split())
*q, = map(int,input().split())

s = 0.0
for i in range(n):
    p[i] /= 1000
    q[i] /= 100
    s += p[i]*q[i]    

from heapq import *
hq = [(-pi*qi,i) for i,(pi,qi) in enumerate(zip(p,q))]
heapify(hq)
ans = 0.0
for i in range(1,1000000):
    prob,idx = heappop(hq)        
    heappush(hq,(prob*(1.0-q[idx]),idx))
    ans -= i*prob
print(ans)
0