結果

問題 No.210 探し物はどこですか?
ユーザー autotaker1984autotaker1984
提出日時 2015-04-07 19:56:20
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 885 bytes
コンパイル時間 530 ms
コンパイル使用メモリ 6,984 KB
実行使用メモリ 7,164 KB
最終ジャッジ日時 2023-09-17 15:55:04
合計ジャッジ時間 19,249 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 573 ms
6,792 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 22 ms
6,788 KB
testcase_04 AC 34 ms
6,964 KB
testcase_05 AC 35 ms
6,720 KB
testcase_06 AC 22 ms
6,952 KB
testcase_07 AC 33 ms
6,816 KB
testcase_08 AC 122 ms
6,748 KB
testcase_09 AC 116 ms
6,960 KB
testcase_10 AC 114 ms
6,788 KB
testcase_11 AC 91 ms
6,716 KB
testcase_12 AC 88 ms
6,816 KB
testcase_13 AC 147 ms
6,876 KB
testcase_14 AC 87 ms
6,964 KB
testcase_15 AC 93 ms
6,720 KB
testcase_16 AC 94 ms
6,940 KB
testcase_17 AC 74 ms
6,772 KB
testcase_18 AC 557 ms
6,968 KB
testcase_19 AC 565 ms
6,792 KB
testcase_20 AC 564 ms
6,880 KB
testcase_21 AC 557 ms
6,960 KB
testcase_22 AC 563 ms
6,768 KB
testcase_23 AC 341 ms
7,028 KB
testcase_24 AC 279 ms
7,012 KB
testcase_25 AC 289 ms
6,820 KB
testcase_26 AC 313 ms
6,892 KB
testcase_27 AC 450 ms
7,040 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 AC 590 ms
7,008 KB
testcase_34 AC 606 ms
7,128 KB
testcase_35 AC 558 ms
7,064 KB
testcase_36 AC 623 ms
6,948 KB
testcase_37 AC 596 ms
7,060 KB
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 AC 17 ms
6,964 KB
testcase_44 AC 17 ms
6,776 KB
testcase_45 AC 20 ms
6,832 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from Queue import * # Queue, LifoQueue, PriorityQueue
from bisect import * #bisect, insort
from collections import * #deque, Counter,OrderedDict,defaultdict
#set([]) 
import math
import copy
import itertools
import string
import sys
myread = lambda : map(float,raw_input().split())
def solver():
    N = int(raw_input())
    P = myread()
    Q = myread()
    for i in xrange(N):
        P[i] /= 1000
        Q[i] /= 100
    
    que = PriorityQueue(N)

    for i in xrange(N):
        que.put((-P[i]*Q[i],i))
    times = 1
    ans = 0.0
    e = 0.1 ** 16
    while not(que.empty()):
        t = que.get()
        p = t[0]
        now = t[1]
        if times >= 100000:
            break
        ans += (-p) * times
        times += 1
        if (-p) * (1- Q[now]) > e:
            que.put((p*(1-Q[now]),now))

    print "%.8f" % ans
    

if __name__ == "__main__":
    solver()
    

0