I felt I was quite fast in being done with part1 after 3 minutes and part2 in 4 minutes (rank ~1000). I even tried to skimread the explanation to be fast, have a script to download the input and run it etc., but still no match!
I felt I was quite fast in being done with part1 after 3 minutes and part2 in 4 minutes (rank ~1000). I even tried to skimread the explanation to be fast, have a script to download the input and run it etc., but still no match!
2. Use a language that makes the edit/run cycle short.
3. Be very familiar with that language and how to process input in it.
4. Have solved many similar problems in the past so you can parse these problem statements quickly.
5. Have solved many similar problems in the past so you know exactly what code to write or use (if you have a utility library).
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.
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.
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")
Definitely. A lot of it is always the same (open files, iterate over input, operating on arrays/lists etc.). Something like Peter Norvig has in Python:
https://github.com/norvig/pytudes/blob/main/ipynb/Advent%20o...
And I guess I could do better on 2, but on this day I only needed 1 run. I use Kotlin, and guess I lose a second or two on it compiling before running. I see today's winner just did everything in browser console as a repl. So that's probably a good way to minimize the loop. Pretty annoying for the later problems, though.
curl https://adventofcode.com/2022/day/1/input
Puzzle inputs differ by user. Please log in to get your puzzle input.If you do use a download script make sure you check whether or not you've downloaded it before. He's also requested that you put in a user agent that provides some contact info (rather than being generic). The server has been getting slammed by people hitting it too often and he's considering banning some, and wants a way to reach out to people who may have a misbehaving script.
https://adventofcode.com/2018/day/21 - My one top 100 result
https://adventofcode.com/2018/day/16
https://www.reddit.com/r/adventofcode/comments/z9dhtd/please...
Who cares what others do with the game? Have fun while doing it