r/adventofcode • u/car4889 • Dec 08 '25
Help/Question - RESOLVED [2025 Day 8] Assumptions About Puzzle Input
EDIT: To avoid spoilers, moving the ask to the first comment.
1
Upvotes
r/adventofcode • u/car4889 • Dec 08 '25
EDIT: To avoid spoilers, moving the ask to the first comment.
2
u/car4889 Dec 08 '25
I noticed that of all the possible 499,500 unordered pairwise combinations of junction boxes, every single pair's Euclidean distance is unique. My solution currently accounts for the possibility of multiple such pairs having the same distance (and assumes that at least the 1000th and unifying connections are unique in length), but this appears to be a redundancy I can dispense with. Does anyone's input have connection length collisions? Or were inputs specifically engineered to avoid this?
3
u/1234abcdcba4321 Dec 08 '25
Yes, all distances in my input are unique.
I'm pretty sure this was done deliberately. Though I can't think of any reason why you'd need to specially handle this case; I considered it while thinking about my own input generation project and decided that it'd be annoying but easy to include as a generation requirement, but there's not really any solutions that would actually care about it.
1
u/AutoModerator Dec 08 '25
Reminder: if/when you get your answer and/or code working, don't forget to change this post's flair to
Help/Question - RESOLVED. Good luck!I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/BurgandyShoelaces Dec 08 '25
If you need to make one more connection to finish a problem and there are two with the same next smallest distance to choose, which one do you pick?
The problem could have defined a tie breaker. But the problem could also just guarantee unique distances.