Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private int totalElement = 4;
- private int[][] subsets = {
- { 1,3 },
- { 3,4 },
- { 2,1,4 },
- { 1,2,3 }
- };
- //weight is sum of the numbers in that set
- //output
- ==LP==
- ids = 1 2 3
- Weight 20
- ==Bitmask DP ==
- Weight 11
- ids = [0, 2]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement