bit mask dp