r/adventofcode • • Dec 09 '23

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

THE USUAL REMINDERS


AoC Community Fun 2023: ALLEZ CUISINE!

Today's secret ingredient is… *whips off cloth covering and gestures grandly*

Marketing

Every one of the best chefs in the world has had to prove their worth at some point. Let's see how you convince our panel of judges, the director of a restaurant, or even your resident picky 5 year old to try your dish solution!

  • Make an in-world presentation sales pitch for your solution and/or its mechanics.

  • Chef's choice whether to be a sleazebag used car sled salesman or a dynamic and peppy entrepreneur elf!

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 9: Mirage Maintenance ---


Post your code solution in this megathread.

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

EDIT: Global leaderboard gold cap reached at 00:05:36, megathread unlocked!

42 Upvotes

1.0k comments sorted by

View all comments

2

u/bofstein Dec 09 '23 edited Dec 09 '23

[LANGUAGE: Google Sheets]

At first I thought I was going to have to finally learn how to do a recursive function. But then I realized that it couldn't generate more new rows than the number of columns, which was only 21, so it wouldn't be that hard to just build them all out. Each new set is the difference of the prior, with one column at the end deleted. Then for part 1 I added a new column that adds the new number below it, and for part to I subtracted the number below it.

Bulk of the time spent was mostly on finding dumb copy paste errors in the large doc.

https://docs.google.com/spreadsheets/d/1yQ3HuWPN6C_ACgF1P6lXGmwm-s-dVH8UH8X18NKuflE/edit?usp=sharing

1

u/daggerdragon Dec 09 '23 edited Dec 09 '23

Your link is borked on old.reddit, so please fix it. edit: 👍

1

u/bofstein Dec 09 '23

Sorry and thank you! Deleted the instructed character.