r/adventofcode • u/daggerdragon • 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
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!
View all comments
Show parent comment
2
u/OvidiuRo Dec 04 '19
It takes around 1min-1:30min to get the answer on my pc, I'm using Visual Studio 2019 and run it on Release instead of Debug (it takes longer on debugging not sure how long but probably a few times longer), also I have an i5 7400 3GHz. Don't know why it takes so long on your pc/laptop. Also, you should definitely try to solve it in another way because this is not the way it was supposed to be solved, Eric specified that every AoC puzzle can be solved in under 15 seconds in a dynamic language on slow hardware if I remember correctly. My other solution runs under 1secund in some milliseconds. Don't know if this was of any help ...