Hard dp

STANDARD - 205   GOLD - 283