SPOJ 3321: Knapsack Problem
SPOJ 685: Partition the sequence