結果

問題 No.210 探し物はどこですか?
ユーザー rpy3cpprpy3cpp
提出日時 2015-05-18 01:27:47
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 989 ms / 2,000 ms
コード長 298 bytes
コンパイル時間 302 ms
コンパイル使用メモリ 87,684 KB
実行使用メモリ 82,392 KB
最終ジャッジ日時 2023-08-25 02:10:15
合計ジャッジ時間 13,423 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 155 ms
77,712 KB
testcase_01 AC 489 ms
78,940 KB
testcase_02 AC 989 ms
82,392 KB
testcase_03 AC 74 ms
71,828 KB
testcase_04 AC 89 ms
76,988 KB
testcase_05 AC 86 ms
76,380 KB
testcase_06 AC 72 ms
71,700 KB
testcase_07 AC 86 ms
76,600 KB
testcase_08 AC 103 ms
77,832 KB
testcase_09 AC 98 ms
77,636 KB
testcase_10 AC 107 ms
77,960 KB
testcase_11 AC 97 ms
77,796 KB
testcase_12 AC 101 ms
77,984 KB
testcase_13 AC 107 ms
77,880 KB
testcase_14 AC 101 ms
77,828 KB
testcase_15 AC 101 ms
77,656 KB
testcase_16 AC 100 ms
78,052 KB
testcase_17 AC 103 ms
78,048 KB
testcase_18 AC 144 ms
77,772 KB
testcase_19 AC 142 ms
77,712 KB
testcase_20 AC 140 ms
77,772 KB
testcase_21 AC 147 ms
77,776 KB
testcase_22 AC 144 ms
77,716 KB
testcase_23 AC 123 ms
77,784 KB
testcase_24 AC 118 ms
77,784 KB
testcase_25 AC 119 ms
78,048 KB
testcase_26 AC 119 ms
78,016 KB
testcase_27 AC 131 ms
78,000 KB
testcase_28 AC 337 ms
78,504 KB
testcase_29 AC 336 ms
78,228 KB
testcase_30 AC 339 ms
78,484 KB
testcase_31 AC 341 ms
78,212 KB
testcase_32 AC 337 ms
78,356 KB
testcase_33 AC 138 ms
78,184 KB
testcase_34 AC 144 ms
78,056 KB
testcase_35 AC 138 ms
78,036 KB
testcase_36 AC 149 ms
78,484 KB
testcase_37 AC 143 ms
78,416 KB
testcase_38 AC 534 ms
80,112 KB
testcase_39 AC 546 ms
80,444 KB
testcase_40 AC 554 ms
80,044 KB
testcase_41 AC 519 ms
80,048 KB
testcase_42 AC 542 ms
79,824 KB
testcase_43 AC 75 ms
71,704 KB
testcase_44 AC 74 ms
71,472 KB
testcase_45 AC 75 ms
71,596 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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