結果
問題 | No.2009 Drunkers' Contest |
ユーザー | Akijin_007 |
提出日時 | 2022-07-15 22:49:39 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 665 bytes |
コンパイル時間 | 1,501 ms |
コンパイル使用メモリ | 86,908 KB |
実行使用メモリ | 138,408 KB |
最終ジャッジ日時 | 2023-09-10 04:07:32 |
合計ジャッジ時間 | 14,088 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 73 ms
71,996 KB |
testcase_01 | AC | 73 ms
71,828 KB |
testcase_02 | AC | 73 ms
71,880 KB |
testcase_03 | AC | 72 ms
71,744 KB |
testcase_04 | AC | 72 ms
71,912 KB |
testcase_05 | AC | 71 ms
71,728 KB |
testcase_06 | AC | 72 ms
71,792 KB |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | AC | 71 ms
71,652 KB |
testcase_10 | AC | 71 ms
71,884 KB |
testcase_11 | AC | 72 ms
71,804 KB |
testcase_12 | AC | 71 ms
71,952 KB |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | AC | 88 ms
77,100 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 | 229 ms
135,768 KB |
testcase_26 | AC | 230 ms
135,368 KB |
testcase_27 | AC | 222 ms
137,116 KB |
testcase_28 | WA | - |
testcase_29 | WA | - |
testcase_30 | WA | - |
testcase_31 | WA | - |
testcase_32 | AC | 238 ms
135,512 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 | 183 ms
137,672 KB |
testcase_45 | AC | 222 ms
138,408 KB |
testcase_46 | AC | 201 ms
134,132 KB |
testcase_47 | AC | 198 ms
116,352 KB |
testcase_48 | AC | 197 ms
116,920 KB |
testcase_49 | WA | - |
testcase_50 | AC | 204 ms
116,616 KB |
testcase_51 | WA | - |
testcase_52 | WA | - |
testcase_53 | AC | 213 ms
132,276 KB |
testcase_54 | WA | - |
testcase_55 | WA | - |
testcase_56 | WA | - |
testcase_57 | WA | - |
ソースコード
#int(input()) #map(int, input().split()) #list(map(int, input().split())) N = int(input()) A = list(map(int, input().split())) B = list(map(int, input().split())) ans = 0 x = 0 def time(x, a, b): return a / (1 + x) + b * (1 + x) def sake(a, b): return max(0, (a/b)**0.5-1) ans = 0 c = [] sa = sum(A) sb = sum(B) a = 0 b = 0 k = 0 u = [0] * N for i in range(N): t = sake(sa, sb) a += A[i] b += B[i] nt = sake(a, b) if nt <= t: for j in range(k, i+1): u[j] = nt sa -= a sb -= b a = 0 b = 0 k = i+1 for i in range(N): ans += time(u[i], A[i], B[i]) print(ans)