What kind of diet has an effect in the brain that is similar to eating a balanced meal?

eating sugary foods once in a while.
Eating sugary foods all of the time.
Eating only processed foods.
Eating about 4 sugar cubes before each meals.