So I’ve gotten sick of fighting with WordPress in each post trying to nicely format my C++ code when I post, so I decided to start posting it to textuploader.com and providing links to the formatted and raw files. This will allow you to easily follow the link and copy-pasta the code if you want.

Here are links to previous Riddler posts and source code:

Secret Election: Post. Source.

River Crossing: Post. Source.

Neurotic Shooter: Post. Source.

Sadistic Salesman: Post. Source.

From now on, I’ll just take a picture of the relevant code for a post and post that, with a link to the raw code. Or something. It’s a work in progress.

### Like this:

Like Loading...

*Related*

Have you had any thoughts on Friday’s highway riddle? I think I’ve identified the answer (harmonic series sum up to 1/N) but I can’t figure out the proof exactly.

Hi, yeah, I’ve been working on it. I have an answer but not a proof, and I’m not sure I’ll get one. Each answer for average number of packs for n cars depends on the answer for n-1 cars. I’ve identified the pattern and I kind of know why, but a mathematical proof is beyond this programming nerd. Post coming soon.

Post is up, Alex. https://somedisagree.com/2016/02/06/the-538-riddler-traffic-jam/

I’m not real thrilled with this one tbh. I kind of just happened to see the pattern.