591 - Box of Bricks
Find the minimum number of moves to make all stacks of bricks the same height.
This is a simple ad-hoc problem. We first find the final height of the stacks of bricks by computing the average, then add up the difference between the average and the stacks higher than the average.
- Print a blank line after each set.
6 5 2 4 1 7 5 0
Set #1 The minimum number of moves is 5.
Categories here, use the form [[Category:UVa Online Judge|591]] [[Category: Category Name]], see Categories for a list