Type: Default 1000ms 256MiB

宝箱

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

在一个奇幻的游戏中,佩奇有两个神秘的宝箱,宝箱AA和宝箱BB。每个宝箱都有一定的大小,宝箱AA的大小为AA,宝箱BB的大小为BB

当佩奇打开一个大小为XX的宝箱时,会获得XX个金币,并且宝箱的大小会减少11

佩奇需要做出选择,他可以连续打开同一个宝箱两次,或者分别打开两个宝箱各一次。

佩奇的目标是最大化她获得的金币数量。

她需要决定如何打开这两个宝箱,以获得最多的金币。

输入

输入两个整数A,BA,B

输出

输出可以获得的最大硬币数量

5 3
9

样例解释

通过两次按下大小为55的按钮,佩奇可以得到5+4=95+4=9个硬币,这是最大的结果

3 4
7
6 6
12

提示

3A,B20 3 \leq A,B \leq 20

粒子2024年12月下半月月赛

Not Attended
Status
Done
Rule
IOI
Problem
4
Start at
2024-12-15 0:00
End at
2024-12-31 16:00
Duration
2 hour(s)
Host
Partic.
16