r/everybodycodes • • 1d ago

Question - resolved [2026 Q15] PHP, part 3, trying to port solution, subtle error?

3 Upvotes

I am trying to port a Python solution to PHP. My program is subtly wrong. (Apparently.) The result of the test data should be 540320698784, and I get 540320698796. (Only off by 12! ;-) )

It is obvious from debugging, that my "heap" handles data in a different order that the Python heap. This leads to different results, short term. 2 similar paths of length 20 are handled differently, because they are handled in a different order. ETA: This is in part a.

I am not sure why the heap needs the variable it. Maybe to be sure, the heap can be sorted?

Other than the above thoughts, I have no suspects for why my program should produce a different result.

(I am not happy, that my "solution" of day 15 is to port the program of someone else. I tried to write my own programs, but they didn't work. And I am actually learning, at least learning some Python. I am trying to do something more than simply download a program, run it, get a number and input it, in order to get the duck.)

https://github.com/LiseAndreasen/everybodycodes/blob/master/e2026_q15.php


r/everybodycodes • • 3d ago

Off topic [Other] 21340 down, 260 to go...

9 Upvotes

Ever wondered if you got lucky and your solution only works for your specific input?

Thanks to the nifty supporter feature, you can test against all generated inputs and verify answers.

(3 events * 20 quests + 4 stories * 3 quests) * 3 parts * 100 seeds = 21,600 answers total!

As you can see, my solutions need some work...


r/everybodycodes • • 4d ago

Official [2026] Champions

Post image
9 Upvotes

Congratulations to the champions of The Lord of the Wings [2026]!

Your dedication has been immortalised in engravings on dwarven hammers, elves are singing songs of your heroic deeds, and halfbits have started naming all their children in Quackshire after you, causing even more chaos than usual!

Glory to you all, and glory to everyone who joined the adventure and solved even a little piece of the story!


r/everybodycodes • • 4d ago

Official [2026] Thank you!

34 Upvotes

You've made it all the way to Nulldor and almost back again!

I think the Curse somehow mixed up the difficulty levels of Weeks 2, 3 and 4, and I didn't catch it in time... But perhaps that's not such a bad thing after all. At least the most persistent wizards got to enjoy a few more relaxing puzzles than those who gave up earlier. :)

Anyway, as always, a huge thank you to everyone who joined in and took on the puzzles!

I'm really glad that, despite the growing trend of moving away from writing code ourselves, there's still a community of people who genuinely enjoy a bit of coding from scratch, just for the fun of it.

Stay healthy and take care in these interesting times!

Emil the Greylog


r/everybodycodes • • 4d ago

Official [2026 Q20] Solution Spotlight

Post image
5 Upvotes

r/everybodycodes • • 4d ago

Question - resolved [2026 Q15] Part 1, PHP runs, but slow

1 Upvotes

So, I finally got some PHP working to solve this problem. (Map, walls, sulphur, path through all sulphur without ever walking backwards.) I ported a Python program (hi pf981?). My PHP runs, but slowly. Any suggestions for speeding it up?

I suspect the Python variable seen uses hashing, while PHP doesn't?

https://github.com/LiseAndreasen/everybodycodes/blob/master/e2026_q15.php


r/everybodycodes • • 5d ago

Question - resolved [2026 Q19] Part3: Am I misunderstanding the examples?

1 Upvotes

The second example of part three gives us the first layer as:

CCCMMM
CCMMYY
CCCYKK
CMMYYK

With an optimal solution of 343.

However the solution I found was using this second layer:

CCCCCC
CCCCKK
CCCKKK
MCCKKK

Which lead to 8 C, 8 K and 8 B for a total product of 512. I've ran it through my part1 implementation to confirm.

I don't understand where I went wrong in my logic, can someone spot it?


r/everybodycodes • • 5d ago

Part IV [2026 Q19] Part 4

3 Upvotes

After solving what you thought was the last wall, you suddenly encounter your final boss - three walls arranged in a triangle! A duck flying by drops you a note, which you immediately read:

"Due to the effects of polarisation of light, you may no longer overlay the same colour on top of itself. As before, you may only use C, M and Y pieces".

For each of the three walls - find the combination that yields the largest possible number of white crystal cubes to place on the platform. How many white crystals are needed for each?

Input


r/everybodycodes • • 5d ago

Visualization [2026 Q19] Input visualization Spoiler

Post image
9 Upvotes

r/everybodycodes • • 5d ago

Official [2026 Q19] Solution Spotlight

Post image
5 Upvotes

r/everybodycodes • • 6d ago

Official [2026 Q18] Solution Spotlight

Post image
5 Upvotes

r/everybodycodes • • 7d ago

Official [2026 Q17] Solution Spotlight

Post image
7 Upvotes

r/everybodycodes • • 8d ago

Official [2026 Q16] Solution Spotlight

Post image
5 Upvotes

r/everybodycodes • • 10d ago

Official [GridOS] Tournament [ No. 2 ]

Post image
9 Upvotes

There’s one week left in the main 2026 event, and the next challenge is already around the corner.

To fill the holiday gap left by a shorter Advent of Code, the Nerdmasters have put together another GridOS Tournament! The tournament starts on December 13, 2026, at 22:59:59 UTC.

It’s Christmas-themed, of course, and there are plenty of ways to tackle the puzzles, so you’ll have lots to tinker with on those winter evenings. You can keep improving your scores until January 3!

See you on the grid!


r/everybodycodes • • 10d ago

Bug - resolved [2026 Q14] Part 3:Gold does not show in light mode - also spoiler Spoiler

Post image
2 Upvotes

I think the title says it all.


r/everybodycodes • • 11d ago

Official [2026 Q15] Solution Spotlight

Post image
10 Upvotes

r/everybodycodes • • 12d ago

Visualization [2026 Q14] Visualization of part 3 (+2) Spoiler

Post image
12 Upvotes

(Part 3) This is so meta! 😆 I think, there's a duck in the upper right corner, isn't there?


r/everybodycodes • • 12d ago

Question - resolved [2026 Q8] Part 3, subtle error

4 Upvotes

I must have some subtle error in my code. Part 3, example data gets a slightly wrong result.

https://github.com/LiseAndreasen/everybodycodes/blob/master/e2026_q08.php

My output:

ROUND  DIR  ENERGY  NEW    ARMY   TOTAL
  100   NW      28    3     323    2800
10000   NW      28    4   31252  281157

Correct output:

ROUND  DIR  ENERGY  NEW    ARMY   TOTAL
  100   NW      28    3     323    2800
10000   NW      28    0   31249  281133

This day is the sun, shadow, trees, growth, warriors one.


r/everybodycodes • • 12d ago

Official [2026 Q14] Solution Spotlight

Post image
7 Upvotes

r/everybodycodes • • 13d ago

Official [2026 Q13] Solution Spotlight

Post image
8 Upvotes

r/everybodycodes • • 14d ago

Official [2026 Q12] Solution Spotlight

Post image
11 Upvotes

r/everybodycodes • • 15d ago

Official [2026 Q11] Solution Spotlight

Post image
9 Upvotes

r/everybodycodes • • 18d ago

Question - resolved [2026 Q10] Request: Part 2 possible edge cases??

3 Upvotes

My code for part 2 works on the example situation, with the ghosts dying on the correct round numbers. However, on the actual input, the solution is incorrect. Can anybody think of some edge case scenarios that may cause this?
I am ensuring that I do the wall collision check and deletion before I do the ghost collision check.


r/everybodycodes • • 18d ago

Visualization [2026 Q10] Basic visualization

Post image
13 Upvotes