# AoC 2023 Day 6: Racinator

## Source: Day 6: Wait For It

Full solution for today (spoilers!)

## Part 1

Simulate charging up race boats with the behavior that waiting X seconds to start means you move at X units per second. Given time allowed and a target distance, determine how many (integer) numbers of seconds will beat the target distance.

# AoC 2023 Day 5: Growinator

## Source: Day 5: If You Give A Seed A Fertilizer

Full solution for today (spoilers!)

## Part 1

You are given a set of initial values (seeds) and a series of range maps (where a range of numbers src..src+len maps to dst..dst+len). Apply each range map in tur, return the lowest resulting value.

# AoC 2023 Day 4: Scratchinator

## Source: Day 4: Scratchcards

Full solution for today (spoilers!). Note: I did slightly change my solutions template after writing this blog post, so the final solution is structured slightly differently than the code in this post. The functionality itself hasn’t changed.

## Part 1

Simulate scratchcards. Given a list of winning numbers and guessed numbers, count how many guessed numbers are in the winning list. Your score is 1, 2, 4, 8, … for 1, 2, 3, 4, … matching numbers.

# AoC 2023 Day 3: Gearinator

## Source: Day 3: Gear Ratios

Full solution for today (spoilers!). Note: I did slightly change my solutions template after writing this blog post, so the final solution is structured slightly differently than the code in this post. The functionality itself hasn’t changed.

## Part 1

Take as input a 2D grid of numbers or symbols (. represents empty space). Numbers will be 1 or more digits written horizontally which should be concatenated (.467* is the number 467 followed by the symbol *).

Sum all numbers that are adjacent (including diagonally) to at least one symbol.

# AoC 2023 Day 2: Playinator

## Source: Day 2: Cube Conundrum

Full solution for today (spoilers!). Note: I did slightly change my solutions template after writing this blog post, so the final solution is structured slightly differently than the code in this post. The functionality itself hasn’t changed.

## Part 1

Play a game where you have some number of red, green, and blue dice in a cup, which you draw and roll (without replacement). Which game is possible with only 12 red, 13 gree, and 14 blue cubes?

Input will look like: Game 1: 3 blue, 4 red; 1 red, 2 green, 6 blue; 2 green

# AoC 2023 Day 1: Calibrationinator

## Source: Day 1: Trebuchet?!

Full solution for today (spoilers!). Note: I did slightly change my solutions template after writing this blog post, so the final solution is structured slightly differently than the code in this post. The functionality itself hasn’t changed.

## Part 1

Given a list of alphanumeric strings, find the first and last digit on each line (they may be the same). Concatenate each pair and sum them.

Another year, another Advent of Code.

Like last year, we’re doing Rust. I’ve really grown to love the language since last year… and hopefully I’ve learned a bit more about how to write more ‘proper’ Rust. I know I had some issues last year. Functional… but it could be better.

Let’s see how it goes!

For full solutions, as always, I post to GitHub (including previous years and possibly some I haven’t written up yet): jpverkamp/advent-of-code

# AoC 2022 Day 25: Snafuinator

## Part 1

Let a Snafu number be a base 5 number with the curious property that in addition to the digits 0, 1, and 2, it has the numbers - as -1 and = as -2. Sum up a list of Snafu numbers.

# AoC 2022 Day 24: Blizzinator

## Part 1

Given a map with a series of moving walls (that wrap when the hit the edges of the simulation), calculate the fastest route from the top left to the bottom right.

# AoC 2022 Day 23: Elf Scattinator

## Part 1

Implement a cellular automaton with the following rules:

• If you have no neighbors, don’t move (important, I forgot this one for a while)
• Otherwise:
• Calculate a potential move:
• If you have no neighbors to the north, move north
• If not, check likewise for south, then west, than east
• If no other agent is moving to the same space, move to your potential move
• Otherwise, don’t move
• On each frame, rotate the order the directions are checked in (NSWE, SWEN, WENS, ENSW, NSWE, …)