Union Training II - Dynamic Programming

H: 又见背包