this post was submitted on 03 Dec 2024
22 points (100.0% liked)
Advent Of Code
977 readers
57 users here now
An unofficial home for the advent of code community on programming.dev!
Advent of Code is an annual Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like.
AoC 2024
Solution Threads
M | T | W | T | F | S | S |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 |
Rules/Guidelines
- Follow the programming.dev instance rules
- Keep all content related to advent of code in some way
- If what youre posting relates to a day, put in brackets the year and then day number in front of the post title (e.g. [2024 Day 10])
- When an event is running, keep solutions in the solution megathread to avoid the community getting spammed with posts
Relevant Communities
Relevant Links
Credits
Icon base by Lorc under CC BY 3.0 with modifications to add a gradient
console.log('Hello World')
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Thinking about it a little more, the answer is a number, and the site tells you if you are too high or too low, so a modification of a binary search might be the answer? I'm not sure if there is a submission limit but if there isnt then that could result in a fast submission.
Say the answer is 400 and you guess 100, the site tells you it is too low, you guess 1000, the site tells you its too high, now you know its between 100 and 1000, so you can narrow it down with a guess in the middle until you get to the answer. With some automation this would be pretty quick but it would defeat the point of the challenge.
The timeouts are 1 minute for the first 5 attempts, then 5 minutes.
People are just really used to AoC's format and use languages/frameworks that are extremely concise
That is impressive, I think it took me more than 30 seconds to get the regex I wanted to use correct, more or less the rest of the solution. This is my first time doing AoC or anything like it so I wasn't expecting to be anywhere near the top, but the times I saw there were shocking.
There are a lot of people participating. Some of 'em are bound to be really really good, and also get lucky!
I haven't had time for the AoC yet, but if it's like last year, there are rate limits that would make binary search ineffective.
Ah yeah, if you can only submit once every 30 seconds or something that would defeat the ability to binary search, at least at the speeds that people were submitting today.
The timeouts become greater the more times you submit an incorrect answer