string
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.
string
题目描述
给定 个由X 和数字构成的字符串,你需要对其进行排列并拼接成新的字符串 以最大化其分数。定义其分数为对于字符串中每一个数字,使数字对应的数值乘上其之前X 的数量,并求和。
输出分数最大值。
输入格式
...
输出格式
输出答案
样例
3
1X3
59
XXX
71
10
X63X395XX
X2XX3X22X
13
3716XXX6
45X
X6XX
9238
281X92
1XX4X4XX6
54X9X711X1
3010
数据范围与提示
- 只包括 的数字或
- 长度和不超过
0226B
- Status
- Done
- Rule
- IOI
- Problem
- 4
- Start at
- 2026-2-26 8:00
- End at
- 2026-2-26 11:39
- Duration
- 3.7 hour(s)
- Host
- Partic.
- 80