Skip to content

Instantly share code, notes, and snippets.

@hyperneutrino
Created December 10, 2020 05:26
Show Gist options
  • Save hyperneutrino/6b5397d109ecd541da7aade740e169e0 to your computer and use it in GitHub Desktop.
Save hyperneutrino/6b5397d109ecd541da7aade740e169e0 to your computer and use it in GitHub Desktop.
AOC 2020 10 2
a = lines(int)
a.sort()
a.append(max(a) + 3)
b = [0] * (max(a) + 1)
b[0] = 1
for i in a:
b[i] = gi(b, i - 1) + gi(b, i - 2) + gi(b, i - 3)
print(b[-1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment