本博客rss订阅地址: http://feed.cnblogs.com/blog/u/147990/rss
摘要: 题目地址:hereThere areNgas stations along a circular route, where the amount of gas at stationiisgas[i].You have a car with an unlimited gas tank and it c... 阅读全文
posted @ 2013-10-26 19:59 tenos 阅读(2713) 评论(7) 推荐(0) 编辑
摘要: 题目地址:here题目大意:几个小孩站一排,每个小孩有个等级值,现在给小孩发糖,发的时候要遵守2个规则:(1)每个小孩至少一颗糖(2)两个相邻的小孩中,等级大的小孩一定比等级小的小孩糖多,求发糖的数目的最小值。本文提供两个算法,第一个是我自己做题时用的,第二个是网上看题解时看到的算法1:该算法采用分... 阅读全文
posted @ 2013-10-26 14:55 tenos 阅读(6158) 评论(3) 推荐(1) 编辑

本博客rss订阅地址: http://feed.cnblogs.com/blog/u/147990/rss

公益页面-寻找遗失儿童