結果
問題 | No.210 探し物はどこですか? |
ユーザー | vwxyz |
提出日時 | 2022-05-08 13:45:25 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 686 bytes |
コンパイル時間 | 988 ms |
コンパイル使用メモリ | 87,164 KB |
実行使用メモリ | 79,444 KB |
最終ジャッジ日時 | 2023-09-22 09:26:45 |
合計ジャッジ時間 | 13,545 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 201 ms
77,724 KB |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | AC | 212 ms
78,000 KB |
testcase_04 | AC | 185 ms
77,804 KB |
testcase_05 | AC | 192 ms
77,668 KB |
testcase_06 | AC | 207 ms
78,020 KB |
testcase_07 | AC | 189 ms
77,808 KB |
testcase_08 | AC | 168 ms
77,628 KB |
testcase_09 | AC | 170 ms
78,092 KB |
testcase_10 | AC | 170 ms
78,144 KB |
testcase_11 | AC | 175 ms
77,920 KB |
testcase_12 | AC | 175 ms
77,760 KB |
testcase_13 | AC | 215 ms
77,628 KB |
testcase_14 | AC | 217 ms
77,876 KB |
testcase_15 | AC | 219 ms
77,848 KB |
testcase_16 | AC | 221 ms
78,044 KB |
testcase_17 | AC | 220 ms
77,740 KB |
testcase_18 | AC | 213 ms
77,700 KB |
testcase_19 | AC | 207 ms
77,872 KB |
testcase_20 | AC | 203 ms
78,012 KB |
testcase_21 | AC | 206 ms
77,640 KB |
testcase_22 | AC | 205 ms
77,732 KB |
testcase_23 | AC | 251 ms
77,900 KB |
testcase_24 | AC | 250 ms
78,204 KB |
testcase_25 | AC | 254 ms
78,016 KB |
testcase_26 | AC | 253 ms
78,248 KB |
testcase_27 | AC | 252 ms
77,988 KB |
testcase_28 | WA | - |
testcase_29 | WA | - |
testcase_30 | WA | - |
testcase_31 | WA | - |
testcase_32 | WA | - |
testcase_33 | AC | 276 ms
79,256 KB |
testcase_34 | AC | 273 ms
79,284 KB |
testcase_35 | AC | 269 ms
78,380 KB |
testcase_36 | AC | 273 ms
79,236 KB |
testcase_37 | AC | 269 ms
79,080 KB |
testcase_38 | WA | - |
testcase_39 | WA | - |
testcase_40 | WA | - |
testcase_41 | WA | - |
testcase_42 | WA | - |
testcase_43 | AC | 85 ms
76,884 KB |
testcase_44 | AC | 184 ms
77,036 KB |
testcase_45 | AC | 205 ms
77,976 KB |
ソースコード
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(10**5): p,i=_heappop_max(P) ans+=pro pro-=p _heappush_max(P,[p*(1-Q[i]),i]) print(ans)