Done in C#, .NET 8. Because that's what I currently use the most while getting paid for it. Published with a delay, so I don't interfere with the Advent of Code 2023 leaderboards.
My challenge for this AoC: Avoid allocations. Especially in a loop. In theory, this improves performance of any program.
I am too lazy for a proper license file, so here are my license terms: Everything here provided as-is. I cannot be held liable for any damage caused by this code. No warranty or guarantee that everything works. You may use this code for any purpose whatsoever.
Input for the programs is taken via stdin. Stdin must be closed for the programs to do their final outputs or whatever.