rDrama Advent of Code Day 6 Discussion Thread

Not sure where @RedNose is so I'll just post this. Post ur solutions below or whatever idc

Advent of Code is an annual Christmas themed coding challenge that runs from December 1st until christmas. Each day the coding problems get progressively harder. We have a leaderboard and pretty good turnout, so feel free to hop in at any time and show your stuff!

Whether you have a single line monstrosity or a beautiful phone book sized stack of OOP code, you can export it in a nice little image for sharing at https://carbon.vercel.app

What did you think about today's problem?

https://adventofcode.com/2023

Our Code is 2416137-393b284c (No need to share your profile, you have the option to join anonymously if you don't want us to see your github)

50
Jump in the discussion.

No email address required.

Pretty easy puzzle today.

https://i.rdrama.net/images/17018404222437227.webp

Jump in the discussion.

No email address required.

Oh you guys did it like that? I solved the inequality like an r-slur.

Jump in the discussion.

No email address required.

I was going to do it but the brute force finished quick enough

Jump in the discussion.

No email address required.

I saw the big numbers and didn't even try bruteforcing, meanwhile sweating over solving shit I haven't looked at in 15 years :marseycry:

Jump in the discussion.

No email address required.

wish i knew what u r-slurs are talking about

i cant do shit outside of a for loop and if/else

Jump in the discussion.

No email address required.

This shit:

https://i.rdrama.net/images/17018668181268585.webp

Jump in the discussion.

No email address required.

Did you not do quadratics at school? "negative b plus minus square root of b squared minus 4 a c all over 2 a" is seared into my brain for life.

Not that it mattered, you'd spend minutes writing efficient code for a ~2 second perf boost.

Jump in the discussion.

No email address required.

hmm is it even a performance boost tho? I thought computers suck at division. Or u mean like the xtra computation to derive the answer is less than trying to stick with +-*

Jump in the discussion.

No email address required.

They do, but one equation gives you the solution so it's basically instant. Also the division is by -2 which could just be a bit shift. I think even a binary search brute force would be slower (I cba to check).

Jump in the discussion.

No email address required.

hmm here's what im getting seconds:nanoseconds

https://i.rdrama.net/images/170186705140529.webp

idk what thead op's language is tho but id be curious to compare

e: absolute dogshit for the 2nd part lmfao 16 seconds

https://i.rdrama.net/images/1701867298916147.webp

Jump in the discussion.

No email address required.

More comments

I did but I forgot nearly everything I learned because I don't use it :\

On one hand it's a quick study session away from being usable info, but then also a few days of not using it away from forgetting it again.

And I do remember that specifically the forumla itself is seared in there but outside of solving for possibilities for x³ + 2x² + 8x or whatever Idk any practical use

Jump in the discussion.

No email address required.

Link copied to clipboard
Action successful!
Error, please refresh the page and try again.