IM GONNA SAY IT :marseyraging:

>be me, day 16 of AOC

>write a solution to part one that only considers nodes with values > 0

>runs pretty quickly, could be better

>get to part two, considering two players

>:marseyclueless: obviously it is equivalent to a single player playing the game twice and not visiting previously visited nodes, right?

>try solution on test input, doesn't work

>shit, forgot about the case where the players run out of time before reaching the end

>rewrite algorithim for two players (tedious af)

>press run

one eternity later

>shit, guess I need to improve the algorithim

>rewrite the algorithm to use a matrix of distances instead of recomputing the distance each time

>part 1 runs 21x faster :marseywholesome:

>:marseyclueless: surely this is the correct implementation

one eternity later

>what the frick do they want from me

>how could i possibly do this any faster

>wonder if there is a linear time solution i'm missing

>scrawl a page of nonsense with matrices, realize that none of it matters because it would be running slower than my interpretation

:#marseygiveup:

>fine, i'll check the solution thread on rdrama

>see a comment from @ihsoy

I solve part two simply by dfs through the part once, and then if time gets to zero, i restart the dfs.

>wtf, that doesn't work, i already tried that on the test input

>try it on the actual input

>mfw it works

>mfw i wasted hours because the test input was nothing like the actual input

I'M GOING TO KILL YOU SANTA CLAUS!!!!!!!!!!!

75
Jump in the discussion.

No email address required.

:#marseybangfast:

Jump in the discussion.

No email address required.

EXACTLY

Jump in the discussion.

No email address required.

Didn't read, but yeah, I empathize or whatever it's called.

Jump in the discussion.

No email address required.

This :marseysharksoup: is why you should never :marseyitsover: test :marseyitsrigged: your code.

Jump in the discussion.

No email address required.

only test on production during peak business hours

Jump in the discussion.

No email address required.

:mar#seypopcorntime: < codecel manager who promised features not even planned for.

Jump in the discussion.

No email address required.

>prod mngr proudly recounts 3 impossible features from marketing they denied just before detailing new critical priority implausible feature from executive office on day 3 of current sprint

![](https://media.giphy.com/media/l46CeDBwmtMi1ddkc/giphy.webp)

Jump in the discussion.

No email address required.

>I'M GOING TO KILL YOU SANTA CLAUS!!!!!!!!!!!

Religion checks out

Jump in the discussion.

No email address required.

>wonder if there is a linear time solution to an np complete problem.

keep wondering there fruitcake. I'm sure it'll go nowhere in two weeks.

Jump in the discussion.

No email address required.

Just make a O(1) hash table of the universe bro

Jump in the discussion.

No email address required.

THATS WHY I WAS SO CONFUSED

Jump in the discussion.

No email address required.

Anything's possible with a good enough approximate model, probably

Jump in the discussion.

No email address required.

day 16 of AOC

Gotchu fam

![](/images/1671263765800455.webp)

Jump in the discussion.

No email address required.

OF COURSE WIKIFEET IS A THING

WHY WOULD IT NOT BE???

:#marseykys2:

Jump in the discussion.

No email address required.

Jump in the discussion.

No email address required.

![](/images/16712474499074314.webp)

Jump in the discussion.

No email address required.

IM GONNA FRICK SANTA CLAUS RIGHT IN HIS CANDY LOVING BUTT!

Jump in the discussion.

No email address required.

This is what you get for using shitty programming languages. they've rotted your mind. You've done it to yourself and have nobody else to blame.

![](/images/16712523775818357.webp)


Give me your money and I'll annoy people with it :space: https://i.rdrama.net/images/16965516366194396.webp

Jump in the discussion.

No email address required.

>algorithim = programming language

Jump in the discussion.

No email address required.

If you eat everything with a spoon normally you'll look like a complete r-slur when you eat a steak in public. Same applies here.


Give me your money and I'll annoy people with it :space: https://i.rdrama.net/images/16965516366194396.webp

Jump in the discussion.

No email address required.

But I don't do that

Jump in the discussion.

No email address required.

Exactly


Give me your money and I'll annoy people with it :space: https://i.rdrama.net/images/16965516366194396.webp

Jump in the discussion.

No email address required.

BIPOC

Jump in the discussion.

No email address required.

I know you are but what am I? :scoot:


Give me your money and I'll annoy people with it :space: https://i.rdrama.net/images/16965516366194396.webp

Jump in the discussion.

No email address required.

More comments

I thought jews were superior? :marseyconfused:

Jump in the discussion.

No email address required.

we are

Jump in the discussion.

No email address required.

Please dont admit mistakes then. It makes jews look bad. Do better next time sweaty

Jump in the discussion.

No email address required.

i wasn't wrong, it was the stated problem that was malformed. r-slur. idiot.

Jump in the discussion.

No email address required.

:marseysneedpat:

Jump in the discussion.

No email address required.

The problem wasn’t malformed, your solution was. Both of you suck because you’re solutions don’t work on the test input and evaluation input.

Jump in the discussion.

No email address required.

My solution was a general solution to the stated problem that would have worked with any input, given enough time. The issue was that the actual input represented a specific case of the problem that is faster to solve.

Jump in the discussion.

No email address required.

Jump in the discussion.

No email address required.

mfw i wasted hours because the test input was nothing like the actual input

It works on test input of course. Something tells me that you parsed it by hand and made a mistake.

Jump in the discussion.

No email address required.

:marseyconfused: pretty sure it doesn't. The problem is that in the test input, you can get to all (or most) the nodes before time runs out, which means that on your first pass player 1 gets all but one of the nodes, leaving just one for the elephant, which isnt optimal

Jump in the discussion.

No email address required.

Oh, I see.

Jump in the discussion.

No email address required.

:#marseyembrace:

Jump in the discussion.

No email address required.

I saw something on 4chan that if you're lucky your input can be split in two like this. Then the first DFS goes right and the second left without interfering

![](/images/16712756079133458.webp)

Jump in the discussion.

No email address required.

>codecels thinking we know what any of this means or even more important that we would give a shit even if we did.

#Ban /h/slackerjews


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

Jump in the discussion.

No email address required.

Listening about coding makes me feel like a :marseygigaretard:


Jump in the discussion.

No email address required.

Eric must have been in a bad mood this year. Days 15 and 16 weren't nice.

Jump in the discussion.

No email address required.

I'm gonna be last because I haven't kept up have a certification exam today

Jump in the discussion.

No email address required.

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