Union Training II - Dynamic Programming

F: 先锋看烟花