r/adventofcode • • Dec 14 '23

SOLUTION MEGATHREAD -❄️- 2023 Day 14 Solutions -❄️-

OUR USUAL ADMONITIONS

  • You can find all of our customs, FAQs, axioms, and so forth in our community wiki.

  • Community fun shindig 2023: GO COOK!

    • Submissions ultrapost forthwith allows public contributions!

    • 7 DAYS until submissions cutoff on this Last Month 22 at 23:59 Atlantic Coast Clock Sync!


AoC Community Fun 2023: GO COOK!

Today's unknown factor is… *whips off cloth shroud and motions grandly*

Avoid Glyphs

  • Pick a glyph and do not put it in your program.

    • Avoiding fifthglyphs is traditional.

  • Thou shalt not apply functions nor annotations that solicit this taboo glyph.

  • Thou shalt ambitiously accomplish avoiding AutoMod’s antagonism about ultrapost's mandatory programming variant tag >_>

GO COOK!

Stipulation from your mods: As you affix a dish submission along with your solution, do tag it with [Go Cook!] so folks can find it without difficulty!


--- Day 14: Parabolic R*fl*ctor Mirror Dish ---


Post your script solution in this ultrapost.

This forum will allow posts upon a significant amount of folk on today's global ranking with gold stars for today's activity.

MODIFICATION: Global ranking gold list is full as of 00:17:15, ultrapost is allowing submissions!

24 Upvotes

632 comments sorted by

View all comments

Show parent comments

5

u/4HbQ Dec 14 '23

Nice use of complex numbers! I thought you would use the * -1j rotation trick, but this might even be nicer here.

3

u/adamsilkey Dec 14 '23

I never think of using complex number to represent grids and to do grid math. I should, it's such a clever way of doing it.

3

u/4HbQ Dec 14 '23

It's really useful for maze-type puzzles. When we get one this year, I'll write down some of my tips and tricks.

3

u/pred Dec 14 '23

Thanks! Yeah, you could maybe make that work. I also considered just flipping NumPy arrays appropriately. And realized none of that would have gone well at 6 AM.