結果

問題 No.210 探し物はどこですか?
ユーザー convexineqconvexineq
提出日時 2020-12-18 20:47:03
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 388 bytes
コンパイル時間 477 ms
コンパイル使用メモリ 81,724 KB
実行使用メモリ 87,876 KB
最終ジャッジ日時 2023-10-21 08:18:27
合計ジャッジ時間 79,738 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,520 ms
77,320 KB
testcase_01 AC 1,645 ms
81,936 KB
testcase_02 AC 1,759 ms
87,876 KB
testcase_03 AC 1,640 ms
76,224 KB
testcase_04 AC 1,489 ms
75,988 KB
testcase_05 AC 1,585 ms
75,996 KB
testcase_06 AC 1,569 ms
76,196 KB
testcase_07 AC 1,489 ms
76,020 KB
testcase_08 AC 1,576 ms
76,468 KB
testcase_09 AC 1,623 ms
76,796 KB
testcase_10 AC 1,549 ms
76,440 KB
testcase_11 AC 1,615 ms
76,312 KB
testcase_12 AC 1,626 ms
76,532 KB
testcase_13 TLE -
testcase_14 TLE -
testcase_15 TLE -
testcase_16 TLE -
testcase_17 AC 1,927 ms
76,552 KB
testcase_18 AC 1,561 ms
77,936 KB
testcase_19 AC 1,529 ms
77,928 KB
testcase_20 AC 1,609 ms
77,920 KB
testcase_21 AC 1,566 ms
77,828 KB
testcase_22 AC 1,609 ms
78,020 KB
testcase_23 TLE -
testcase_24 TLE -
testcase_25 TLE -
testcase_26 TLE -
testcase_27 TLE -
testcase_28 TLE -
testcase_29 TLE -
testcase_30 TLE -
testcase_31 TLE -
testcase_32 TLE -
testcase_33 TLE -
testcase_34 TLE -
testcase_35 TLE -
testcase_36 TLE -
testcase_37 TLE -
testcase_38 TLE -
testcase_39 TLE -
testcase_40 TLE -
testcase_41 TLE -
testcase_42 TLE -
testcase_43 AC 101 ms
75,560 KB
testcase_44 AC 1,047 ms
75,792 KB
testcase_45 AC 1,634 ms
75,992 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

s = 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
for i in range(1,5000000):
    prob,idx = heappop(hq)        
    heappush(hq,(prob*(1.0-q[idx]),idx))
    ans -= i*prob
print(ans)
0