First-Ever CS50x Coding Contest

David J. Malan

Each year, CS50 starts with CS50 Puzzle Day (an afternoon of pizza, puzzles, and prizes) and ends with the CS50 Hackathon (an epic all-nighter) and the CS50 Fair (an epic display of final projects). I’m only now realizing that we only describe two out of the three as epic for some reason. Was too focused on the alliteration perhaps.

This fall, we thought we’d (try to!) introduce a new tradition into CS50, this one mid-semester, an opportunity for students to compete (playfully and optionally) against classmates after just a few weeks of C under their belts. Thus was born another alliteration, a CS50 Coding Contest, an amalgam of CS50 Puzzle Day’s format and Problem Set 5’s Big Board, not unlike other such programming competitions.

Rather than reinvent a wheel, we selected HackerRank for our own contest’s platform, on which our (new!) friends at HackerRank kindly installed CS50's own library. Turns out HackerRank sometimes uses CRLF (\r

) for line endings in test inputs, rather than just LF (

), so we actually first added support to GetString for that too!

We decided to pilot the vision this summer via the first-ever CS50x Coding Contest for students online, an “epic weekend of code” during which students had 72 hours (Friday through Sunday) to tackle, on teams of size 1 – 4, a set of 10 challenges: 3 easy, 4 medium, and 3 hard. Though our friends at HackerRank kindly added a new feature to the platform itself so that we could hide those ratings, lest students less comfortable be discouraged by mere labels.

Thanks to CS50's production team, here’s the invitation that went out:

And these were the challenges, thanks to CS50's own Colton Ogden, Doug Lloyd, Kareem Zidane, and Glenn Holloway who readied the event:

By weekend’s end, 659 teams from 89 countries had submitted solutions, with these 10 countries fielding the most teams:

And here are the 12 winning teams, all of whom solved all 10 challenges!

They’ll each be receiving a little something by mail from CS50!

Ready for the challenges’ postmortems? Spoilers ahead!