結果

問題 No.210 探し物はどこですか?
ユーザー rpy3cpprpy3cpp
提出日時 2015-05-18 01:18:55
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 994 ms / 2,000 ms
コード長 318 bytes
コンパイル時間 263 ms
コンパイル使用メモリ 87,628 KB
実行使用メモリ 82,480 KB
最終ジャッジ日時 2023-09-20 09:39:01
合計ジャッジ時間 12,344 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 162 ms
77,712 KB
testcase_01 AC 497 ms
79,004 KB
testcase_02 AC 994 ms
82,480 KB
testcase_03 AC 78 ms
71,732 KB
testcase_04 AC 93 ms
76,712 KB
testcase_05 AC 91 ms
76,524 KB
testcase_06 AC 77 ms
71,732 KB
testcase_07 AC 90 ms
76,432 KB
testcase_08 AC 108 ms
77,756 KB
testcase_09 AC 103 ms
77,524 KB
testcase_10 AC 108 ms
77,952 KB
testcase_11 AC 99 ms
77,584 KB
testcase_12 AC 105 ms
77,740 KB
testcase_13 AC 110 ms
77,996 KB
testcase_14 AC 104 ms
77,564 KB
testcase_15 AC 108 ms
77,700 KB
testcase_16 AC 108 ms
78,276 KB
testcase_17 AC 107 ms
77,832 KB
testcase_18 AC 147 ms
77,776 KB
testcase_19 AC 145 ms
77,704 KB
testcase_20 AC 145 ms
77,804 KB
testcase_21 AC 150 ms
77,732 KB
testcase_22 AC 154 ms
77,592 KB
testcase_23 AC 128 ms
77,748 KB
testcase_24 AC 122 ms
77,788 KB
testcase_25 AC 121 ms
77,656 KB
testcase_26 AC 129 ms
78,164 KB
testcase_27 AC 140 ms
78,232 KB
testcase_28 AC 343 ms
78,244 KB
testcase_29 AC 339 ms
78,312 KB
testcase_30 AC 342 ms
78,180 KB
testcase_31 AC 348 ms
78,044 KB
testcase_32 AC 340 ms
78,256 KB
testcase_33 AC 145 ms
78,200 KB
testcase_34 AC 148 ms
78,148 KB
testcase_35 AC 146 ms
78,228 KB
testcase_36 AC 156 ms
78,200 KB
testcase_37 AC 149 ms
78,452 KB
testcase_38 AC 550 ms
80,140 KB
testcase_39 AC 547 ms
80,164 KB
testcase_40 AC 565 ms
80,652 KB
testcase_41 AC 527 ms
79,828 KB
testcase_42 AC 544 ms
80,000 KB
testcase_43 AC 78 ms
71,680 KB
testcase_44 AC 76 ms
71,632 KB
testcase_45 AC 79 ms
71,632 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import heapq
_ = input()
ps = list(map(int, input().split()))
qs = list(map(int, input().split()))
pqs = [(-p*q*10**-5, p/1000.0, 1-q/100.0) for p, q in zip(ps, qs) if p]
pqs.sort()
c = f = s = 1
while f > 10**-5:
  pq, p, q = pqs[0]
  f *= 1 + pq/s
  c += f
  s += pq
  heapq.heapreplace(pqs, (pq*q, p*q, q))
print(c)
0