SPOJ: PARTY
Also implemented a similar problem on my own: 0-1 Knapsack problem.