登录
  • #刷题

表达‌‌‌‌‍‍‌‍‌‌‍‍‍‌‌‍‌‌‌‍‌‌‌‌‌‌‍‌‍‌‌‌式加括号使和最大

wwwyhx
2336
3
Give you a expression,you can add some parenthesis to maximize result.Example as following:

1 + 2 * 3 - 2

Its result is 7 in the example.But you can add a parenthesis like (1 + 2) * 3 - 2,then

the result is 7,and so it is the maximization of the example.You job is to find the maximization of a expression.

To simplify this problem,you can assume that expression contains only operator +, * and -, integers is none negative
3条回复
热度排序

发表回复