Unable to load image

rDrama Advent of Code Day 18: Network Engineering Edition

Summary for those just joining us:

Advent of Code is an annual Christmas themed coding challenge that runs from December 1st until christmas. Each day the coding problems get progressively harder. We have a leaderboard and pretty good turnout, so feel free to hop in at any time and show your stuff!

Whether you have a single line monstrosity or a beautiful phone book sized stack of OOP code, you can export it in a nice little image for sharing at https://carbon.vercel.app

What did you think about today's problem?

https://adventofcode.com/2023

Our Code is 2416137-393b284c (No need to share your profile, you have the option to join anonymously if you don't want us to see your github)

36
Jump in the discussion.

No email address required.

can someone please explain to me how to get the friggen area ??

https://i.rdrama.net/images/1702915550489999.webp

This may be like the 3rd or 2nd time I've hit a brick wall for these puzzles because idfk how to get the area.

I have it so I get a padding on all four edges bcuz I thought it would help me somehow but I can't wrap my head around how to do this with just if and for loops.

Jump in the discussion.

No email address required.

Jump in the discussion.

No email address required.

Never heard of this, neato

Jump in the discussion.

No email address required.

I'll try understanding this.

I guess what I really want to know, is how can I check to see whether an arbitrary point A and B situated within the enclosure is unobstructed.

e: or alternatively, if the paint bucket tool was used on the enclosure, or if the enclosure were filled with a pixel-like liquid.

e: if I start from a known outside and given that the only consecutive #'s are horizontal, I can verify that I am inside of the loop by shooting a beam until I get a # immediately followed by a . as when it's a vertical, and I'd be on the inside of the enclosure.

Jump in the discussion.

No email address required.

Once you know the area, the answer easily follows from https://en.wikipedia.org/wiki/Pick%27s_theorem

Jump in the discussion.

No email address required.

Link copied to clipboard
Action successful!
Error, please refresh the page and try again.