#P4832. 珈百璃堕落的开始
珈百璃堕落的开始
Description
The problem is as follows: given some expressions composed of and with , please find the maximum integer value you can obtain by selecting some of the expressions and summing them.
Input Format
The first line contains an integer , indicating expressions.
Each of the next lines contains a string formed by , and plus signs, with .
To simplify the input, we use s to represent , c to represent , and omit f(i)=.
Output Format
Output a single number representing the maximum integer answer. All operations are addition.
3
s+c
s+c+s
c
3
Hint
Sample Explanation:
- If you pick all three expressions, their sum equals .
Constraints:
- Let the total count of
sandcbe . - For of the testdata, .
- For another of the testdata, each line is a single-term expression.
- For another of the testdata, .
- For of the testdata, , .
Tips:
- .
Translated by ChatGPT 5
京公网安备 11011102002149号