Part of what I get from AoC is finding a more optimal solution.
Some people stick to just getting the stars at whatever cost, others look at the challenge in a different way.
With this problem there's:
a) Plenty of solutions that are O(n^2) and worse
b) An O(n log n) solution where n is the number of lines of the input
c) An O(m log m) solution where m is the number of unique values in the input
d) An O(n+m) solution where n is the number of lines in the input and m is the number of unique values in the input
I could tell a lot about someone's real world programming ability if I brought this up in an interview, especially with follow-up questions such as:
1) What if the input was so large it could not be held in memory all at once?
2) What if the input was so large that even a list of unique values could not be held in memory?
etc...
[EDIT]
If you can just point an LLM at it and get the answer without providing anything useful yourself then you've got nothing to differentiate you from every other candidate that can do the same. I'm not looking for people with multiple PhD's but I look for people who know enough to know when the LLM is spouting nonsense or is suggesting something suboptimal that will fail when scaled up.
Interviewing has become more fun because of this. We tailor our interviews so the AI assisted portion gives the candidate enough rope for the AI to paint themselves into a corner if not careful, and then the non-AI portion weeds out the people who don't have (or have lost) the ability to think for themselves.
Also a big part of the advent of code is to look at the input data and realize that it's not a worst case scenario at all and heavy shortcuts can be taken.
Since m < n by definition, O(n+m) is O(n).
Similarly, there can be no O(m log m) solution, because you have to read every line in general.