[2024 Day 2] Feeling bad for using brute-force instead of dynamic programming

I love AoC, but it's only day 2, and I already can't "do it right".

Part 2 was practically screaming for dynamic programming, but I just couldn't figure it out. Instead, I ended up hacking together a disgusting brute-force solution that iterates over all the sub-report possibilities... 😔

I feel frustrated. Are you okay with sub-optimal solutions? How do you cope?