
DP动态规划
julia7_
keep coding
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
5. Longest Palindromic Substring [Medium] 最长回文子串(Manacher不懂)
Given a strings, find the longest palindromic substring ins. You may assume that the maximum length ofsis 1000.给定一个字符串s,找到s中最长的回文子串。你可以假设s的最大长度为 1000。Example 1:Input: "babad"Output: "...转载 2020-02-07 18:48:18 · 166 阅读 · 0 评论 -
A1007 Maximum Subsequence Sum (25 分)(最大连续子序列和)(DP问题)
Given a sequence ofKintegers {N1,N2, ...,NK}. A continuous subsequence is defined to be {Ni,Ni+1, ...,Nj} where1≤i≤j≤K. The Maximum Subsequence is the continuous subsequen...原创 2019-02-27 16:26:23 · 189 阅读 · 0 评论 -
A1045 Favorite Color Stripe (30 分)(最长不下降子序列问题)(DP)
Eva is trying to make her own color stripe out of a given one. She would like to keep only her favorite colors in her favorite order by cutting off those unwanted pieces and sewing the remaining parts...原创 2019-02-27 17:45:41 · 236 阅读 · 0 评论 -
A1040 Longest Symmetric String (25 分)(最长回文子串)(DP)
Given a string, you are supposed to output the length of the longest symmetric sub-string. For example, givenIs PAT&TAP symmetric?, the longest symmetric sub-string iss PAT&TAP s, hence you ...原创 2019-02-28 18:33:10 · 180 阅读 · 0 评论 -
A1068 Find More Coins (30 分)(01背包问题)(难)
1068Find More Coins(30 分)Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which could accept all kinds o...原创 2019-03-01 12:08:03 · 355 阅读 · 0 评论