摘要: 注意先保证距离最短,再来判断价格 邻接矩阵回朝内存 ,要用邻接表的 阅读全文
posted @ 2018-08-20 23:13 踩在浪花上 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 要判断是否有负的权值 阅读全文
posted @ 2018-08-20 23:13 踩在浪花上 阅读(96) 评论(0) 推荐(0) 编辑
摘要: Language: Default Silver Cow Party Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 29299 Accepted: 13309 Description One cow from each of N 阅读全文
posted @ 2018-08-20 23:11 踩在浪花上 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 题目大意:蚂蚁牙黑,蚂蚁牙红:有A只蚂蚁,来自T个家族,分别记为ant[i]个。同一个家族的蚂蚁长得一样,但是不同家族的蚂蚁牙齿颜色不同。任取n只蚂蚁(S <= n <= B),求能组成几种集合? 状态:dp[i][j]:前i种中选j个可以组成的种数 决策:第i种选k个,k<=ant[i] && j 阅读全文
posted @ 2018-08-20 23:08 踩在浪花上 阅读(412) 评论(0) 推荐(0) 编辑
摘要: 算是数位dp的入门吧 求n到m之间数字中没有4和62(连着)的个数 阅读全文
posted @ 2018-08-20 23:07 踩在浪花上 阅读(104) 评论(0) 推荐(0) 编辑
摘要: Language: Default Cheapest Palindrome Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 12865 Accepted: 6107 Description Keeping track of all 阅读全文
posted @ 2018-08-20 23:01 踩在浪花上 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 一个人可以走一步或者跳x步,但不能连着跳,问到这个区间里有几种走法 考虑两种状态 对于这一点,我可以走过来,前面是怎么样的我不用管,也可以跳过来但是,跳过来必须保证前一步是走的 dp[i][0]表示i这一步是走过来的dp[i][1]表示i这一步是跳过来的 阅读全文
posted @ 2018-08-20 22:45 踩在浪花上 阅读(140) 评论(0) 推荐(0) 编辑
摘要: Language: Default Milking Time Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 13855 Accepted: 5851 Description Bessie is such a hard-worki 阅读全文
posted @ 2018-08-20 22:44 踩在浪花上 阅读(129) 评论(0) 推荐(0) 编辑
摘要: Apple Catching Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 15231 Accepted: 7465 Description It is a little known fact that cows love ap 阅读全文
posted @ 2018-08-20 20:26 踩在浪花上 阅读(126) 评论(0) 推荐(0) 编辑
摘要: Description Farmer John commanded his cows to search for different sets of numbers that sum to a given number. The cows use only numbers that are an i 阅读全文
posted @ 2018-08-20 20:23 踩在浪花上 阅读(124) 评论(0) 推荐(0) 编辑
摘要: Language: Default Cow Bowling Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 22568 Accepted: 14886 Description The cows don't use actual b 阅读全文
posted @ 2018-08-20 20:20 踩在浪花上 阅读(98) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/Kalix/p/7617856.html 01背包问题 https://www.cnblogs.com/Kalix/p/7622102.html 完全背包问题 https://blog.csdn.net/mystery_guest/article/det 阅读全文
posted @ 2018-08-20 20:16 踩在浪花上 阅读(174) 评论(0) 推荐(0) 编辑