結果

問題 No.210 探し物はどこですか?
ユーザー shotoyooshotoyoo
提出日時 2021-07-03 23:26:03
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 648 ms / 2,000 ms
コード長 822 bytes
コンパイル時間 247 ms
コンパイル使用メモリ 87,232 KB
実行使用メモリ 82,308 KB
最終ジャッジ日時 2023-09-13 05:20:52
合計ジャッジ時間 25,736 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 386 ms
79,132 KB
testcase_01 AC 446 ms
79,088 KB
testcase_02 AC 478 ms
81,144 KB
testcase_03 AC 487 ms
78,432 KB
testcase_04 AC 514 ms
78,572 KB
testcase_05 AC 483 ms
78,388 KB
testcase_06 AC 417 ms
78,332 KB
testcase_07 AC 482 ms
78,968 KB
testcase_08 AC 417 ms
78,788 KB
testcase_09 AC 445 ms
78,824 KB
testcase_10 AC 446 ms
78,660 KB
testcase_11 AC 462 ms
78,908 KB
testcase_12 AC 477 ms
78,808 KB
testcase_13 AC 505 ms
78,560 KB
testcase_14 AC 607 ms
79,000 KB
testcase_15 AC 572 ms
79,060 KB
testcase_16 AC 547 ms
78,860 KB
testcase_17 AC 581 ms
78,512 KB
testcase_18 AC 404 ms
79,120 KB
testcase_19 AC 406 ms
79,692 KB
testcase_20 AC 417 ms
79,252 KB
testcase_21 AC 416 ms
79,336 KB
testcase_22 AC 398 ms
79,256 KB
testcase_23 AC 523 ms
79,424 KB
testcase_24 AC 526 ms
79,624 KB
testcase_25 AC 520 ms
79,420 KB
testcase_26 AC 530 ms
79,448 KB
testcase_27 AC 527 ms
79,524 KB
testcase_28 AC 549 ms
80,076 KB
testcase_29 AC 548 ms
79,852 KB
testcase_30 AC 549 ms
79,428 KB
testcase_31 AC 546 ms
80,320 KB
testcase_32 AC 530 ms
79,268 KB
testcase_33 AC 637 ms
81,888 KB
testcase_34 AC 613 ms
81,116 KB
testcase_35 AC 594 ms
81,252 KB
testcase_36 AC 589 ms
81,364 KB
testcase_37 AC 648 ms
82,308 KB
testcase_38 AC 618 ms
80,768 KB
testcase_39 AC 610 ms
81,508 KB
testcase_40 AC 586 ms
81,524 KB
testcase_41 AC 598 ms
81,276 KB
testcase_42 AC 604 ms
81,112 KB
testcase_43 AC 106 ms
77,744 KB
testcase_44 AC 272 ms
77,944 KB
testcase_45 AC 494 ms
78,432 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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, heapify
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)
0