Hacker News new | ask | show | jobs
by pedrosorio 1300 days ago
“Have solved many similar problems in the past so you can parse these problem statements quickly”

This sounds like an advent of code specific thing. The problem itself is trivial, no need to have solved anything similar in the past, but the description is so verbose (because it’s a cute Santa-related story) that it becomes hard to parse the problem we’re trying to solve, quickly.

I don’t think this is common in any other competitive programming environment.

4 comments

Feel I have to disagree on this one. Firstly, most programming competitions I've been to have this kind of problem description as well, just check Kattis problems for instance.

But secondly, while the problems in the beginning are trivial, you still have a huge advantage if you can immediately start programming without having to think, or having to look up a function in the stdlib. (Spoilers:) I probably wasted a minute today thinking about the solution of making a list for elves, and creating a new element whenever I saw an empty line. While a pro probably immediately did a split on "\n\n", summed and was done.

ehm

I did s.split("\n\n").fold... But this was first thing in the morning and where I lost time was that what I actually did at first was: s.split("/n/n")

Google FooBar uses this exact form as well, state the problem as a somewhat consistent story through the different challenges.
You only need to read the bolded white words to have a very educated guess (5 second skim; it's intentional)
It helps if you sort of read the problem statement backwards