-
2009-03-02
你会让我们自卑的||| - [B.T]
版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明
http://yesilver.blogbuss.com/logs/35961161.html
String concatenation
Write a program that will accept two strings (1 <= length <= 50) and output the sequence of the first string converting to the second string, such that each conversion only add/modify/delete one character. In case more than one such conversion sequence is possible, print the one sequence that contains the shortest steps.Input specification:
Two strings separated by space on a single line.Output Specification:
The sequence of conversion steps, each in a separate line.Examples:
Input:
abcd afgdOutput:
abcd
afcd
afgdInput:
efgh cdefOutput:
efgh
efg
ef
def
cdefInput:
abcdefg bdfOutput:
abcdefg
bcdefg
bdefg
bdfg
bdf{今晚十二点前}
听起来像一个赌注。
随机文章:
爱你不是因为你爱我 2009-03-10我要变漂亮>__< 2009-02-25puppy love 2009-02-25Oh,origin。 2009-02-23Restart . 简单 2009-02-22
收藏到:Del.icio.us
<< phone call | 首页 |