Advertisement
Guest User

Untitled

a guest
Oct 9th, 2015
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.26 KB | None | 0 0
  1. private int totalElement = 4;
  2.     private int[][] subsets = {
  3.                     { 1,3 },
  4.                     { 3,4 },
  5.                     { 2,1,4 },
  6.                     { 1,2,3 }
  7.                 };
  8. //weight is sum of the numbers in that set
  9. //output
  10. ==LP==
  11. ids = 1 2 3
  12. Weight 20
  13. ==Bitmask DP ==
  14. Weight 11
  15. ids = [0, 2]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement