結果
| 問題 | No.210 探し物はどこですか? |
| コンテスト | |
| ユーザー |
convexineq
|
| 提出日時 | 2020-12-18 20:49:56 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 476 ms / 2,000 ms |
| + 463µs | |
| コード長 | 392 bytes |
| 記録 | |
| コンパイル時間 | 230 ms |
| コンパイル使用メモリ | 95,944 KB |
| 実行使用メモリ | 87,260 KB |
| 最終ジャッジ日時 | 2026-09-01 13:46:02 |
| 合計ジャッジ時間 | 18,841 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 43 |
ソースコード
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)
convexineq