結果

問題 No.210 探し物はどこですか?
ユーザー vwxyzvwxyz
提出日時 2021-09-25 01:25:51
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 970 bytes
コンパイル時間 375 ms
コンパイル使用メモリ 10,948 KB
実行使用メモリ 10,728 KB
最終ジャッジ日時 2023-09-18 22:36:41
合計ジャッジ時間 10,105 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 165 ms
10,424 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 166 ms
10,576 KB
testcase_04 AC 151 ms
10,408 KB
testcase_05 AC 159 ms
10,336 KB
testcase_06 AC 167 ms
10,464 KB
testcase_07 AC 158 ms
10,364 KB
testcase_08 AC 136 ms
10,464 KB
testcase_09 AC 143 ms
10,492 KB
testcase_10 AC 137 ms
10,472 KB
testcase_11 AC 141 ms
10,408 KB
testcase_12 AC 143 ms
10,340 KB
testcase_13 AC 166 ms
10,428 KB
testcase_14 AC 164 ms
10,428 KB
testcase_15 AC 161 ms
10,352 KB
testcase_16 AC 171 ms
10,424 KB
testcase_17 AC 168 ms
10,428 KB
testcase_18 AC 157 ms
10,432 KB
testcase_19 AC 156 ms
10,424 KB
testcase_20 AC 158 ms
10,436 KB
testcase_21 AC 158 ms
10,424 KB
testcase_22 AC 153 ms
10,428 KB
testcase_23 AC 191 ms
10,508 KB
testcase_24 AC 185 ms
10,448 KB
testcase_25 AC 183 ms
10,456 KB
testcase_26 AC 187 ms
10,508 KB
testcase_27 AC 181 ms
10,576 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 AC 197 ms
10,676 KB
testcase_34 AC 199 ms
10,616 KB
testcase_35 AC 200 ms
10,556 KB
testcase_36 AC 203 ms
10,620 KB
testcase_37 AC 197 ms
10,616 KB
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 AC 110 ms
10,512 KB
testcase_44 AC 172 ms
10,424 KB
testcase_45 AC 168 ms
10,436 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import bisect
import copy
import decimal
import fractions
import functools
import heapq
import itertools
import math
import random
import sys
from collections import Counter,deque,defaultdict
from functools import lru_cache,reduce
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
from math import gcd as GCD
read=sys.stdin.read
readline=sys.stdin.readline
readlines=sys.stdin.readlines

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(10**5):
    p,i=_heappop_max(P)
    ans+=pro
    pro-=p
    _heappush_max(P,[p*(1-Q[i]),i])
print(ans)
0