How to solve this knapsack problem


#1

How can i solve scuba dive question of SPOJ


#2

its bascially a 3d knapsack .