PAT1045 Favorite Color Stripe (30分) 动态规划
PAT1045 Favorite Color Stripe (30分) 动态规划
|
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 together to form her favorite color stripe.
PAT1040 Longest Symmetric String (25分) 中心扩展法+动态规划
PAT1040 Longest Symmetric String (25分) 中心扩展法+动态规划
|
Given a string, you are supposed to output the length of the longest symmetric sub-string.