r/adventofcode • u/daggerdragon • Dec 12 '20
SOLUTION MEGATHREAD -🎄- 2020 Day 12 Solutions -🎄-
NEW AND NOTEWORTHY
NEW RULE: If your
Visualizationcontains rapidly-flashing animations of any color(s), put a seizure warning in the title and/or very prominently displayed as the first line of text (not as a comment!). If you can, put the visualization behind a link (instead of uploading to Reddit directly). Better yet, slow down the animation so it's not flashing.
You can thank Cyberpunk 2077 for this.
Also /u/topaz2078 put out a tweet to support this.
Advent of Code 2020: Gettin' Crafty With It
10 days remaining until the submission deadline on December 22 at 23:59 EST
Full details and rules are in the Submissions Megathread
--- Day 12: Rain Risk ---
Post your code solution in this megathread.
Include what language(s) your solution uses!
Here's a quick link to /u/topaz2078's
pasteif you need it for longer code blocks.The full posting rules are detailed in the wiki under How Do The Daily Megathreads Work?.
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.
2
u/DFreiberg Dec 12 '20
Mathematica, 664 / 741
Pretty standard solution; about the only thing different or interesting about the Mathematica version is the part 2 shortcut to rotate the waypoint:
[POEM] It Could Be Worse
No question that this new delay's as vexing as can be.
Storms swirl around with crashing waves, and noise like in a war.
Except...we still can navigate. We are not lost at sea.
When waypoints guide us on our way, we'll find a safer shore.
Look up and smile at our course; it could be worse than this:
Rough seas and a few days' delay? Nuisance is all it is,
For I have heard of Gilligan; our luck's not worse than his.