The Acetone is not actually "dissolving" the Styrofoam. Here is what is happing. When styrofoam is placed in acetone, the long polymer strands are dissolved, releasing the trapped air and causing the structure to disintegrate. However, the insoluble crosslinked parts of the polymer keep the polystyrene from dissolving entirely, in much the same way as buoys on nets keep the entire net from sinking to the bottom of a lake. Once the acetone evaporates, you are left with a hard crosslinked polystyrene residue.