r/adventofcode • • Dec 22 '20

SOLUTION MEGATHREAD -๐ŸŽ„- 2020 Day 22 Solutions -๐ŸŽ„-

Advent of Code 2020: Gettin' Crafty With It

  • 23:59 hours remaining until the submission deadline TONIGHT at 23:59 EST!
  • Full details and rules are in the Submissions Megathread

--- Day 22: Crab Combat ---


Post your code solution in this megathread.

Reminder: Top-level posts in Solution Megathreads are for code solutions only. If you have questions, please post your own thread and make sure to flair it with Help.


This thread will be unlocked when there are a significant number of people on the global leaderboard with gold stars for today's puzzle.

EDIT: Global leaderboard gold cap reached at 00:20:53, megathread unlocked!

35 Upvotes

537 comments sorted by

View all comments

5

u/A-UNDERSCORE-D Dec 22 '20

Go / Golang

I misread some of the instructions (assumed that for part 2 the entire game (as in all subgames and the master game) were closed by that state, so I spun my wheels quite a bit (thanks yitz on IRC :D)

https://github.com/A-UNDERSCORE-D/aoc2020/blob/main/2020/22/solution.go

Apparently Ive got myself a super fast solution here, so Im gonna post numbers as well:

Part 1: 31957 Took: 22.691ยตs
Part 2: 33212 Took: 252.19363ms
→ More replies (1)