Starving makes your metabolic rate go into starvation mode..the minute you eat you gain, because you are now burning calories at a much lower rate.
A sensible diet with exercise will get your metabolic rate up and you lose weight..admittedly it will be slower..but it will stay off.