OpenJudge

2934:Inserting Something in Strings

总时间限制:
1000ms
内存限制:
65536kB
描述

There are two strings, named as “str” and “substr”. The number of characters in “str”is less than 10 and the number of characters in “substr” is 3.

The number of characters does not contain the ending ‘\0’.

We will insert “substr” into “str” after the character with the max ASCII code in“str”. 

We will insert at the firstmax-ASCII-code character if there are not only one.

输入
The input contains many lines, and each line is a test case in the form of:
str substr
输出
Output the results in each case.
样例输入
abcab eee
12343 555
样例输出
abceeeab
12345553
全局题号
1936
添加于
2009-10-29
提交次数
4772
尝试人数
1895
通过人数
1745

Other language verions

您的评价 很水 简单 一般 较难 变态
  • 标签(多个标签用空格分隔):
  • 常用标签:
    递归   动态规划   贪心   搜索   枚举   模拟   数学   字符串处理   几何   高精度计算   图论  

共有22人评分

9.1%
4.5%
4.5%
9.1%
72.7%