結果

問題 No.210 探し物はどこですか?
ユーザー vwxyzvwxyz
提出日時 2021-09-25 01:27:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,784 ms / 2,000 ms
コード長 970 bytes
コンパイル時間 499 ms
コンパイル使用メモリ 86,952 KB
実行使用メモリ 101,096 KB
最終ジャッジ日時 2023-09-18 22:39:46
合計ジャッジ時間 68,756 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,255 ms
95,568 KB
testcase_01 AC 1,487 ms
97,700 KB
testcase_02 AC 1,655 ms
101,080 KB
testcase_03 AC 1,279 ms
95,640 KB
testcase_04 AC 1,158 ms
95,384 KB
testcase_05 AC 1,105 ms
95,808 KB
testcase_06 AC 1,188 ms
95,444 KB
testcase_07 AC 1,164 ms
95,064 KB
testcase_08 AC 1,083 ms
95,552 KB
testcase_09 AC 1,068 ms
95,412 KB
testcase_10 AC 1,080 ms
95,252 KB
testcase_11 AC 1,152 ms
95,560 KB
testcase_12 AC 1,108 ms
95,596 KB
testcase_13 AC 1,416 ms
95,824 KB
testcase_14 AC 1,567 ms
95,596 KB
testcase_15 AC 1,545 ms
95,616 KB
testcase_16 AC 1,484 ms
95,232 KB
testcase_17 AC 1,631 ms
95,880 KB
testcase_18 AC 1,174 ms
95,744 KB
testcase_19 AC 1,199 ms
95,588 KB
testcase_20 AC 1,192 ms
95,620 KB
testcase_21 AC 1,199 ms
95,716 KB
testcase_22 AC 1,202 ms
95,360 KB
testcase_23 AC 1,607 ms
98,112 KB
testcase_24 AC 1,595 ms
98,060 KB
testcase_25 AC 1,584 ms
98,308 KB
testcase_26 AC 1,585 ms
98,224 KB
testcase_27 AC 1,601 ms
98,364 KB
testcase_28 AC 1,537 ms
97,560 KB
testcase_29 AC 1,558 ms
97,732 KB
testcase_30 AC 1,551 ms
98,108 KB
testcase_31 AC 1,528 ms
97,604 KB
testcase_32 AC 1,544 ms
97,648 KB
testcase_33 AC 1,783 ms
100,892 KB
testcase_34 AC 1,758 ms
101,096 KB
testcase_35 AC 1,763 ms
100,848 KB
testcase_36 AC 1,784 ms
100,764 KB
testcase_37 AC 1,782 ms
100,816 KB
testcase_38 AC 1,709 ms
100,400 KB
testcase_39 AC 1,721 ms
100,176 KB
testcase_40 AC 1,732 ms
100,184 KB
testcase_41 AC 1,750 ms
100,460 KB
testcase_42 AC 1,740 ms
100,264 KB
testcase_43 AC 297 ms
94,760 KB
testcase_44 AC 1,222 ms
95,192 KB
testcase_45 AC 1,216 ms
95,228 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**6):
    p,i=_heappop_max(P)
    ans+=pro
    pro-=p
    _heappush_max(P,[p*(1-Q[i]),i])
print(ans)
0