用户输出
2.200000000000000
Special Judge 信息
0.0000000000
系统信息
Exited with return code 0
编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#23030 | #2040. 四倍大甜甜花 | Wrong Answer | 42 | 894 ms | 4248 K | Python 3 / 987 B | 192024210801 | 2024-12-15 18:09:45 |
from functools import lru_cache
@lru_cache(maxsize=None)
def qiwang(flowers, tiantian_flowers, P, Q, R, B, C):
if flowers < B:
return tiantian_flowers, ""
p_suc = P / 100
p_xing = Q / 100
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
sha_expected = p_suc * sha_expected + (1 - p_suc) * qiwang(flowers - B, tiantian_flowers + C, P, Q, R, B, C)[0]
sha_strategy = "shatang"
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
xing_expected = p_xing * xing_expected + (1 - p_xing) * qiwang(flowers - B, tiantian_flowers + C, P, Q, R, B, C)[0]
xing_strategy = "Xingqiu"
if sha_expected >= xing_expected:
return sha_expected, sha_strategy
else:
return xing_expected, xing_strategy
A, B, C, P, Q, R = map(int, input().split())
expected_quadruple_flowers, _ = qiwang(A, 0, P, Q, R, B, C)
print(f"{expected_quadruple_flowers:.15f}")
用户输出
2.200000000000000
Special Judge 信息
0.0000000000
系统信息
Exited with return code 0
用户输出
2.901000000000000
Special Judge 信息
0.0000000000
系统信息
Exited with return code 0
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 21, in <module>
expected_quadruple_flowers, _ = qiwang(A, 0, P, Q, R, B, C)
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
[Previous line repeated 494 more times]
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
RecursionError: maximum recursion depth exceeded
Special Judge 信息
nan
系统信息
Exited with return code 1
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 21, in <module>
expected_quadruple_flowers, _ = qiwang(A, 0, P, Q, R, B, C)
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
[Previous line repeated 494 more times]
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
RecursionError: maximum recursion depth exceeded
Special Judge 信息
nan
系统信息
Exited with return code 1
用户输出
48.510000000000005
Special Judge 信息
0.0000000000
系统信息
Exited with return code 0
用户输出
14.279999999999999
Special Judge 信息
0.0000000000
系统信息
Exited with return code 0
用户输出
163.010814720000013
Special Judge 信息
0.0000000000
系统信息
Exited with return code 0
用户输出
620.982881678869376
Special Judge 信息
0.0000000000
系统信息
Exited with return code 0
用户输出
150.400000000000006
Special Judge 信息
0.0000000000
系统信息
Exited with return code 0
用户输出
21.799999999999997
Special Judge 信息
0.0000000000
系统信息
Exited with return code 0
用户输出
122.669999999999987
Special Judge 信息
0.0000000000
系统信息
Exited with return code 0
用户输出
1.750000000000000
Special Judge 信息
0.0000000000
系统信息
Exited with return code 0
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 21, in <module>
expected_quadruple_flowers, _ = qiwang(A, 0, P, Q, R, B, C)
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
[Previous line repeated 495 more times]
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
RecursionError: maximum recursion depth exceeded
Special Judge 信息
nan
系统信息
Exited with return code 1
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 21, in <module>
expected_quadruple_flowers, _ = qiwang(A, 0, P, Q, R, B, C)
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
[Previous line repeated 496 more times]
RecursionError: maximum recursion depth exceeded
Special Judge 信息
nan
系统信息
Exited with return code 1
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 21, in <module>
expected_quadruple_flowers, _ = qiwang(A, 0, P, Q, R, B, C)
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
[Previous line repeated 496 more times]
RecursionError: maximum recursion depth exceeded
Special Judge 信息
nan
系统信息
Exited with return code 1
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 21, in <module>
expected_quadruple_flowers, _ = qiwang(A, 0, P, Q, R, B, C)
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
[Previous line repeated 496 more times]
RecursionError: maximum recursion depth exceeded
Special Judge 信息
nan
系统信息
Exited with return code 1
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 21, in <module>
expected_quadruple_flowers, _ = qiwang(A, 0, P, Q, R, B, C)
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
[Previous line repeated 495 more times]
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
RecursionError: maximum recursion depth exceeded
Special Judge 信息
nan
系统信息
Exited with return code 1
用户输出
349.680000000000007
Special Judge 信息
0.0000000000
系统信息
Exited with return code 0
用户输出
351.503613690933889
Special Judge 信息
0.0000000000
系统信息
Exited with return code 0
用户输出
1073.155897040058790
Special Judge 信息
0.0000000000
系统信息
Exited with return code 0
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 21, in <module>
expected_quadruple_flowers, _ = qiwang(A, 0, P, Q, R, B, C)
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
[Previous line repeated 495 more times]
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
RecursionError: maximum recursion depth exceeded
Special Judge 信息
nan
系统信息
Exited with return code 1
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 21, in <module>
expected_quadruple_flowers, _ = qiwang(A, 0, P, Q, R, B, C)
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
[Previous line repeated 495 more times]
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
RecursionError: maximum recursion depth exceeded
Special Judge 信息
nan
系统信息
Exited with return code 1
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 21, in <module>
expected_quadruple_flowers, _ = qiwang(A, 0, P, Q, R, B, C)
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
[Previous line repeated 493 more times]
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
RecursionError: maximum recursion depth exceeded
Special Judge 信息
nan
系统信息
Exited with return code 1
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 21, in <module>
expected_quadruple_flowers, _ = qiwang(A, 0, P, Q, R, B, C)
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
[Previous line repeated 34 more times]
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
[Previous line repeated 458 more times]
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
RecursionError: maximum recursion depth exceeded
Special Judge 信息
nan
系统信息
Exited with return code 1
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 21, in <module>
expected_quadruple_flowers, _ = qiwang(A, 0, P, Q, R, B, C)
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
[Previous line repeated 495 more times]
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
RecursionError: maximum recursion depth exceeded
Special Judge 信息
nan
系统信息
Exited with return code 1
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 21, in <module>
expected_quadruple_flowers, _ = qiwang(A, 0, P, Q, R, B, C)
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
[Previous line repeated 494 more times]
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
RecursionError: maximum recursion depth exceeded
Special Judge 信息
nan
系统信息
Exited with return code 1
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 21, in <module>
expected_quadruple_flowers, _ = qiwang(A, 0, P, Q, R, B, C)
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
[Previous line repeated 493 more times]
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
RecursionError: maximum recursion depth exceeded
Special Judge 信息
nan
系统信息
Exited with return code 1
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 21, in <module>
expected_quadruple_flowers, _ = qiwang(A, 0, P, Q, R, B, C)
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
[Previous line repeated 3 more times]
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
[Previous line repeated 489 more times]
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
RecursionError: maximum recursion depth exceeded
Special Judge 信息
nan
系统信息
Exited with return code 1
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 21, in <module>
expected_quadruple_flowers, _ = qiwang(A, 0, P, Q, R, B, C)
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
[Previous line repeated 8 more times]
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
[Previous line repeated 484 more times]
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
RecursionError: maximum recursion depth exceeded
Special Judge 信息
nan
系统信息
Exited with return code 1
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 21, in <module>
expected_quadruple_flowers, _ = qiwang(A, 0, P, Q, R, B, C)
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 12, in qiwang
xing_expected, _ = qiwang(max(0, flowers - B + R), tiantian_flowers + C, P, Q, R, B, C)
[Previous line repeated 495 more times]
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
RecursionError: maximum recursion depth exceeded
Special Judge 信息
nan
系统信息
Exited with return code 1
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 21, in <module>
expected_quadruple_flowers, _ = qiwang(A, 0, P, Q, R, B, C)
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
File "/sandbox/2/a.py", line 9, in qiwang
sha_expected, _ = qiwang(flowers - B, tiantian_flowers + 2 * C, P, Q, R, B, C)
[Previous line repeated 496 more times]
RecursionError: maximum recursion depth exceeded
Special Judge 信息
nan
系统信息
Exited with return code 1