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

建议使用的浏览器:

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

2649:A symmetrical sequence

题目描述
Most of the time ,we consider a symmetrical thing is beautiful.Now give you a sequence consisted of some integers . You are asked to use the least number of operations to make it symmetrical.
One operation can be:
1: add a number at the side of sequence.
2: insert a number into two continuous numbers.
3:delete a number.
4: change the value of a number.
输入解释
A line with a number n (1<=n<=3000) stands for the number of integers in a sequence.
then a line with n integers stand for the n integers one by one .
输出解释
For each case ,print the number of operations you need at least to make a symmetrical sequence.
输入样例
5
1 2 2 4 3
输出样例
2


hint 1 2 2 4 3 -- 1 2 2 2 3 -- 1 2 2 2 1
来自杭电HDUOJ的附加信息
Author dandelion
Recommend yifenfei

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

题目来源 曾是惊鸿照影来

源链接: HDU-2649

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

共提交 0

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