
区间dp
Yyyy_H
弱鸡。
展开
-
Cheapest Palindrome(poj 3280)
题目大意:给出一个字符串,并给出其中每种字符的两种花费(添加一个该字符,删除一个该字符),问如果要把这个串变成回文串需要最小的花费是什么。思路:首先一个关键点是所谓的两种花费其实只有一种,因为对于串 abcb 无论是变成 bcb 还是 abcba 都是满足的,也就是说对于某个需要操作的字符,无论我们是删掉还是添加,效果都一样,所以对于给出的两种花费,只需要留更小的那个就行原创 2016-01-20 10:15:42 · 380 阅读 · 0 评论 -
Multiplication Puzzle (poj 1651)
Multiplication PuzzleTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 7947 Accepted: 4912DescriptionThe multiplication puzzle is played with a row of c原创 2016-01-20 14:50:38 · 408 阅读 · 0 评论 -
Running (poj 3661)
RunningTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 5728 Accepted: 2155DescriptionThe cows are trying to become better athletes, so Bessie is runni原创 2016-01-21 11:20:26 · 455 阅读 · 1 评论 -
Halloween Costumes (LightOJ 1422)
题意:原创 2016-01-22 14:46:54 · 1302 阅读 · 0 评论 -
Brackets Sequence (poj 1141)
C - Brackets SequenceTime Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit Status Practice POJ 1141Appoint description: System Crawler (2016-01-21)D原创 2016-01-24 20:34:29 · 472 阅读 · 0 评论 -
Brackets (poj 2955)
BracketsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 4890 Accepted: 2615DescriptionWe give the following inductive definition of a “regular brack原创 2016-01-25 19:51:02 · 578 阅读 · 0 评论 -
String painter (hdu 2476)
F - String painterTime Limit:2000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 2476Appoint description: System Crawler (2016-01-21)Desc原创 2016-01-26 20:29:29 · 663 阅读 · 0 评论