|  | 
|  | 
| back to board | I think the right algorithm for this problem is DP... 0-1 Knapsack, O(sum*n)...For the week data, I haven't got TLE...Re: I think the right algorithm for this problem is DP... Posted by AterLux  11 May 2011 13:12With 20 stones it can be solved with simple brute-force | 
 | 
|