摘要: 题目链接A.Snow FootprintsA - Snow FootprintsThe starting position can be anywhere with a footprint. The footprints can be categorized into 3 types.onlyLsonlyRsRs followed byLsIn case 1, we end in the left of all footprints. In case 2, we end in the right of all footprints. In case 3, we either end in th 阅读全文
posted @ 2013-04-19 22:20 xindoo 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 其实根本就谈不上详解,应该说只是随便谈谈,真正能详解动态规划的又有几个人,所以,这个标题略显扯淡。 前段时间一直在做关于数据结构的题,也算是对数据结构有了一定的了解,知道了有些数据结构的基本算法。现在刚刚开始接触动态规划,其实写这篇文章的初衷是一来锻炼一下自己的总结能力,二来也是希望通过这篇文章,来指引和我一样的初学者,废话不多说了,开始吧。一、01背包 我最开始接触的有关动态规划的是01背包,这应该也是动态规划入门最好的了吧。 01背包是很简单的问题,当然也不乏一些变种让你绞尽脑汁也想不到,这里我们不讨论那些,我只说最简单的。 假设有n种物品,每种都只有一个,第i种物品的体... 阅读全文
posted @ 2013-04-19 22:19 xindoo 阅读(340) 评论(0) 推荐(0) 编辑
摘要: 1015 Jury Compromise1029 False coin1036 Gangsters1037 A decorative fence1038 Bugs Integrated, Inc.1042 Gone Fishing1050 To the Max 解题报告1062 昂贵的聘礼1074 Parallel Expectations1080 Human Gene Functions1088 滑雪解题报告1093 Formatting Text1112 Team Them Up!1141 Bracket... 阅读全文
posted @ 2013-04-19 09:45 xindoo 阅读(148) 评论(0) 推荐(0) 编辑