题目链接:10453 - Make Palindrome 题目大意:给出一个字符串,通过插入字符使得原字符串变成一个回文串,要求插入的字符个数最小,并且输出最后生成的回文串. 解题思路:和uva 10739的做法相似,只是本题只能插入字符,所以只要在考虑子问题的同时记录住最优的选择就可以了. #include <stdio.h> #include <string.h> const int N = 1005; int n, dp[N][N], rec[N][N]; char str[…
Problem H String to Palindrome Input: Standard Input Output: Standard Output Time Limit: 1 Second In this problem you are asked to convert a string into a palindrome with minimum number of operations. The operations are described below: Here you’d ha…