3 ms·
For others looking for their past year results, check out the URL: https://adventofcode.com/2017/leaderboard/self https://adventofcode.com/2017/leaderboard/self
by loeg 8y ago
For others looking for their past year results, check out the URL: https://adventofcode.com/2017/leaderboard/self https://adventofcode.com/2017/leaderboard/self
Probably 15-20 minutes a day on average (edit: yep, my data from 2017 supports that), but with large spikes (and the average goes up towards the end of the month). (But I'm pretty quick — I was on the global leaderboard the last few years in a row.)
Edit: real numbers from 2017:
Excluding outliers and days I was absent at the start of the challenge: average 12.5 minutes for part 1 and 19.5 minutes for part 2.
Only excluding days where I was absent at the start of the challenge: average 16.25 minutes for part 1 and 23 minutes for part 2.
Edit2: 2016 was similar: 19-25 minutes excluding outliers, 23-35 minutes excluding days I missed the puzzle release by several hours.
If you're going for speed / leaderboard, Python is usually your best bet. Suggested libraries to be familiar with include:
stdlib: binascii, collections (especially defaultdict), fractions (gcd), itertools (combinations, combinations_with_replacement, permutations, product, izip, chain), md5, re, os/sys.
Non-std: networkx (graphs and shortest path), sympy (isprime()), numpy (efficient representation of large arrays).
It's useful to have a canned exhaustive tree search prepared (breadth/depth/"best"-first search).
You can use complex numbers to represent 2-dimensional coordinates and direction; turning the unit vector left and right involves multiplying by 1j and -1j, respectively, and movement is addition.
Oh, and sometimes pypy is faster enough that it can make a Python solution viable where otherwise it would have been too slow.