Union Training II - Dynamic Programming

E: GoozyĻľ