Computer Programming Contest Preparation

ToolBox - Source for: 100/10003/a.txt



/home/toolbox/public_html/solutions/100/10003/a.txt
    1 10 -- 2 4 7
    2 
    3 10 2 4 7
    4 10 8 6 = 24
    5 
    6 10  7 4 2
    7 10  7 4 = 21
    8 
    9 10 4 2 
   10 10 4 6 = 20
   11 
   12 
   13 100
   14 3
   15 25 50 75
   16 
   17 100  25  50  75
   18     100  75  50 = 225
   19 
   20 100 50 25 75
   21    100 50 50 = 200
   22 
   23 
   24 10
   25 4
   26 4 5 7 8
   27 
   28 10  4  5  7  8
   29    10  6  5  4 = 25
   30 
   31 10  5  4  8  7
   32    10  5  5  2 = 22
   33 
   34 10  5  4  7  8
   35    10  5  5  4
   36 
   37 10
   38 7
   39 1  2  3  4  5  6  7
   40 10 9  8  7  6  5  4 = 49
   41 
   42 7  6  5  4  3  2  1
   43 10 7  6  5  4  3  2 = 37
   44 
   45 4  2  1  3  6  5  7
   46 10 4  2  2  6  2  4 = 30
   47 
   48 4  2  1  3  7  6  5
   49 10 4  2  2  6  3  2 = 29
   50 
   51 algorithm: break in half unless waste is more than a half
   52 
   53 0
   54