![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
区间dp
文章平均质量分 78
闻道-问道
这个作者很懒,什么都没留下…
展开
-
#1149 : 回文字符序列(区间dp)
描述给定字符串,求它的回文子序列个数。回文子序列反转字符顺序后仍然与原序列相同。例如字符串aba中,回文子序列为"a", "a", "aa", "b", "aba",共5个。内容相同位置不同的子序列算不同的子序列。输入第一行一个整数T,表示数据组数。之后是T组数据,每组数据为一行字符串。输出对于每组数据输出一行,格式为"Case #X: Y",X代表数据编号(从1开始),Y为答案。答案对1原创 2018-03-15 23:48:03 · 273 阅读 · 0 评论 -
D. XOR-pyramid(区间dp)
D. XOR-pyramidtime limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputFor an array bb of length mm we define the function ff asf(b)={b[1]if m=1f(b[1]⊕b[2]...原创 2018-05-21 21:08:24 · 271 阅读 · 0 评论 -
Racing Car Computer (区间dp)
The racing cars of today are equipped with so many sophisticated equipment. Introduction of a newvisual transducer which is interfaced with the on-board computer can tell you on the fly how manycars a...原创 2018-06-05 11:13:42 · 228 阅读 · 0 评论 -
String painter (区间dp+简单dp)
There are two strings A and B with equal length. Both strings are made up of lower case letters.Now you have a powerful string painter. With the help of the painter, you can change a segment ofcharact...原创 2018-06-12 11:26:40 · 456 阅读 · 1 评论 -
小小粉刷匠(区间dp)
题目描述 "lalala,我是一个快乐的粉刷匠",小名一边快活地唱着歌,一边开心地刷着墙",兴致突然被打断,"小名,你今天如果刷不完这一栋楼的墙,那么你就等着被炒鱿鱼吧",老板声嘶力竭的吼着。苦恼的小名因为不想被炒鱿鱼,所以希望尽量快地刷完墙,由于他本人的数学基础很差,他现在请你来帮助他计算最少完成每一堵墙需要刷多少次。每一面墙有n个段,对于每个段指定一个目标颜色ci。刚开始的时候所有的墙壁为白色...原创 2018-06-12 11:37:23 · 563 阅读 · 0 评论 -
The Poor Giant (区间dp)
On a table, there are n apples, the i-th apple has the weight k + i (1 ≤ i ≤ n). Exactly one of theapples is sweet, lighter apples are all bitter, while heavier apples are all sour. The giant wants to...原创 2018-05-30 21:42:27 · 155 阅读 · 0 评论 -
Game of Sum (区间dp)
This is a two player game. Initially there are n integer numbers in an array and players A and B getchance to take them alternatively. Each player can take one or more numbers from the left or right e...原创 2018-05-31 22:07:01 · 254 阅读 · 0 评论