-🎄- 2021 Day 24 Solutions -🎄-

This page summarizes the projects mentioned and recommended in the original post on /r/adventofcode

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • aoc

    🎄 My solutions and walkthroughs for Advent of Code and more related stuff.

  • Copy paste the equations into a Python script and solve for the maximum/minimum using the Z3 solver, which this time can manage to work in a decent runtime (~30s).

  • adventofcode

    My solutions for Advent of Code (by fireduck64)

  • Java 25/38 https://github.com/fireduck64/adventofcode/blob/master/2021/24/src/Prob.java This involved a recursive sweep through the model number space while memoizing on the current register values. Basically, after the model number parts are read they don't matter for the recursion so the only state is the register values and the execution line number. So the memoization was able to actually help. Although, to be honest my solution for part 1 only worked because the number was near where I started the search (9s on down) and the part 2 only worked because I guessed (correctly) that the first number was still a nine because I'm on to how much Eric likes to punish us. Execution time around 2 minutes.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • aoc

    Advent of Code Solutions (by jocelyn-stericker)

  • adventofcode

    Advent of Code solutions (by mcpower)

  • "Python", 146/146. Part 1 working out, Part 2 working out

  • advent-of-code-2021

    A framework and solutions for Advent of Code 2021 (adventofcode.com) (by dphilipson)

  • Detailed explanation here

  • adventofcode

    Advent of Code solutions of 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 and 2023 in Scala (by sim642)

  • My Scala manual solution.

  • advent-of-code-2021

  • Python

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • aoc

    Advent of Code (by mrphlip)

  • A writeup of my solution

  • aoc_kotlin

    Advent of code solutions in Kotlin

  • Kotlin 171/147 and a more general solution

  • advent2021

    Advent of Code 2020 solutions in C++ (by bustercopley)

  • C++ 1276/1333

  • AdventOfCodeCSharp

    My AoC Solutions

  • C# 1317/1244

  • AdventOfCode2021

  • "code"

  • aoc21

  • Go, 1324/1350. Pure brute force.

  • aoc

    🎄 advent of code 414⭐ (by MasterMedo)

  • Python "Precompiled solution" featured on github

  • AdventOfCode

    My solutions for all years of Advent of Code in Python 3 and Rust (by benediktwerner)

  • Wow, my final solution looks almost exactly the same. Though I calculated my initial answers by hand.

  • AoC2021

    Trying to remember Rust by doing the Advent of Code 2021 (by Mahrgell)

  • Rust, Brute Force, < 1min

  • aoc21

  • AoC2021

    Advent of Code 2021. A Rusty submarine? (by wilkotom)

  • Like so many others, I worked out my answer on "paper"

  • advent-of-code

  • Both Parts

  • aoc2021

    solutions for advent of code 2021 (by tumdum)

  • my rust solution:

  • Advent_of_Code2021

    Solutions to Advent of COde 2021 (by cettt)

  • Then I wrote a small algorithm which finds the minimum and maximum values: no brute force needed- Full code with extra explanation on github.

  • aoc2021

  • C++ gitlab

  • aoc-2021

    Advent of Code (AoC) 2021 solutions (by egel-lang)

  • I stole today's code, and with colours, because I wanted to work on other stuff. Attribution in the github sources.

  • advent_of_code_2021

    Golang solutions to advent of code 2021 (by Stefansfrank)

  • The solution is manual and well described here. I wrote an AOI simulator and some analysis code in this Go program analyzing the structure of the input and showing some sample simulations. The most interesting output is right at the beginning if you run it where it shows the (very few) differences that each digit's treatment shows - there is no way I would have found the manual solution without the info from that program.

  • AdventOfCode

    Advent of Code (by AdroMine)

  • Solution First solved this in Excel. Here'a snapshot of the mess. After doing it once, writing code to do it for any input turned out to be surprisingly much easier than I had hoped for.

  • advent2021

    Advent of Code 2021 (by moink)

  • However, I wanted to write code for every problem, that works in the general case, including parsing, so after submitting I wrote some code to do the parsing and choosing the values, in python.

  • So I spend more time analyzing the input calculation. I wrote up that analysis and committed it to my repository, too.

  • adventofcode

    Solutions for problems from AdventOfCode.com (by bhosale-ajay)

  • TypeScript, Hard day for me, could figure out that instructions are repeating, and line parameters on line 5, 6, and 16 are important and their impact on z, but could not see how it can be used to get min/max number. finally copied solution from u/knl_

  • Advent-of-Code

    Solutions to the advent of code puzzles (by ammar1c)

  • Brute force with memoization in Scala:

  • aoc

  • Rust

  • aoc2021

    Advent of Code 2021, this time in Go (by danvk)

  • aoc-2021-cpp

    Advent of Code 2021 in C++

  • adventofcode

    My solution to adventofcode (by fishy)

  • O(1) solution in go (technically you still need to loop through 14 inputs, so this is only O(1) for each input)

  • advent-2021

    Discontinued [Moved to: https://github.com/Crazytieguy/advent-of-code] (by Crazytieguy)

  • advent-of-code

    Advent of Code solutions in JS (by leyanlo)

  • advent-2021

  • advent-of-code

    AoC solutions in Clojure (by wevre)

  • Here is the excel file where I worked things out.

  • aoc21-alpha

    Advent of Code 2021 in 25 different languages, alphabet soup edition

  • This is in theory a Rust solution: https://github.com/LinAGKar/advent-of-code-2021-rust/blob/main/day24a/src/main.rs, https://github.com/LinAGKar/advent-of-code-2021-rust/blob/main/day24b/src/main.rs. But I haven't actually run it to completion, like everyone else I've analyzed it manually.

  • aoc2021

    Advent of Code 2021 (Elixir + Pygame) (by p88h)

  • Python only today.

  • aoc

    Advent of Code solutions (by sjmulder)

  • First wrote a short AWK program to convert the input to C and play with it while running a hopeless brute force attempt.

  • AdventOfCode

    Advent of code daily challenge (by WilliamLP)

  • aoc2021

    Advent of Code 2021 solutions in Clojure and Python (by tabidots)

  • Clojure (GitHub). In short, I needed some help with the math, but this is one of my favorite solutions I've written so far this AoC. Apart from the fact that algebra in a LISP is pretty messy, I love how merge-with was able to make short work of pruning the search space.

  • deno_aoc

    🎄 Advent of code solutions written in TypeScript for Deno.

  • aoc2021

  • Nim

  • advent_of_code_2021_v2

  • advent_of_code

    This repository contains solutions to each of the problems in Advent of Code 2017, 2018, 2019, 2020, 2021, 2022 and 2023 in C++ (and 2020 in Python as well)

  • Part 1

  • adventofcode

    Advent of code solutions (by mathsaey)

  • aoc2021

    Advent of Code 2021 in Idris (amateur hour) (by dunhamsteve)

  • Idris2 - https://github.com/dunhamsteve/aoc2021/blob/master/day24/Main.idr

  • advent-of-code-2021

  • Code: https://github.com/obi1kenobi/advent-of-code-2021/tree/main/day24

  • adventofcode

    Advent of Code challenge solutions (by flwyd)

  • Go Five and a half days after the problem was posted, I still scored under 10,000.

  • advent-of-code

    Collection of JS solutions for puzzles from adventofcode.com 🎁🎄 (by romellem)

  • For a full write-up, see this repo, and for a non-annotated solution, see:

  • adventofcode

  • aoc2021

    Solutions to the daily AoC challenges of 2021 written in Python or Julia. (by altairbaku)

  • Here's the code for reference: https://github.com/ManavPenubaku/AdventOfCode2021/blob/main/Julia/src/ArithmeticLogicUnit.jl

  • aoc2021

    Advent of Code 2021 - my answers

  • So I switched tacks and implemented this in Kotlin, where mutation is easier. First version was brute-force with duplicate state avoidance (checked before the state explosion at every input), which worked quickly enough for part 1, but ran into OOMs for part 2. Once I replaced the HashSet with a custom LruSet (and later a simpler CacheSet which simply overwrites on hash collisions) it ran part 2 in a few minutes. I then ported this into Haskell.

  • 2021-advent-of-code

    My solutions to the 2021 advent of code (by MarcelRobitaille)

  • Here is the recursive function (the heart of the algorithm). Here is the full code with more comments.

  • aoc-2021-in-kotlin

  • advent-of-code-2021

  • Solved using MiniZinc, model in day24-1.mzn with the input specified in day24-input.dzn.

  • AdventOfCode2021.jl

    Advent of Code 2021 in Julia

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts