摘要: There areNchildren standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following requirements:Each child must have at least one candy.Children with a higher rating get more candies than their neighbors.What is the minimum candies you mu 阅读全文
posted @ 2014-03-22 21:09 xchangcheng 阅读(547) 评论(0) 推荐(0) 编辑