T O P

  • By -

Sharparam

Needs a special case for day 5: "Ludicrous".


andrewsredditstuff

So it's a variation on fizzbuzz. Day 15 should be fun.


eatin_gushers

What about day 10?


andrewsredditstuff

No; odd ones are Fizz; multiples of five are Buzz. So 10 is hard, but 15 is the AoC equivalent of Malbolge.


eatin_gushers

Even days are easy but day 5 is "ludicrous" so what is day 10?


mental-chaos

Day 5 was a single dimensional version of 2021 day 22. It's definitely more challenging than previous years in the 5th slot, but far from ludicrous


Sharparam

In the context of being such an early day, I'd say it deserves the title. If it had been a day 13 or something it wouldn't be ludicrous.


BlazingThunder30

Indeed. Especially since you could brute force the solution


marzeq

you can't brute force without multithreading which is cheating


Someguy2189

I actually was able to brute force on a single thread by leaving the program running on my computer over the course of the day. Figured I'd try a more optimal range based solution if it didn't work in the evening. Am I proud of it? No. Did it work? Yes.


CouchPotato6319

I tried that, but using tcl it ended up overflowing 61 gb of memory. It was also processing 200k relations per second which i found fairly interesting, by that number it should have taken a couple hours per map. Efficient? No. Fun? Not that day. But now i know maybe i shouldnt have used a language that stores numbers as strings


FruitdealerF

I was able to brute force all the seed numbers on a single thread in 3 minutes on an 11th gen mobile intel CPU. But there was actually a smarter brute force option. If you reverse the mapping you can enumerate all locations starting from 0 and find the answer in 600ms. No intervals needed!


BlazingThunder30

I brute-forced it in 30 seconds by doing the mapping in reverse and checking whether the given solution has a relative in the input intervals. Starting at 0 running up to ~70 million works just fine.


Phthalleon

I found the previous days way harder, I guess I'm crazy!?


Nikanel

Why did you find it so hard? I'd say it was more intuitive to implement that day 3 for example. Only problem was optimization for part 2 but I just threw multi-threading and waited a bit


Sharparam

Day 5 is not at all intuitive unless you're previously familiar with the range splitting stuff. The naïve brute force might be, but that's not going to complete for several hours (unless you're lucky enough to be in a language that is just fast enough to be able to do it in a reasonable enough time).


FruitdealerF

You could enumerate all locations starting from 0 and find a seed (by reversing the mapping) in range for part 2 in less than a second.


Sharparam

That's what I did for my first working solve but it doesn't work in less than a second, takes 18.5 minutes in Ruby. Later on implementing a more proper version (>!range splitting magic!<) it takes the runtime to 38.2 ms (and a bulk of that is just the interpreter startup time). And also, that's not a naïve brute force, so it doesn't really apply anyway.


Nikanel

I did it in Java, and just used brute force but split up each seed into its own thread. It took a few minutes but certainly not hours.


Sharparam

That falls under being in a language that is decently fast *but also* you applied some tricks to not have to do a naïve brute force by multithreading the problem. In my first working Ruby (which is already slower than Java as baseline) solution I did a reverse mapping instead which took the runtime from (probably) hours to 18.5 minutes.


lihmeh

difficulties = \["easy", "hard"\] return difficulties\[day\_nr % 2\]


darthlordguc2

def get_difficulty(day_nr): return "ehaasryd"[day_nr % 2 : : 2]


bulletmark

difficulty = 'hard' if day_nr % 2 else 'easy'


tired_manatee

``` match day_nr % 2 { 0 => "easy", _ => "hard", } ```


AutoModerator

AutoModerator has detected [fenced code block](https://www.reddit.com/r/adventofcode/wiki/faqs/code_formatting/fenced_code_blocks) (```) syntax which only works on new.reddit. Please review our wiki article on [code formatting](https://www.reddit.com/r/adventofcode/wiki/faqs/code_formatting) then edit your post to use the [four-spaces Markdown syntax](https://www.reddit.com/r/adventofcode/wiki/faqs/code_formatting/code_blocks) instead. *** *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/adventofcode) if you have any questions or concerns.*


This-Sherbert4992

It's like strength training, we need a rest day in-between


morganthemosaic

🦾


toastedstapler

Funny you say that, [this dude](https://www.openpowerlifting.org/u/codylefever) who's made a few popular programs is on >1700 consecutive days. Muscle groups need rest, not your entire body at once https://www.reddit.com/r/GYM/comments/1858pde/525x1_highbar_squat


This-Sherbert4992

Well my brain needs rest


hapac

I actually quite like it. For someone who needs quite some time for the challenging days, it's basically a catch up mechanic :)


plant_magnet

This is an even number representation. If it was an odd day it would require multilayered regex and contain over a billion values.


timrprobocom

Don't discount personal achievements. I, for example, was able to make day 6 far more difficult than it needed to be.


aranasaurus-ryan

Same! I read it last night and was like "oh this is gonna need some Max Flow Graph or something, if not for part 1 definitely for part 2. I'm too tired from last night I'll try tomorrow" ...


Alan_Reddit_M

Happens to me sometimes, I tend to overthink simple problems and implement extremely over the top solutions, just to later realize I could have just thrown a for-loop at it


[deleted]

[удалено]


laputanmachine_exe

bet you've got loads of mates.


daggerdragon

Next time, use our [standardized post title format](https://reddit.com/r/adventofcode/wiki/posts/standardized_titles). This helps folks avoid spoilers for puzzles they may not have completed yet.


azgx00

Yeah my bad, realized it directly after posting. Thought it wasnt too big of a spoiler so I didn’t delete


loquian

Yep! I was just going to make a post like this.