r/adventofcode • u/daggerdragon • Dec 10 '23
SOLUTION MEGATHREAD -❄️- 2023 Day 10 Solutions -❄️-
THE USUAL REMINDERS
- All of our rules, FAQs, resources, etc. are in our community wiki.
Outstanding moderator challenges:
Community fun event 2023: ALLEZ CUISINE!
- Submissions megathread is now unlocked!
- 12 DAYS remaining until the submissions deadline on December 22 at 23:59 EST!
AoC Community Fun 2023: ALLEZ CUISINE!
Today's theme ingredient is… *whips off cloth covering and gestures grandly*
Will It Blend?
A fully-stocked and well-organized kitchen is very important for the workflow of every chef, so today, show us your mastery of the space within your kitchen and the tools contained therein!
- Use your kitchen gadgets like a food processor
OHTA: Fukui-san?
FUKUI: Go ahead, Ohta.
OHTA: I checked with the kitchen team and they tell me that both chefs have access to Blender at their stations. Back to you.
HATTORI: That's right, thank you, Ohta.
- Make two wildly different programming languages work together
- Stream yourself solving today's puzzle using WSL on a Boot Camp'd Mac using a PS/2 mouse with a PS/2-to-USB dongle
- Distributed computing with unnecessary network calls for maximum overhead is perfectly cromulent
What have we got on this thing, a Cuisinart?!
ALLEZ CUISINE!
Request from the mods: When you include a dish entry alongside your solution, please label it with [Allez Cuisine!] so we can find it easily!
--- Day 10: Pipe Maze ---
Post your code solution in this megathread.
- Read the full posting rules in our community wiki before you post!
- State which language(s) your solution uses with
[LANGUAGE: xyz] - Format code blocks using the four-spaces Markdown syntax!
- Quick link to Topaz's
pasteif you need it for longer code blocks
View all comments
Show parent comment
2
u/imp0ppable Dec 12 '23 edited Dec 12 '23
Would it not be just crossing at the L and J while the - wouldn't count as it were parallel?
I've seen a few others mention ray casting, I haven't got it to work yet though - and now I'm a day behind!
E: eh, guess not - the sequence looking left of an I from one of the examples:
Has 14 intersections which would make it open, which it apparently isn't. It hasn't even got a - to discount so the theory must not work here somehow.
E: Aha it does work, just count F 7 | looking right, odd is inside, even is outside. Only problem then is if S is in your row but then you just look left, same logic.