You start from scratch.
At least that's what I've been following for the numerous hackathons I've attended/won/lost.
Of course no one's going to check if you worked on it last night or whatnot (I know friends who've taken previous hackathon submissions and submit it to hackathons like it's new and actually won) but for the hackathon spirit you shouldn't.
That's the officiallyunofficial rule at all the hackathons I've been to, but also at every hackathon I've been to, the biggest prize winners were teams that were coming in with something they'd obviously been planning and working on for at least a couple weeks ramping up to the hackathon.
I imagine with a ycombinator interview on the line that sort of behavior will only be more prevalent.
Of course no one's going to check if you worked on it last night or whatnot (I know friends who've taken previous hackathon submissions and submit it to hackathons like it's new and actually won) but for the hackathon spirit you shouldn't.