2014年8月24日

糖果传递

摘要: /** 题目:http://www.lydsy.com/JudgeOnline/problem.php?id=1045* 有n个小朋友坐成一圈,每人有ai个糖果。每人只能给左右两人传递糖果。每人每次传* 递一个糖果代价为1,求使所有人获得均等糖果的最小代价。** 分析:* 假设a1分给an的糖... 阅读全文

posted @ 2014-08-24 20:57 theCambrian.cpp 阅读(175) 评论(0) 推荐(0) 编辑

导航