当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

1511:Increasing Sequences

题目描述
Given a string of digits, insert commas to create a sequence of strictly increasing numbers so as to minimize the magnitude of the last number. For this problem, leading zeros are allowed in front of a number.
输入解释
Input will consist of multiple test cases. Each case will consist of one line, containing a string of digits of maximum length 80. A line consisting of a single 0 terminates input.
输出解释
For each instance, output the comma separated strictly increasing sequence, with no spaces between commas or numbers. If there are several such sequences, pick the one which has the largest first value; if there’s a tie, the largest second number, etc.
输入样例
3456
3546
3526
0001
100000101
0
输出样例
3,4,5,6
35,46
3,5,26
0001
100,000101
来自杭电HDUOJ的附加信息
Recommend xhd

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-1511

最后修改于 2020-10-25T22:45:36+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 65536/32768K(Java/Others)