贪心算法
乐清sss
立志成为大师的萌妹子!
展开
-
Graveyard,NEEEC 2006,LA 3708
在一个周长为10000的圆上等距分布着n个雕塑。现在又有m个新雕塑加入(位置可以随意放),希望所有n+m个雕塑在圆周上均匀分布。这就需要移动其中一些原有的雕塑。要求n个雕塑移动的总距离尽量小。【输入格式】输入包含若干组数据。每组数据仅一行,包含两个整数n和m(2≤n≤1 000,1≤m ≤1 000),即原始的雕塑数量和新加的雕塑数量。输入结束标志为文件结束符(EOF)。【输出格式】输入仅一行,为最原创 2017-08-02 22:37:56 · 318 阅读 · 0 评论 -
Spreading the Wealth,UVa 11300
【题目】 A Communist regime is trying to redistribute wealth in a village. They have have decided to sit everyone around a circular table. First, everyone has converted all of their properties to coins of原创 2017-08-02 21:05:33 · 227 阅读 · 0 评论 -
Commando War ,UVa 11729
【题目】 There is a war and it doesn’t look very promising for your country. Now it’s time to act. You have a commando squad at your disposal and planning an ambush on an important enemy camp located nea原创 2017-08-02 16:59:23 · 254 阅读 · 0 评论 -
The Dragon of Loowater,UVa 11292
【题目】 Once upon a time, in the Kingdom of Loowater, a minor nuisance turned into a major problem. The shores of Rellau Creek in central Loowater had always been a prime breeding ground for geese. Due t原创 2017-08-02 09:34:03 · 316 阅读 · 0 评论 -
【codeforces - 651A】
Problem Description Friends are going to play console. They have two joysticks and only one charger for them. Initially first joystick is charged at a1 percent and second one is charged at a2 percent.原创 2017-07-31 22:48:30 · 280 阅读 · 0 评论