The thing I don't like about AoC is that the example inputs are a bit too simple. In this case, my code works fine for both example inputs, but it fails for the actual input which is so big that it's practically impossible to debug to find out what is going on. #aoc #aoc23 #aoc2023

Day 21 is my favourite puzzle so far. Part 2 has a nice solution by observing that the number f(i) of reachable fields after i iterations is a quadratic function of the number of iterations i for i large enough, i.e. `f(i)=a*i^2+b*i+c`. The coefficients a,b,c can be derived from three values of f obtained by simulation of the process for few iterations.

#AdventOfCode #AOC23 #AOC

AoC23 be like: “Part 1 works, I think I did a pretty good job at making this efficient”. Part 2: "Nope” #AdventOfCode #aoc2023 #aoc23 #aoc
Found part one of Puzzle 12! Man, what an ordeal. The solution was simple in the end, but we'll have to see if it scales up for part 2. #aoc2023 #aoc23 #aoc

I benchmarked my code for the first time. This isn't very fast, but that's properly because I am not a rust expert. This is day 8 part 1.

#AOC #AdventOfCode #rust #rustlang #aoc2023 #aoc23

I just completed "Camel Cards" - Day 7 - Advent of Code 2023 #AdventOfCode https://adventofcode.com/2023/day/7

This took so long 😂 But I just finished it in #rustlang

https://codeberg.org/florianlang/advent-of-code/src/branch/main/2023/rust/day-7

#rust #aoc #aoc2023 #aoc23

Day 7 - Advent of Code 2023

This puzzle was easy but still clever and fun.

Some hints:

1) the sum of the manhattan distances on the plane is equal to the sum of the distances of the projection on each axis. (i.e. the one dimensional version of the original problem)

2) You can solve the one dimensional problem in linear time wrt the *unexpaded* length of the interval.

#AdventOfCode #AOC #aoc2023 #aoc23

@c_discussions 🤦‍♂️

And here I was thinking vectors and ranges were overkill for #aoc23 Day 1, Part 1, but little did I know the possibilities.

https://hachyderm.io/@smurthys/111519377785194970

#cpp #aoc2023 #AdventOfCode

Sean Murthy (@[email protected])

Attached: 1 image I don't do Advent of Code, but browsing a few #cpp solutions to Day 1, Part 1, I fear I misunderstand the problem, or I just don't know enough C++. I'm not sure why the solution requires vectors, ranges, algorithms, etc. when it can be done in a single pass over the input stream. Maybe others' solutions are that way due to Part 2? But more likely I'm doing something wrong. 😨 #Spoiler: Image reveals solution (edit: condense) https://adventofcode.com/2023/day/1 #aoc23 #aoc23_cpp #AdventOfCode #programming

Hachyderm.io

I wondered why my day 7 part 1 code not working. Now I know it. Such a stupid bug. I started writing this code at 11 pm it was properly to late for me to write code 😂

#aoc #AdventOfCode #aoc2023 #aoc23 #rust #rustlang

Nice simple recursion problem today.
It may not be a fancy solution, but it's simple and readable!

https://codeberg.org/pswilde/AdventOfCode/src/branch/main/2023/Day9/day.nim

#AOC #aoc23 #Recursion

AdventOfCode

Advent of Code

Codeberg.org