結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 400 ms
95,224 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 409 ms
95,248 KB
testcase_04 AC 375 ms
95,152 KB
testcase_05 AC 384 ms
95,872 KB
testcase_06 AC 392 ms
95,664 KB
testcase_07 AC 374 ms
95,148 KB
testcase_08 AC 361 ms
95,312 KB
testcase_09 AC 358 ms
95,408 KB
testcase_10 AC 370 ms
95,644 KB
testcase_11 AC 372 ms
95,308 KB
testcase_12 AC 371 ms
95,600 KB
testcase_13 AC 406 ms
95,588 KB
testcase_14 AC 414 ms
95,324 KB
testcase_15 AC 421 ms
95,556 KB
testcase_16 AC 420 ms
95,300 KB
testcase_17 AC 411 ms
95,588 KB
testcase_18 AC 399 ms
95,552 KB
testcase_19 AC 396 ms
95,540 KB
testcase_20 AC 396 ms
95,600 KB
testcase_21 AC 402 ms
95,416 KB
testcase_22 AC 394 ms
95,644 KB
testcase_23 AC 444 ms
95,444 KB
testcase_24 AC 439 ms
95,344 KB
testcase_25 AC 446 ms
95,588 KB
testcase_26 AC 444 ms
95,412 KB
testcase_27 AC 445 ms
95,692 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 AC 475 ms
96,400 KB
testcase_34 AC 470 ms
96,208 KB
testcase_35 AC 469 ms
96,300 KB
testcase_36 AC 471 ms
95,976 KB
testcase_37 AC 467 ms
95,984 KB
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 AC 279 ms
94,952 KB
testcase_44 AC 381 ms
94,920 KB
testcase_45 AC 399 ms
95,640 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