Switching to list<int> instead of my double linked list structure sped things up fast enough to pass the judge. I'm still not entirely sure how. Debug runtimes were in the 1600ms range far higher than my 300-400 times. However, retail fell down around the 30ms range. I never fully tested mine in retail so I don't know how they quite comared.

The new code is quite a bit more understandable (I think) because it doesn't inline a huge amount of list management code. It is more obscure in that it uses iterators to index the linked list.