Tag - subset sum problem dynamic programming