結果
問題 | No.2009 Drunkers' Contest |
ユーザー | yuusanlondon |
提出日時 | 2022-07-15 22:04:44 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 394 bytes |
コンパイル時間 | 441 ms |
コンパイル使用メモリ | 87,252 KB |
実行使用メモリ | 139,460 KB |
最終ジャッジ日時 | 2023-09-10 01:59:33 |
合計ジャッジ時間 | 11,335 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 71 ms
71,588 KB |
testcase_01 | AC | 69 ms
71,212 KB |
testcase_02 | AC | 68 ms
71,460 KB |
testcase_03 | AC | 68 ms
71,484 KB |
testcase_04 | AC | 71 ms
71,356 KB |
testcase_05 | AC | 71 ms
71,364 KB |
testcase_06 | AC | 68 ms
71,452 KB |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | AC | 70 ms
71,436 KB |
testcase_10 | WA | - |
testcase_11 | AC | 70 ms
71,628 KB |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | AC | 78 ms
76,956 KB |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | AC | 186 ms
137,028 KB |
testcase_26 | WA | - |
testcase_27 | AC | 182 ms
136,616 KB |
testcase_28 | WA | - |
testcase_29 | WA | - |
testcase_30 | WA | - |
testcase_31 | WA | - |
testcase_32 | AC | 187 ms
136,848 KB |
testcase_33 | WA | - |
testcase_34 | WA | - |
testcase_35 | WA | - |
testcase_36 | WA | - |
testcase_37 | WA | - |
testcase_38 | WA | - |
testcase_39 | WA | - |
testcase_40 | WA | - |
testcase_41 | WA | - |
testcase_42 | WA | - |
testcase_43 | WA | - |
testcase_44 | AC | 179 ms
139,384 KB |
testcase_45 | AC | 179 ms
139,460 KB |
testcase_46 | AC | 167 ms
133,920 KB |
testcase_47 | AC | 152 ms
110,056 KB |
testcase_48 | AC | 152 ms
109,828 KB |
testcase_49 | WA | - |
testcase_50 | WA | - |
testcase_51 | WA | - |
testcase_52 | WA | - |
testcase_53 | WA | - |
testcase_54 | WA | - |
testcase_55 | WA | - |
testcase_56 | WA | - |
testcase_57 | WA | - |
ソースコード
import math n=int(input()) a=list(map(int,input().split())) b=list(map(int,input().split())) c=[0]*n asum=0 bsum=0 for i in range(n-1,-1,-1): asum+=a[i] bsum+=b[i] if asum>=bsum: c[i]=min(math.sqrt(a[i]/b[i])-1,math.sqrt(asum/bsum)-1) currmax=0 for i in range(n): currmax=max(currmax,c[i]) c[i]=currmax ans=0 for i in range(n): ans+=a[i]/(1+c[i]) ans+=b[i]*(1+c[i]) print(ans)