DP: Variation of Knapsack problem called Alan and Bob