Problem Statement: Chef has three spells. Their powers are A, B, and C respectively. Initially, Chef has 0 hit points, and if he uses a spell with power P, then his number of hit points increases by P Before going to sleep, Chef wants to use exactly two spells out…