Add template for fractional knapsack.