結果
| 問題 |
No.210 探し物はどこですか?
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-07-03 23:25:36 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 813 bytes |
| コンパイル時間 | 260 ms |
| コンパイル使用メモリ | 82,576 KB |
| 実行使用メモリ | 74,584 KB |
| 最終ジャッジ日時 | 2024-06-30 15:29:43 |
| 合計ジャッジ時間 | 5,404 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 3 |
| other | RE * 43 |
ソースコード
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(2*10**5+10)
write = lambda x: sys.stdout.write(x+"\n")
debug = lambda x: sys.stderr.write(x+"\n")
writef = lambda x: print("{:.12f}".format(x))
n = int(input())
p = list(map(int, input().split()))
q = list(map(int, input().split()))
p = [v/1000 for v in p]
q = [v/100 for v in q]
from heapq import heappop as hpp, heappush as hp, heappushpop as hppp, heapreplace as hr
from random import random as r
def sub():
h = [(-v*q[i],i) for i,v in enumerate(p)]
heapify(h)
ans = 0
count = [0]*n
total = 1
pp = 1
for ii in range(10**6):
pr,i = h[0]
pr *= -1
pr2 = (1-q[i])*pr
hr(h, (-pr2, i))
ans += (ii+1)*pr
# print(ans, pr)
return ans
ans = sub()
print(ans)