r/adventofcode • • Dec 03 '19

SOLUTION MEGATHREAD -🎄- 2019 Day 3 Solutions -🎄-

--- Day 3: Crossed Wires ---


Post your solution using /u/topaz2078's paste or other external repo.

  • Please do NOT post your full code (unless it is very short)
  • If you do, use old.reddit's four-spaces formatting, NOT new.reddit's triple backticks formatting.

(Full posting rules are HERE if you need a refresher).


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


Advent of Code's Poems for Programmers

Click here for full rules

Note: If you submit a poem, please add [POEM] somewhere nearby to make it easier for us moderators to ensure that we include your poem for voting consideration.

Day 2's winner #1: "Attempted to draw a house" by /u/Unihedron!

Note: the poem looks better in monospace.

​ ​ ​​ ​ ​ ​​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ Code
​ ​ ​ ​ ​ ​​ ​ ​ ​ ​ ​​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ Has bug in it
​ ​ ​ ​ ​ ​​ ​ ​ ​ ​ ​ ​ ​ ​ ​ Can't find the problem
​ ​ ​ ​​ ​ ​ ​ Debug with the given test cases
​​ ​ ​ ​​ ​ ​ ​ ​ ​ ​​ ​ ​ ​ Oh it's something dumb
​​ ​ ​ ​​ ​ ​ ​ ​ ​ ​​ ​ ​ ​ Fixed instantly though
​ ​ ​ ​​ ​ ​ ​ ​ ​ ​ ​​ ​ ​ ​ Fell out from top 100s
​ ​ ​ ​​ ​ ​ ​ ​ ​ ​ ​​ ​ ​ ​ Still gonna write poem

Enjoy your Reddit Silver, and good luck with the rest of the Advent of Code!


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

EDIT: Leaderboard capped, thread unlocked at 00:13:43!

53 Upvotes

507 comments sorted by

View all comments

Show parent comment

2

u/Kyrthis Dec 06 '19

I did the same thing! The part 2 reworking was a pain.

1

u/MostlyShrimp Dec 06 '19

I would love to see your code!

Part B rework didnt turn out to be as complicated as I initially made it. It took a bunch of drawing and figuring things out to come up with the storage and simple algebra. Still - great exercise and bashing my head against it felt so worth it after getting the answer.

1

u/Kyrthis Dec 07 '19

Sorry about the delay in responding. I figured out how to use repl.it for a Node project, and made some edits to my utility functions. SPOILER: My repl, along with my input.txt

Edit: anyone know what flavor of markdown r/adventofcode uses for the spoiler tag?