# Advent of Code

**URL:** https://forum.ada-lang.io/c/advent-of-code/5.md?page=1

[Latest](https://forum.ada-lang.io/latest.md) · [Categories](https://forum.ada-lang.io/categories.md) · [Tags](https://forum.ada-lang.io/tags.md)

**Page:** 2

---

## [2024 Day 8: Resonant Collinearity](https://forum.ada-lang.io/t/2024-day-8-resonant-collinearity/1561)

<div class="topic-metadata">

**Author:** [@JeremyGrosser](https://forum.ada-lang.io/u/JeremyGrosser)\
**Replies:** 5\
**Last updated:** [December 11, 2024, 4:27pm UTC](https://forum.ada-lang.io/t/2024-day-8-resonant-collinearity/1561 "2024-12-11T16:27:52Z")

</div>

This one should’ve been straightforward, but I tried to use Ada.Containers.Ordered\_Sets which somehow allowed multiple elements with the same value to exist. This kept confusing me until I switched to inefficiently using…

---

## [2024 Day 7: Bridge Repair](https://forum.ada-lang.io/t/2024-day-7-bridge-repair/1556)

<div class="topic-metadata">

**Author:** [@JeremyGrosser](https://forum.ada-lang.io/u/JeremyGrosser)\
**Replies:** 9\
**Last updated:** [December 11, 2024, 4:26pm UTC](https://forum.ada-lang.io/t/2024-day-7-bridge-repair/1556 "2024-12-11T16:26:59Z")

</div>

Part 1 made my head hurt, I’ll tackle Part 2 in the morning. Part 2 was easier than I expected. I’m not really happy with any part of this solution, nothing feels optimal.

---

## [2024 Day 9: Disk Fragmenter](https://forum.ada-lang.io/t/2024-day-9-disk-fragmenter/1570)

<div class="topic-metadata">

**Author:** [@JeremyGrosser](https://forum.ada-lang.io/u/JeremyGrosser)\
**Replies:** 1\
**Last updated:** [December 10, 2024, 3:59pm UTC](https://forum.ada-lang.io/t/2024-day-9-disk-fragmenter/1570 "2024-12-10T15:59:31Z")

</div>

Not really happy with my solution for part 2. I struggled to come up with the right data structure(s) until I worked backwards and wrote the algorithm first, then created the structures I needed for that algorithm. It’s …

---

## [2024 Day 6: Guard Gallivant](https://forum.ada-lang.io/t/2024-day-6-guard-gallivant/1553)

<div class="topic-metadata">

**Author:** [@tgv](https://forum.ada-lang.io/u/tgv)\
**Replies:** 3\
**Last updated:** [December 10, 2024, 2:39am UTC](https://forum.ada-lang.io/t/2024-day-6-guard-gallivant/1553 "2024-12-10T02:39:21Z")

</div>

Unfortunately, more matrix walks. Part 2 is a simple extension of part 1 (), and I can’t be bothered to complete it, I’m afraid.

---

## [2024 Day 1: Historian Hysteria](https://forum.ada-lang.io/t/2024-day-1-historian-hysteria/1523)

<div class="topic-metadata">

**Author:** [@JeremyGrosser](https://forum.ada-lang.io/u/JeremyGrosser)\
**Replies:** 15\
**Last updated:** [December 9, 2024, 7:19pm UTC](https://forum.ada-lang.io/t/2024-day-1-historian-hysteria/1523 "2024-12-09T19:19:04Z")

</div>

---

## [2024 Day 5: Print Queue](https://forum.ada-lang.io/t/2024-day-5-print-queue/1550)

<div class="topic-metadata">

**Author:** [@JeremyGrosser](https://forum.ada-lang.io/u/JeremyGrosser)\
**Replies:** 5\
**Last updated:** [December 9, 2024, 5:24pm UTC](https://forum.ada-lang.io/t/2024-day-5-print-queue/1550 "2024-12-09T17:24:29Z")

</div>

I didn’t think too hard about optimization here, just implemented the problem as written. I’m not really happy with my solution, but it works so I guess that’s good enough. Might do some cleanup/optimization later.

---

## [2024 Day 3: Mull It Over](https://forum.ada-lang.io/t/2024-day-3-mull-it-over/1539)

<div class="topic-metadata">

**Author:** [@JeremyGrosser](https://forum.ada-lang.io/u/JeremyGrosser)\
**Replies:** 14\
**Last updated:** [December 6, 2024, 11:00am UTC](https://forum.ada-lang.io/t/2024-day-3-mull-it-over/1539 "2024-12-06T11:00:14Z")

</div>

---

## [2024 Day 4: Ceres Search](https://forum.ada-lang.io/t/2024-day-4-ceres-search/1544)

<div class="topic-metadata">

**Author:** [@JeremyGrosser](https://forum.ada-lang.io/u/JeremyGrosser)\
**Replies:** 8\
**Last updated:** [December 5, 2024, 4:37pm UTC](https://forum.ada-lang.io/t/2024-day-4-ceres-search/1544 "2024-12-05T16:37:29Z")

</div>

Part 1 went smoothly for me, but I had to take a phone call and will finish part 2 tomorrow finished a bit late. Opening the thread for discussion now. Part 2 tripped me up because I was imagining some crazy but it tur…

---

## [2024 Day 2: Red-Nosed Reports](https://forum.ada-lang.io/t/2024-day-2-red-nosed-reports/1533)

<div class="topic-metadata">

**Author:** [@JeremyGrosser](https://forum.ada-lang.io/u/JeremyGrosser)\
**Replies:** 9\
**Last updated:** [December 4, 2024, 12:16am UTC](https://forum.ada-lang.io/t/2024-day-2-red-nosed-reports/1533 "2024-12-04T00:16:16Z")

</div>

---

## [2022 Day 18: Boiling Boulders](https://forum.ada-lang.io/t/2022-day-18-boiling-boulders/262)

<div class="topic-metadata">

**Author:** [@wutka](https://forum.ada-lang.io/u/wutka)\
**Replies:** 8\
**Last updated:** [December 1, 2024, 10:50pm UTC](https://forum.ada-lang.io/t/2022-day-18-boiling-boulders/262 "2024-12-01T22:50:40Z")

</div>

It was nice to get an easy one after the past two days. The only hard thing was that gnatprove was either hanging or crashing, and I guessed that it didn’t like all the nested-nested-nested loops. I rewrote it so I gener…

---

## [Reddit: What language do you use for AoC?](https://forum.ada-lang.io/t/reddit-what-language-do-you-use-for-aoc/1279)

<div class="topic-metadata">

**Author:** [@captain-haddock17](https://forum.ada-lang.io/u/captain-haddock17)\
**Replies:** 1\
**Last updated:** [November 13, 2024, 8:55am UTC](https://forum.ada-lang.io/t/reddit-what-language-do-you-use-for-aoc/1279 "2024-11-13T08:55:29Z")

</div>

See the thread on Reddit /r/adventofcode I just put a reply. (First one about Ada :sunglasses:)

---

## [Reddit: What language will you use for AOC 2024?](https://forum.ada-lang.io/t/reddit-what-language-will-you-use-for-aoc-2024/1466)

<div class="topic-metadata">

**Author:** [@captain-haddock17](https://forum.ada-lang.io/u/captain-haddock17)\
**Replies:** 1\
**Last updated:** [November 13, 2024, 8:50am UTC](https://forum.ada-lang.io/t/reddit-what-language-will-you-use-for-aoc-2024/1466 "2024-11-13T08:50:06Z")

</div>

New thread on Reddit r/adventofcode… did some Ada prolesitism, as nowadays ChatGPT is feeded by all these social networks :smile:

---

## [2023 Day 19: Aplenty](https://forum.ada-lang.io/t/2023-day-19-aplenty/603)

<div class="topic-metadata">

**Author:** [@cantanima](https://forum.ada-lang.io/u/cantanima)\
**Replies:** 13\
**Last updated:** [January 4, 2024, 7:25pm UTC](https://forum.ada-lang.io/t/2023-day-19-aplenty/603 "2024-01-04T19:25:48Z")

</div>

Today’s puzzle is cute: To start, each part is rated in each of four categories: \* \`x\`: E\*x\*tremely cool looking \* \`m\`: \*M\*usical (it makes a noise when you hit it) \* \`a\`: \*A\*erodynamic \* \`s\`: \*S\*hiny Kind of embarras…

---

## [\[Charity\] Advent of Ada/SPARK 2023 Submissions](https://forum.ada-lang.io/t/charity-advent-of-ada-spark-2023-submissions/562)

<div class="topic-metadata">

**Author:** [@Fabien.C](https://forum.ada-lang.io/u/Fabien.C)\
**Replies:** 127\
**Last updated:** [January 4, 2024, 5:43am UTC](https://forum.ada-lang.io/t/charity-advent-of-ada-spark-2023-submissions/562 "2024-01-04T05:43:29Z")

</div>

Hello here, Today AdaCore announced a second edition of the Advent of Ada/SPARK charity event. For each person completing one of the Advent of Code challenges using the Ada programming language, AdaCore will donate $10 …

---

## [2023 Day 25: Snowverload](https://forum.ada-lang.io/t/2023-day-25-snowverload/617)

<div class="topic-metadata">

**Author:** [@cantanima](https://forum.ada-lang.io/u/cantanima)\
**Replies:** 4\
**Last updated:** [December 29, 2023, 12:22am UTC](https://forum.ada-lang.io/t/2023-day-25-snowverload/617 "2023-12-29T00:22:31Z")

</div>

Finally :snowflake: :snowflake: :snowflake: Day 25 strikes me as much harder than most Day 25’s, and I ain’t the only one. I mean, come on, 2020 was the year where you basically played a tribute to Zork. (Or maybe it w…

---

## [2023 Day 23: A Long Walk](https://forum.ada-lang.io/t/2023-day-23-a-long-walk/614)

<div class="topic-metadata">

**Author:** [@cantanima](https://forum.ada-lang.io/u/cantanima)\
**Replies:** 3\
**Last updated:** [December 26, 2023, 4:44am UTC](https://forum.ada-lang.io/t/2023-day-23-a-long-walk/614 "2023-12-26T04:44:40Z")

</div>

Took me a while to get around to this one, because Day 21 set me back one day. Day 22 was straightforward (more or less) and while I got Day 23, it took a good long while. Part 1 is straightforward, I think. For Part 2…

---

## [2023 Day 24: Don't Tell Me The Odds](https://forum.ada-lang.io/t/2023-day-24-dont-tell-me-the-odds/615)

<div class="topic-metadata">

**Author:** [@cantanima](https://forum.ada-lang.io/u/cantanima)\
**Replies:** 4\
**Last updated:** [December 26, 2023, 2:35am UTC](https://forum.ada-lang.io/t/2023-day-24-dont-tell-me-the-odds/615 "2023-12-26T02:35:19Z")

</div>

On Day 18 I wrote: I don’t suppose he’ll ever supply a puzzle that relies on my old research topics… Careful what you wish for! If you’re as stuck on Part 2 as most people were (took roughly an hour for the first 10…

---

## [2023 Day 16: The Floor Will Be Lava](https://forum.ada-lang.io/t/2023-day-16-the-floor-will-be-lava/595)

<div class="topic-metadata">

**Author:** [@cantanima](https://forum.ada-lang.io/u/cantanima)\
**Replies:** 4\
**Last updated:** [December 23, 2023, 7:54pm UTC](https://forum.ada-lang.io/t/2023-day-16-the-floor-will-be-lava/595 "2023-12-23T19:54:48Z")

</div>

First: this is pretty cool. I don’t remember the animations starting before the end of the competition. Today’s puzzle would have wrecked me when I first started doing AoC puzzles, back in 2020. I must be learning som…

---

## [2023 Day 21: Step Counter](https://forum.ada-lang.io/t/2023-day-21-step-counter/608)

<div class="topic-metadata">

**Author:** [@cantanima](https://forum.ada-lang.io/u/cantanima)\
**Replies:** 4\
**Last updated:** [December 23, 2023, 4:49am UTC](https://forum.ada-lang.io/t/2023-day-21-step-counter/608 "2023-12-23T04:49:05Z")

</div>

I’ve only finished Part 1 so far, but here are some thoughts on Part 2. While it’s not implemented yet, it should be the right track: when testing it by hand on a much smaller example, I come too close to the brute-force…

---

## [2023 Day 18: Lavaduct Lagoon](https://forum.ada-lang.io/t/2023-day-18-lavaduct-lagoon/601)

<div class="topic-metadata">

**Author:** [@cantanima](https://forum.ada-lang.io/u/cantanima)\
**Replies:** 3\
**Last updated:** [December 20, 2023, 7:47pm UTC](https://forum.ada-lang.io/t/2023-day-18-lavaduct-lagoon/601 "2023-12-20T19:47:32Z")

</div>

Part 1 was pretty straightforward. After several hours of looking at Part 2, it looks as if I had two really good ideas, but gave up on them too early. (Short on time lately.) My favorite idea was to (). But when I app…

---

## [2023 Day 20: Pulse Propagation](https://forum.ada-lang.io/t/2023-day-20-pulse-propagation/606)

<div class="topic-metadata">

**Author:** [@cantanima](https://forum.ada-lang.io/u/cantanima)\
**Replies:** 0\
**Last updated:** [December 20, 2023, 5:46pm UTC](https://forum.ada-lang.io/t/2023-day-20-pulse-propagation/606 "2023-12-20T17:46:34Z")

</div>

I usually look at the general leaderboard for each problem to get an impression of how difficult the “experts” find it. It surprises me that the general leaderboard for day 20 suggests that this has been the hardest prob…

---

## [2023 Day 17: Clumsy Crucible](https://forum.ada-lang.io/t/2023-day-17-clumsy-crucible/598)

<div class="topic-metadata">

**Author:** [@cantanima](https://forum.ada-lang.io/u/cantanima)\
**Replies:** 1\
**Last updated:** [December 18, 2023, 9:08pm UTC](https://forum.ada-lang.io/t/2023-day-17-clumsy-crucible/598 "2023-12-18T21:08:29Z")

</div>

I should have finished this much earlier, but my Nothing was helping me figure that out, not even comparing to known solutions! Then I noticed that there was a large gap between my previously-considered level of heat lo…

---

## [2023 Day 13: Point of Incidence](https://forum.ada-lang.io/t/2023-day-13-point-of-incidence/591)

<div class="topic-metadata">

**Author:** [@cantanima](https://forum.ada-lang.io/u/cantanima)\
**Replies:** 2\
**Last updated:** [December 14, 2023, 5:27pm UTC](https://forum.ada-lang.io/t/2023-day-13-point-of-incidence/591 "2023-12-14T17:27:25Z")

</div>

Correct loop termination bedeviled me. A spoiler which isn’t really a spoiler is that I’m pretty sure parts 1 and 2 can call the same subprograms, but testing for different things. I didn’t implement it that way, though. …

---

## [2023 Day 14: Parabolic Reflector Dish](https://forum.ada-lang.io/t/2023-day-14-parabolic-reflector-dish/592)

<div class="topic-metadata">

**Author:** [@cantanima](https://forum.ada-lang.io/u/cantanima)\
**Replies:** 2\
**Last updated:** [December 14, 2023, 5:23pm UTC](https://forum.ada-lang.io/t/2023-day-14-parabolic-reflector-dish/592 "2023-12-14T17:23:11Z")

</div>

:satellite: Fake spoiler: it didn’t require the use of the quadratic formula. Not too difficult; I had more trouble with part 1 than with part 2. For part 2,

---

## [2023 Day 11: Cosmic Expansion](https://forum.ada-lang.io/t/2023-day-11-cosmic-expansion/587)

<div class="topic-metadata">

**Author:** [@cantanima](https://forum.ada-lang.io/u/cantanima)\
**Replies:** 0\
**Last updated:** [December 11, 2023, 12:57pm UTC](https://forum.ada-lang.io/t/2023-day-11-cosmic-expansion/587 "2023-12-11T12:57:06Z")

</div>

What a relief after yesterday’s puzzle! Kind of amusing how the puzzle master attempted to disguise . I recently completed the 2018 puzzles, and he made no attempt to disguise that. It amuses me that I guessed Part 2’s…

---

## [2023 Day 12: Hot Springs](https://forum.ada-lang.io/t/2023-day-12-hot-springs/590)

<div class="topic-metadata">

**Author:** [@cantanima](https://forum.ada-lang.io/u/cantanima)\
**Replies:** 2\
**Last updated:** [December 13, 2023, 3:04pm UTC](https://forum.ada-lang.io/t/2023-day-12-hot-springs/590 "2023-12-13T15:04:10Z")

</div>

:scream: just kidding. but this one took me a long time. We seem to have entered the fiendishly difficult phase. Fortunately, difficult problems are usually followed by not-so-difficult ones. Usually. I first complete…

---

## [2023 Day 10: Pipe Maze](https://forum.ada-lang.io/t/2023-day-10-pipe-maze/585)

<div class="topic-metadata">

**Author:** [@zertovitch](https://forum.ada-lang.io/u/zertovitch)\
**Replies:** 3\
**Last updated:** [December 11, 2023, 12:20am UTC](https://forum.ada-lang.io/t/2023-day-10-pipe-maze/585 "2023-12-11T00:20:41Z")

</div>

---

## [2023 Day 8: Haunted Wasteland](https://forum.ada-lang.io/t/2023-day-8-haunted-wasteland/578)

<div class="topic-metadata">

**Author:** [@cantanima](https://forum.ada-lang.io/u/cantanima)\
**Replies:** 3\
**Last updated:** [December 10, 2023, 11:36pm UTC](https://forum.ada-lang.io/t/2023-day-8-haunted-wasteland/578 "2023-12-10T23:36:05Z")

</div>

Relatively straightforward. I suspected, correctly, that . Unfortunately, I incremented my step counter at the wrong time, so that I didn’t see .

---

## [2023 Day 1: Trebuchet?!](https://forum.ada-lang.io/t/2023-day-1-trebuchet/560)

<div class="topic-metadata">

**Author:** [@JeremyGrosser](https://forum.ada-lang.io/u/JeremyGrosser)\
**Replies:** 16\
**Last updated:** [December 10, 2023, 10:02pm UTC](https://forum.ada-lang.io/t/2023-day-1-trebuchet/560 "2023-12-10T22:02:13Z")

</div>

I hope someone has a more elegant solution for part 2.

---

## [2023 Day 7: Camel Cards](https://forum.ada-lang.io/t/2023-day-7-camel-cards/577)

<div class="topic-metadata">

**Author:** [@cantanima](https://forum.ada-lang.io/u/cantanima)\
**Replies:** 1\
**Last updated:** [December 8, 2023, 8:06pm UTC](https://forum.ada-lang.io/t/2023-day-7-camel-cards/577 "2023-12-08T20:06:09Z")

</div>

I relied on enumerations. In both parts For part 2, I used That, and a rewrite of the ordering in part 1, did the trick.

[Previous page](https://forum.ada-lang.io/c/advent-of-code/5.md)

[Next page](https://forum.ada-lang.io/c/advent-of-code/5.md?page=2)
