結果

問題 No.210 探し物はどこですか?
ユーザー vwxyzvwxyz
提出日時 2021-09-25 01:29:19
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 687 bytes
コンパイル時間 314 ms
コンパイル使用メモリ 87,072 KB
実行使用メモリ 81,356 KB
最終ジャッジ日時 2023-09-18 22:42:57
合計ジャッジ時間 33,247 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 588 ms
77,844 KB
testcase_01 AC 720 ms
79,072 KB
testcase_02 WA -
testcase_03 AC 600 ms
77,788 KB
testcase_04 AC 535 ms
77,992 KB
testcase_05 AC 515 ms
77,756 KB
testcase_06 AC 562 ms
77,952 KB
testcase_07 AC 545 ms
78,212 KB
testcase_08 AC 388 ms
77,824 KB
testcase_09 AC 403 ms
78,124 KB
testcase_10 AC 413 ms
78,280 KB
testcase_11 AC 464 ms
78,300 KB
testcase_12 AC 465 ms
78,088 KB
testcase_13 AC 611 ms
78,156 KB
testcase_14 AC 686 ms
78,120 KB
testcase_15 AC 683 ms
77,948 KB
testcase_16 AC 675 ms
78,452 KB
testcase_17 AC 740 ms
77,940 KB
testcase_18 AC 555 ms
77,888 KB
testcase_19 AC 564 ms
78,188 KB
testcase_20 AC 572 ms
78,224 KB
testcase_21 AC 562 ms
78,200 KB
testcase_22 AC 564 ms
78,180 KB
testcase_23 AC 768 ms
79,260 KB
testcase_24 AC 763 ms
79,288 KB
testcase_25 AC 765 ms
79,364 KB
testcase_26 AC 783 ms
79,424 KB
testcase_27 AC 770 ms
79,120 KB
testcase_28 AC 767 ms
79,596 KB
testcase_29 AC 749 ms
78,868 KB
testcase_30 AC 745 ms
79,732 KB
testcase_31 AC 744 ms
78,796 KB
testcase_32 AC 748 ms
79,204 KB
testcase_33 AC 870 ms
81,356 KB
testcase_34 AC 874 ms
81,268 KB
testcase_35 AC 857 ms
80,596 KB
testcase_36 AC 859 ms
81,332 KB
testcase_37 AC 872 ms
81,344 KB
testcase_38 AC 832 ms
81,084 KB
testcase_39 AC 831 ms
81,312 KB
testcase_40 AC 853 ms
81,056 KB
testcase_41 AC 835 ms
81,148 KB
testcase_42 AC 841 ms
81,216 KB
testcase_43 AC 99 ms
77,068 KB
testcase_44 AC 560 ms
77,372 KB
testcase_45 AC 583 ms
78,060 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import heapq
import sys
from heapq import heappush,heappop,heapify,heappushpop,_heappop_max,_heapify_max
def _heappush_max(heap,item):
    heap.append(item)
    heapq._siftdown_max(heap, 0, len(heap)-1)
def _heappushpop_max(heap, item):
    if heap and item < heap[0]:
        item, heap[0] = heap[0], item
        heapq._siftup_max(heap, 0)
    return item
readline=sys.stdin.readline

N=int(readline())
P=list(map(int,readline().split()))
Q=list(map(int,readline().split()))
for i in range(N):
    P[i]=[P[i]*Q[i]/100000,i]
    Q[i]/=100
_heapify_max(P)
ans=0
pro=1
for _ in range(5*10**5):
    p,i=_heappop_max(P)
    ans+=pro
    pro-=p
    _heappush_max(P,[p*(1-Q[i]),i])
print(ans)
0