Day 20: My favourite problem from Advent of Code 2023
mliezun.github.io
Day 20: My favourite problem from Advent of Code 2023
1–10 of 49 posts
Re: Day 20: My favourite problem from Advent of Code 2023
#2Object oriented programming has ruined us
Re: Day 20: My favourite problem from Advent of Code 2023
#3First I started by modelling the devices as objects. Starting with a single base class that has most of the common behaviour. Object oriented programming has ruined us
Re: Day 20: My favourite problem from Advent of Code 2023
#4Re: Day 20: My favourite problem from Advent of Code 2023
#5First I started by modelling the devices as objects. Starting with a single base class that has most of the common behaviour. Object oriented programming has ruined us
Thats why this is an issue
Re: Day 20: My favourite problem from Advent of Code 2023
#6Wouldn’t LCM be the correct/more general approach? The periods could have common factors, right?
Re: Day 20: My favourite problem from Advent of Code 2023
#7> But if we multiply the numbers together we get a number that is divisible by every number in the table. Wouldn’t LCM be the correct/more general approach? The periods could have common factors, right?
Re: Day 20: My favourite problem from Advent of Code 2023
#8Re: Day 20: My favourite problem from Advent of Code 2023
#9The intended solution only works because the input is more constrained than what the problem statement says (the problem in full generality is PSPACE-hard). If you give me a problem to solve, I'd rather have all the hypotheses, all at once.