結果
| 問題 |
No.1590 Random Shopping
|
| コンテスト | |
| ユーザー |
shakayami
|
| 提出日時 | 2021-07-09 00:20:27 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 400 bytes |
| コンパイル時間 | 160 ms |
| コンパイル使用メモリ | 82,128 KB |
| 実行使用メモリ | 82,632 KB |
| 最終ジャッジ日時 | 2024-07-01 13:32:41 |
| 合計ジャッジ時間 | 144,513 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 25 |
ソースコード
import random
from heapq import heappush,heappop
N=int(input())
A=[int(i) for i in input().split()]
R=[int(i) for i in input().split()]
def solve():
ans=0
q=[]
for i in range(N):
heappush(q,A[i])
if random.randrange(2):
ans+=heappop(q)*R[i]
return ans
X=0
Y=0
import time
start=time.time()
while(time.time()-start<4.9):
X+=solve()
Y+=1
print(X/Y)
shakayami