文件名称:huiwen
介绍说明--下载内容来自于网络,使用问题请自行百度
所谓回文就是从左向右读和从右向左读是一样的字符串。现在我们对任一字符串进行插入操作,使得新的字符串为回文格式。要求对给定字符串进行插入操作最少的次数。如Ab3bd,至少通过两次插入操作可以得到回文 ("dAb3bAd" or "Adb3bdA").
输入含有多个例子。每个例子两行,第一行为N,字符串长度,第二行为字符串。N<=1000。而字符串值含有26个大写字母和26个小写字母。输入以N=0为结束。
-The so-called palindrome is read from left to right and from right to left reading is the same string. Now we insert any string, making the new format string is a palindrome. Requirements for a given string into the least number of operations. If Ab3bd, at least through two operations can be inserted palindrome ("dAb3bAd" or "Adb3bdA").
Input contains several examples. Two lines of each case, the first act N, the string length, the second string behavior. N <= 1000. The string value contains 26 uppercase and 26 lowercase letters. Enter N = 0 to end.
输入含有多个例子。每个例子两行,第一行为N,字符串长度,第二行为字符串。N<=1000。而字符串值含有26个大写字母和26个小写字母。输入以N=0为结束。
-The so-called palindrome is read from left to right and from right to left reading is the same string. Now we insert any string, making the new format string is a palindrome. Requirements for a given string into the least number of operations. If Ab3bd, at least through two operations can be inserted palindrome ("dAb3bAd" or "Adb3bdA").
Input contains several examples. Two lines of each case, the first act N, the string length, the second string behavior. N <= 1000. The string value contains 26 uppercase and 26 lowercase letters. Enter N = 0 to end.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
huiwen.cpp
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.