help.. totally no idea on how to make it...

Light Poster
7Oct2010,21:31   #1
cire09's Avatar
Problem:
suppose you are given 100 gold coins labeled w/ numbers 1 through n. Coin n has weight and worth that is sqrroot(n). Given one minute if computation, how close can you come to dividing the 100 coins into piles of 50 coins each of nearly equal weight. The output should be a difference in the weight, followed by a list of the 50 labels of coins on one side of
the scale.


PLS help me...this is the case study that is given to me but i totally suck in memorizing formulas in mathematics.. thats why i dont know how to make this one...
Skilled contributor
16Oct2010,11:31   #2
ManzZup's Avatar
you can get two boundaries
assign to array and sort ascending for a start
then take the value at 49 as the boundary line
so you can keep adding the numbers > or < the boundary