动态规划dp
文章平均质量分 53
小雪乃
这个作者很懒,什么都没留下…
展开
-
poj 1088 滑雪
滑雪Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 96265 Accepted: 36509DescriptionMichael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等转载 2017-04-12 14:24:24 · 168 阅读 · 0 评论 -
PAT 甲级 1007. Maximum Subsequence Sum (25)
Given a sequence of K integers { N1, N2, ..., NK }. A continuous subsequence is defined to be { Ni, Ni+1, ..., Nj } where 1 Maximum Subsequence is the continuous subsequence which has the largest su原创 2017-09-18 15:40:23 · 326 阅读 · 0 评论 -
PAT 甲级 1040. Longest Symmetric String (25)
Given a string, you are supposed to output the length of the longest symmetric sub-string. For example, given "Is PAT&TAP symmetric?", the longest symmetric sub-string is "s PAT&TAP s", hence you must原创 2017-09-28 10:37:15 · 147 阅读 · 0 评论 -
PAT 甲级 1045. 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原创 2017-09-29 16:40:44 · 169 阅读 · 0 评论 -
PAT 甲级 1068. Find 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 of coins as payments. However,原创 2017-10-02 12:00:13 · 151 阅读 · 0 评论 -
蓝桥杯 算法提高 01背包
问题描述 给定N个物品,每个物品有一个重量W和一个价值V.你有一个能装M重量的背包.问怎么装使得所装价值最大.每个物品只有一个. 输入格式 输入的第一行包含两个整数n, m,分别表示物品的个数和背包能装重量。 以后N行每行两个数Wi和Vi,表示物品的重量和价值 输出格式 输出1行,包含一个整数,表示最大价值。 样例输入 3 5 2 3 3 5 4 7 样例输出原创 2017-12-18 22:48:39 · 310 阅读 · 0 评论 -
蓝桥杯 算法提高 拿糖果
问题描述 妈妈给小B买了N块糖!但是她不允许小B直接吃掉。 假设当前有M块糖,小B每次可以拿P块糖,其中P是M的一个不大于根号下M的质因数。这时,妈妈就会在小B拿了P块糖以后再从糖堆里拿走P块糖。然后小B就可以接着拿糖。 现在小B希望知道最多可以拿多少糖。 输入格式 一个整数N 输出格式 最多可以拿多少糖 样例输入 15 样例输出 6 数据规模和约定原创 2017-12-19 17:11:06 · 210 阅读 · 0 评论