[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: 1752332227342395.jpg (691 KB, 1408x768)
691 KB
691 KB JPG
The Morning After Edition.

>Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like. People use them as a speed contest, interview prep, company training, university coursework, practice problems, or to challenge each other.
https://adventofcode.com/

/g/ leaderboard join code:
224303-2c132471
anonymous-only leaderboard:
383378-dd1e2041

See also: https://obonofcode.com/ (Summer 2026)

Previous thread: >>107515633
>>
File: calendar.png (3.25 MB, 9777x3472)
3.25 MB
3.25 MB PNG
official /aocg/ calendar
>>
>>107523907
eric has lost the magic
>>
we could have ended /aocg/ on a high note in 2024. Instead we got this. What a joke.
>>
what a letdown
naive solution that avoided the problem was sufficient and there was no part 2
>>
Man I'm so mad that this puzzle was easy. I'm crashing out. I'm experiencing gamer rage.
>>
File: 1746936943156824.png (372 KB, 1272x1562)
372 KB
372 KB PNG
I can't believe this worked. I though eliminating obvious cases before actually trying to fit shapes - which I have no idea how to do - and just entered the value as a meme. And I got the star lmao. This would've filtered me for sure if inputs were actually challenging. Spent more time in parsing then writing the solution.
>>
File: whoville2.gif (407 KB, 500x369)
407 KB
407 KB GIF
>https://files.catbox.moe/3z365u.mp4
God bless us, everyone!
>>
>>107523907
To the anon making obonofcode. Try your best to make it AI resistant so it at least can't one shot it, but you'd need to work through step by step with AI to solve.

I think AoC is dead after this year anyway.
>>
Verbose sol'n.
>>
>>107523907
kek I'm enjoying the ai slop. artists btfo. also the last question was based.
>>
I might've liked this problem more if there wasn't a genuinely NP-hard problem that was actually real and didn't have any trick to it just two days ago
I'm coming into today's problem thinking that I really do need to solve it as described but then it ends up being a quirk-of-the-input day (a quirk that the example doesn't include btw)
there's no moment where I think "but eric wouldn't REALLY expect me to solve this, right? I'd better take a look at my input very closely to be sure" if that exact thought led nowhere just two days prior
instead, I randomly stumble upon it when halfway through writing a pruning DP recursive who-cares algorithm, and I have to trash the whole thing for the quick and easy five line solution
my work feels unfinished, like I cheated or gave up and imported solution
>>
>>107524021
this, AI OC is better than no OC
>>
>>107524026
my thoughts as well. If I wasn't pseudo-filtered from the "import z3" day I wouldn't even have considered trying to solve this for real, especially next to the rest of the puzzles this year. I guess I thought he would give us 2 hard puzzles rather than 1, silly me.
>>
>>107524026
>anti-import cels seething
based eric
>>
>>107523955
I'll do a proper solver later today, just out of spite
>>
>>107524059
part 2: sum the minimum area you can fit each set of blocks into.
>>
>>107524059
wdym proper? I knew tiling was a NP hard problem but I was still trying to make something work. fuck you eric, again
>>
> only 22 hours to go

HOLD THE LINE
>>
pythiomatic python solution

print(
sum(
int.__mul__(*map(int, region[:-1].split("x")))
>= 9 * sum(map(int, present_counts))
for region, *present_counts in map(
str.split, open(0).read().strip().split("\n\n")[-1].splitlines()
)
)
)


>>107523914
you do good anon <3

missing c23 anon :<
>>
>>107524070
it might be NP-hard but pretty small inputs.
oth those that can pass have so much spare space that I think anything will find one solution quickly.
so I dont really know what to solve.
>>
>>107524095(Me)
pythiomatic python solution: hacker's edition

print(
eval(
"("
+ open(0)
.read()
.strip()
.split("\n\n")[-1]
.replace("\n", ")+(")
.replace("x", "*")
.replace(": ", "//9>=")
.replace(" ", "+")
+ ")"
)
)
>>
are you shitting me? there's really no case where sizes fit total but can't be stacked properly?

i guess it's supposed to be a split challenge so you can play with constraint solving if you want more but still it's weird
>>
>>107524152
lol
>>
>>107524152
holy based
>>
File: sadcowboy.jpg (7 KB, 220x229)
7 KB
7 KB JPG
>over already
Shit. I'm gonna miss you guys. I look forward to these threads all year long. It's the only time the actual, genuine programmers on /g/ congregate.
>>
>>107524152
Rustroons real quiet after this dropped
>>
>>107524157
>are you shitting me? there's really no case where sizes fit total but can't be stacked properly?
don't even have to do that, can just go full retard and count whether the sum of all of the points needed between all of the shapes is greater than or equal to the area. fails the test case but clears the input
>>
File: drink.jpg (15 KB, 480x360)
15 KB
15 KB JPG
So, now what do I do? Leetcode daily problems? Old AoC events? An actual, honest-to-God programming project, not just toy puzzle programs?
>>
File: I_KNEEL.png (403 KB, 600x906)
403 KB
403 KB PNG
>>107524152
>>
File: weredone.png (583 KB, 1080x607)
583 KB
583 KB PNG
>>107524212
day 13 tomorrow, of course.
>>
>>107524212
look forward to this anon's project ig https://obonofcode.com
other than that, https://atcoder.jp/contests/ beginner contests have a fixed schedule on saturday.
programming project would be nice too. I can just never get to old aoc problems. they feel out of season
>>
going to enjoy getting a full night's sleep for once
>>
>>107524212
dbpro.app/advent-of-sql

learn sql
>>
>no maze
>no recursive parsing
>no image creation/finding
>no reverse engineering
>no language interpreting
>no cellular automata
>>
>>107524013
>make it AI resistant
hide the niggerword throughout your text and ai will refuse to process it
>>
>>107524195
Yeah same, these threads are the only evidence I've seen in a long time of /g/ users having any level of technical knowledge or ability at all.
>>
>>107524259
image creation puzzles are inaccessible for blind programmers, please understand
>>
File: seethe level, maximum.jpg (107 KB, 636x800)
107 KB
107 KB JPG
shant do day 10
shant do day 12
shall send hatemail to eric
>>
File: fuck you eric.png (94 KB, 800x540)
94 KB
94 KB PNG
BORING
>>
>>107523907
what are you making these with sloppa-anon
>>
AND WE END WITH A FUCKING HOW MANY BUCKETS DO YOU HAVE PUZZLE!
THANK YOU ERIC FOR RUINING CHRISTMAS YET AGAIN!
This was the buckiest year of all years.
>>
File: carbon.png (154 KB, 598x1052)
154 KB
154 KB PNG
ERIC YOU FUCK holy FUCKING SHIT

Day   -Part 1-   -Part 2-
12 02:17:54 02:18:08


>realize it's an Algorithm X/dancing links thing
>spend like an hour trying to see if there's some library to import solution
>yes but only in the depths of python dependency hell
>okay fuck it I'll write my own
>spend another hour studying the algorithm
>start to write it
>wait, before I do, let's see how many lines I can just skip
>just sum the raw tile count and see if any are too big for the box
>pretty sure every line would pass
>it would be stupid to leave any in the input that were obviously too big, right?
>run code
>476? wtf?
>try submitting it
>That's the right answer!
>WHAT
>Okay so what's part 2?
>there is no part 2
ERIC
Eric you nigger
I'm so fucking pissed
>>
>>107524293
I'm so sorry, Anon
>>
>>107524152(Me)
pythiomatic python solution: trans edition
print(
eval(
"("
+ open(0)
.read()
.strip()
.split("\n\n")[-1]
.replace("\n", ")+(")
.replace(":", "//9>=")
.translate(str.maketrans("x ", "*+"))
+ ")"
)
)


>>107524196
>>
Eric, you're a madlad. I love you man. What you managed to pull on us on the last day is incredible. I don't remember the last time I laughed so hard and was so happy at making something work in a long time. You've actually made me belly laugh. Thank you. Truly thank you, what a fantastic way celebrate 10 years of AoC, what a way to go. I can't stop saying thank you, because the joy your work brings, and the absolute troll today, it's phenomenal. Marry Christmas, and a Happy New Year! Stay safe, everyone.
>>
>>107524322
reddit post
>>
>>107524322
holy shit lynch all redditors for real
>>
>>107524326
4chan post: >>107524333
>>
>>107524333
holy shit is this a recursive dp
>>
File: 1719450042673550.jpg (51 KB, 1032x774)
51 KB
51 KB JPG
>>107524333
>>
>>107524333
hahaha
>>
>>107524333
checked
>>
How long would it take to check every possible arrangement in every possible location?
>>
>>107524333
>and trips on top of it
holy based it's a christmas miracle
>>
>>107524365
a long time. Hope this helps!
>>
>>107524377
Hmmm, sounds painful.
>>
>>107524365
largest grid size is 50x50
there's around 200 boxes per line on average

worst case scenario (if all the boxes were 1x1 tiles) each box would have (50x50) = 2500 valid positions
the second box would have 2499 remaining positions for all the first box's positions, so two boxes make (2500*2499) = 6,247,500 positions
with 200 boxes, there's a total of (comparatively a little less than) 2500^200 positions, which is about ~10^679 possibilities
obviously too many to check each one individually

there's a lot of pruning possible, considering the boxes are closer to a size of 3x3 and won't tile perfectly, and identical box types don't need to be tiled in locations that the previous box type has already tried (because that would be an identical state)
>>
and here I thought we might have an interesting problem... FUCK YOU ERIC YOU FUCKING HACK
>>
>>107524292
kek bucket-broken
>>
>>107524417
What about rotations?
>>
Eric here. You tards spent more hours trying to rotate and place shapes?! Get rekted chuds! HAHAHAHA. Merry Christmas you filthy animals!
>>
i think tomorrow will be the great filter day, things usually pick up after the first half of calendar
>>
>>107523428
>solve eric's puzzles and give us the solutions
>do it in RTL so we can use your work for publications or other bullshit
no fucking thank you, jane street. my day time job is RTL, I'm not doing AoC in RTL as well. That wouldn't help me do anything but waste time implementing solutions that should never be done in RTL
>>
>>107524481
trvke
>>
Did anyone actually write a full backtracking broot, but with the dumb checks to skip it when you get lucky (if enough 3x3 tiles, say yes, if not enough 1x1 units, say no)?
Or did everyone just assert (or hope) that those conditions are enough?
>>
File: 1758372529572652.png (1.78 MB, 905x907)
1.78 MB
1.78 MB PNG
>>
File: 55123.png (32 KB, 678x288)
32 KB
32 KB PNG
thoughts on this shape?
>>
>>107524505
completely normal if you look at previous years
>>
>>107524505
>more day 11 golds than day 10 golds
uh oh filty
>>
>>107524505
what size grid does this fit into?
>>
Would anyone happened to have a big zip of every bigboy? I wanna go back and do them optiomally.
>>
File: 1762449550268313.png (30 KB, 375x97)
30 KB
30 KB PNG
>>107524531
my sophisticated move elements around in ms paint algorithm found this 40x5 solution
>>
>>107524533
https://github.com/Error916/Aoc2025
>>
>>107524569
>day1.7z
>day2.7z
>day3.7z
>day4.7z
>day5.7z
>day6.7z
>day7.7z
>day8.7z
>day9.7z
>>
>>107524598
Cluster virus.
>>
1
>>107394076
>>107394087

2
>>107408306
>>107408317

3
>>107425550
>>107425561

4
>>107439676
>>107439688

5
>>107450786
>>107450806
>>
6
>>107464449
>>107464456

7
>>107474326
>>107474337

8
>>107487388
>>107487394

9
>>107499472
>>107499480

10
>>107511949
>>107511958
>>
>>107524212
>Old AoC events?
Literally every AoC year is significantly higher-quality than this one.
Also Everybody Codes. I hope the theme next year is something a little less gay than dragonducks.
>>
AOC flavor of C++23:
#include "aoc.h"
MAIN
p1 = +((in / "\n\n").back() / '\n' * λx(
*((x | ": ").h / 'x' * λx(+x)) >= +((x | ": ").t / ' ' * λx(+x * 9))
));
END
>>
>>107524689
Gay spiral dick dragonduck rape could have been a fun puzzle backdrop, though.
>>
File: day2025real.png (3.31 MB, 1494x5070)
3.31 MB
3.31 MB PNG
I made an actual solution to the problem that uses a SAT solver to see if a placement is feasible or not because the solution felt unsatisfying.

The idea is every possible placement (top left corner) per rotation per piece is a boolean (~60k). Then for each spot add a constraint that the sum of booleans (placements) that cover that position is at most 1. And another constraint that for the sum of booleans (placements) per piece type is equal to exactly the required amount

``` python d12.py 2235.57s user 55.69s system 159% cpu 23:58.30 total ```

>>107524322
Go Fuck Yourself
>>
>>107524753
>import solution
you did not solve it
>>
>>107524663
>>107524668
christmas saved, come back with last two days draw anon
>>
File: 1536195029090.jpg (44 KB, 542x537)
44 KB
44 KB JPG
>>107524753
>```
>>
>>107524753
pretty cool. I also thought of posing it as a BSAT problem but I did not have much experience with it. I also thought of flattening the grid as a bitmask (int) and then turning presents into bitmasks too. then shift the presents and bitwise or with grid if no common bits for that shift.
>>
so eric gave an example where just checking if the number of tiles is less than the dimensions doesn't work, but then that's what he expects us to do
>>
>>107524533
https://0x0.st/KC22.tar.zstd
>>
File: out.png (177 KB, 2969x1805)
177 KB
177 KB PNG
I did not enjoy this year
>>
File: file.png (1.43 MB, 4005x3298)
1.43 MB
1.43 MB PNG
>>107524790
problem?
>>
>>107524790
bravo eric
>>
>>107524794
>.ztsd
nice virus
>>
>>107524790
This isn't the first time where solving the examples is considerably harder than the real input, but it's an uncommon pattern that I wasn't expecting on the last day at all.
>>
>>107524785
I considered the bitmask solution too, but back of the envelope even the last example is on the order of 10^12 permutations, checking each one (like backtracking), 10^6 ops checks per second still takes like 10 days

It is kind of import solution but modeling it as a SAT problem in a solver is actually pretty intuitive and the docs are good, I used CP SAT which does make it pretty easy

>>107524761
Sorry for not solving it in my own custom language
>>
>>107524850
usually when he does it, you can look at the inputs and realize it's a specific case like a dag or whatever, in this case there is no way you can "prove" that the heuristic works because nothing is obvious
>>
>if a grid doesn't have enough squares for the contents of all presents, reject it
>if a grid is large enough to fit all presents without overlap, accept it
>there is nothing left over that is not one of these in the real input
Is that all?
>>
>>107524070
You can actually solve it for real with constraint programming. I finished writing it then came here only to find out that you can do a dumb retarded solution. Very cool. It takes a few minutes per region.
I don't know why he didn't just make us do the actual problem but make the inputs such that they could all be solved in around an hour instead of 1.5 days.
>>
>>107524800
tried to make it edit trollface onto the eric picture, this shit is demonic
>>
>>107524984
As much as I hate low effort AI shit, I miss the edits of Eric's face, especially AI videos.

Last year there was this edit of Eric jumping into a bunch of big titty black gfs and laughing at the viewer that I enjoyed.
>>
File: file.png (38 KB, 648x597)
38 KB
38 KB PNG
this is so coal
>>
File: SPOILER_image.png (164 KB, 1718x358)
164 KB
164 KB PNG
>>
>>107525091
import solution niggers BTFO
>>
>>107525091
He should've made more interesting puzzles worth solving
>>
>>107525091
kek
>>
>>107525091
does he know that the whole point of csp solvers is to speed up broots?
>>
File: file.png (61 KB, 333x340)
61 KB
61 KB PNG
>>107525091
um its different because uhh uhhhh it just is
>>
>>107525091
If you don't do these on pencil+paper you personally made from a tree you cut down using tools you fashioned by banging rocks together, you didn't solve the puzzle
>>
>elves are rushing to put presents under the tree
>almost two weeks before Christmas
hmmmmm
>>
>>107525150
there is literally no way Eric knows what integer programming is if he doesn't know the chinese remainder theorem
>>
>day 12
>Elapsed: 93.460545191s
>You got a gold star!

fear my bruting powers, eric
>>
>>107525151
he's not even trying anymore
>>
>>107525091
> solve Ax = b
> positive integer solutions only
> u cant use an ILP
I hope the gasline to your house blows up
>>
>>107525174
wait I could have just summed the tiles up? FUCK YOU eric I actually went through my input and modified it to get an easier solution to just brute place into each grid
>>
I'm glad I spoiled it by reading the thread.
I like to make sure I have the example working before I even touch the input file and in this case the example did require more than just adding up the size of the presents.
So basically if I hadn't read the thread I'd be working on this for hours feeling like a retard for not being able to figure it out while everyone else gets their stars.
Not cool eric.
>>
>>107525196
filtered
>>
> read day 12
> wtf, how do I even approach it
> check if all trees can potentially have all listed presents, like if all # can fit without accounting for shape
> they don't
> check how many can to start with this number
> try to enter it as an answer just in case
> mfw it is the right answer
Ok, this was funny. But how do I solve it in a legit way?
>>
File: asmlets BTFO.png (125 KB, 1515x322)
125 KB
125 KB PNG
>>107525091
Why did you edit the original?
>>
>>107525357
>advent of *code*
>>
>>107525369
Assembly *code*. Original *coders* used punch cards, and quite honesty if you need more you're effectively cheating.
>>
>>107525379
Original programmers were women.
>>
>>107524013
Why bother? If you don't want AI just don't use it?
>>
>>107525397
Original COMPUTERS were women.
Programmers were men.
>>
>>107525091
nice discord filename, faggot
>>
>>107525451
Takes one to know one. I'm so straight I don't even know what you mean
>>
File: 1762756283357137.jpg (385 KB, 1500x1384)
385 KB
385 KB JPG
>>107525348
I don't know what the "legit" answer is but I didn't do it that way and got a pseudo algorithm. If you want a "real" algorithm look up NFP and Irregular 2D Packing. After a bunch of research I decided it was too much work so tried a naive solution and got it.

I ended up editing my input data after noticing some patterns. My starting shapes were:
0:  1:  2:  3:  4:  5:
### ##. ### ### ### ..#
### .## ..# .#. ##. .##
..# ### ### ### #.. ##.

(these blocks might be fucked, kind of guessed the spacing, but you get the idea)
Noticing that some of the shapes fit together nicely I created some new shapes:
0,1: 2,2: 3,3:  4,5:
### .### .#.# ####
### #### .### ####
### #### #### .###
.## ###. ###.
### #.#.

where the new shapes are combinations of the base shapes. These ones tend to be more efficient for packing, so then it's just a matter of counting each shape as incrementing the base shapes one each (or twice in the case of 2,2 and 3,3). My packing algorithm was dead simple, just pick the top left spot in the grid that it can be placed, weighted top over left. In terms of what shapes, it prioritized by absolute bounding box first (something I picked up from reading a paper about 2d packing) and places as many as it can/needs to then just moves down. It takes about ~2 seconds to run but I'm proud of my spaghetti nonetheless. NFP would have involved figuring out the optimal spot for each shape in each iteration so I just opted to brute force the location by iterating location per location until an open spot was found. As it turns out, rotations are completely irrelevant when you do it this way, I made some code to calculate rotations and never even used it - rotating the shapes to create the new more efficient ones was all that was necessary. Any stragglers not picked up by a multi shape ended up just getting placed without rotation or thought and it still worked.
>>
>>107525300
i gave up within 10 minutes of reading it
good thing im so lazy or i might have wasted time on this nonsense
>>
>>107525348
>how do I solve it in a legit way?
Write a backtracing brute that just tries every combination
But before calling it, check some simple cases if it is certainly possible or certainly impossible.
The example will call the brute, the actual inputs won't.
>>
>>107525091
import solution cucks eternally BTFO
>>
File: file.png (180 KB, 1225x1230)
180 KB
180 KB PNG
I don't want to admit it but I think d10 has filtered me
>>
>>107525640
>When I was a child, I used to speak like a child, think like a child, reason like a child; when I became a man, I did away with childish things.
>>
>>107525678
what
>>
File: you.png (394 KB, 720x720)
394 KB
394 KB PNG
>>107525694
>>
File: aoc2025-12.png (153 KB, 554x987)
153 KB
153 KB PNG
Sneaky sneaky
I spent an hour and a half thinking about ways to approach this. Then I noticed two lines in my input which had basically the same region size, but one had a way higher present count
Uh, Merry Christmas everyone
>>
>very slow on sample input
>very fast on real input
why have you done this, eric?
>>
>>107525743
you're almost there. think dumber not harder.
>>
>>107525743
my code doesnt even work for the sample input but it works for the real one
>>
>>107524455
your butthole is unprotected
>>
What language should I learn? I used to use Crystal, but development on that language is dead.
>>
File: IMG_7175.jpg (127 KB, 800x600)
127 KB
127 KB JPG
We should all do a previous year together now. As long as we agree on a year, it won’t feel stale and lonely.
Who’s with me?
>>
>>107525875
Rust of course
>>
>>107525893
I am
>>
>>107525707
Im using all the colors
>>
>>107525893
but we already did those
>>
Intended solution
>>
well now that this shit is over I will now check the new warframe update
>>
the year of np complete problems
>>
>>107525893
I am. in for anything pre 2020.

>>107525875
try zig

>>107525640
anon see that smart redditor's solution and impl it. 12th day is still not over yet
>>
>>107526208
>try zig
Can Zig look elegant?
>>
I had the idea last night to try something like simulated annealing. Randomly place pieces, consider overlaps as high energy, do Monte Carlo simulation to lower total energy, see if you get into a totally valid state. Dunno if it would be efficient enough. In the cold light of day, I don’t know if I have the motivation to implement it. I just feel hollow and empty now that it is all over in mid-December.

I should be making this kind of post on Christmas morning with you fuckers, not a fucking work day.
>>
>>107526215
depends on how you define elegance and whether you give it an honest try. it might not be for everyone and I avoided it for years because how jank its syntax felt. but reading a bit about it started making a lot of sense. and it's definitely not as vast as rust, in which I still haven't gained confidence after years of programming on and off. I tried zig for aoc this year and it was very painless.

>>107526245
tragic indeed, anon. about today's problem, if an arrangement is trivially possible then it will be possible using whatever tiling method you use. because it will never be worse than tiling all presents separately in 3x3 subgrids, unless you deliberately make it. and if it is not trivially possible for a tree/case then it will not be possible using whatever algorithm you use because the grid will not have enough squares that are required for all the presents (you can verify this by just doing h*w >= sum of no. of # in all presents).
so any solution randomized or greedy will not yield any benefit for the given sets of inputs. for more random cases it might lead to nice visualizations but you cannot guarantee optimal packing. check the other anon's bsat solution >>107524753
>>
>>107526108
>problem(s)
>plural
name 12
>>
>>107525893
2019
>>
>>107525893
I did all years except 2020
>>
>>107526334
10,12,10,10,12,10,12,12,12,12,10,10
>>
>>107526245
I've implemented simulated annealing before.
It's powerful at quickly finding a very good arrangement, but is very unreliable at finding the true optimum unless you spend ages fine-tuning it.
It could work, but I feel like it would be littered with incorrect results that just barely don't fit because of bad luck.
>>
This reminds me of Jewish problems https://arxiv.org/abs/1110.1556
Is Eric antisemitic?
>>
>>107526108
>NPC problems
No
>Problems for NPCs
Yes
>>
>>107526351
only 10/p2
>>
>>107526378
both parts are np complete chuddie and today is np complete too
>>
I gave up on day 2
>>
Thanks for another amazing Advent of Code, guys!

If you've added your email to obonofcode.com I'll be sending you updates mid-January!

Can't wait to see you all again soon!
>>
>>107526464
>tranime
no thanks
>>
>>107526500
and yet you slopchuds love making stuff look anime in a last-ditch effort to make it look passable
>>
>>107526500
anime website
>>
>>107526520
I'm not a slopchud though
>>
>>107526528
you are in my headcanon
>>
>>107526372
not with those advertisers
>>
>>107526527
he said 'tranime'. he didn't post Cowbop Bebop or even The Dirty Pair or something, he posted Lucky Star.
>>
File: anime.jpg (116 KB, 550x340)
116 KB
116 KB JPG
>>107526527
>>
>>107524663
>>107524668
will miss you drawanon <3

wish slopanon would make a compilation too. I ignored them at first but they started growing on me. very quirky. would like to how the anon generated them
>>
>>107526527
nope, >>>/a/
>>
>>107525348
My thoughts are to use this solution as part of the broot.

(total area - total #) is your degrees of freedom

then as you broot place the blocks, they will cut off squares and make them inaccessible, reducing the degrees of freedom, and you can prune the whole branch once it goes below 0, which it will very early on in the broot for failed cases.
>>
>>107526387
just shut up, amerifat. you are wrong, accept it
>>
>>107526387
today was indeed no problem complete in 5 minutes.
>>
File: redditwew.png (54 KB, 873x210)
54 KB
54 KB PNG
the most absolute state absolute state post i think i ever seen
fuck this problem, the state space was insane
>>
>>107524333
impressive, very nice
>>
>>107525893
i'm in
>>
>>107526387
day 10 part 1 is bounded by 2 to the power of n (max light states) and the problem is solved by finding the shortest path in an unweighted graph in linear time, not np complete, retard.
>>
it's over
what now
I'm just startic my holidays now btw
>>
>>107526867
part 13 is coming out tomorrow. i have eric tied up in my basement with electrodes on his nips, and if he WILL give me his password to reveal the rest of the puzzles
>>
>>107526867
now you write a real program
>>
>>107527200
A program to do what?

I don’t know how to make things, or even what things to make. I just like puzzles.
>>
>>107527200
but I just came back from work
>>
eric should've quit AOC on 10th anniversary instead of this half-assed attempt at continuity
even one insane puzzle per year would be better
most fun was in the second half, it felt like a chore this year
>>
File: d12.png (90 KB, 838x517)
90 KB
90 KB PNG
k.
>>
>>107527249
>A program to do what?
whatever the hell you want
>>107527262
and now you can program something useful for yourself
>>
>>107527478
post your git
>>
>>107527478
> whatever the hell you want

Yeah, but, like, what do I want? I have no idea. I’m not creative. I will just end up doing nothing because I have no ideas.
>>
>>107527546
rewrite a c/c++ codebase in Rust
>>
>12 hours to day 13

did you ever doubt
>>
File: GE43AKC.jpg (127 KB, 858x950)
127 KB
127 KB JPG
Solving day 12
>>
>>107525640
Day 10 was stupid. It was literally all "meh too easy" and then they throw a "fuck you, linear programming, nigger" filter on day 10.
>>
does anyone else have a day 13?
my puzzle won't be ready on the hour, so if someone could post their day 13 and i will post on day 14?
otherwise i will post mine an hour late or so
>>
File: Untitled.png (28 KB, 453x467)
28 KB
28 KB PNG
Lame year, merry Christmas, I guess...
>>
>>107528512
>10 minutes for day 1 p2
Anon, i..
>>
>>107528138
i just won't do day 10, i'm glad p2 got spoiled for me so I can just refuse to do it
>>
>>107528412
I might have something, but I usually only wake up a few hours after the normal time.
>>
>>107528412
i have one but i don't think /g/ is up for it, it's hard
>>
File: instathotzmodeljeetlora.png (474 KB, 2005x893)
474 KB
474 KB PNG
>download instathot jeet z-model lora from civitiai
>download example images for WF
>author has FluxGuidance node, it doesn't make any changes if you use or not
>author made up a schizo negative prompt, he connects it to ConditioningZeroOut node


Why are they are like this?
>>
See you guys next year if this bitter, fun-hating, mindlessly abrasive wasteland of screencapped ragebait from other social media sites is still limping along by then. Merry Christmas!
>>
>>107527546
just make a game and render using your favorite terminal emulator and a nice font.
>>
>>107528581
where is yours?
>>
see you next year
>>
im not leaving
>>
File: 45345243423.png (6 KB, 60x60)
6 KB
6 KB PNG
Anyone is interested in/tried out everybody(.)codes? Someone shilled it in the AoC threads this year. Since AoC is only 12 days now, I think I might try it next year, it begins in November.
>>
can someone generate me an elf picture to post along with my bonus puzzle?
if possible an elf holding cubes numbered 1-4
>>
>>107528904
do the ones from this year
>>
>>107528695
Man, I’ve been trying and failing to make gaem for years. I have no ideas and can’t into art.
>>
>>107528725
in yer mum
>>
File: aoc-day-12-sloppa-2.jpg (1.08 MB, 1408x768)
1.08 MB
1.08 MB JPG
Daily sloppa

>>107524279
>>107526645
I used Nano banana pro. https://gemini.google/overview/image-generation/ It really didn't take much from me, it's pretty smart.

If thread is still up when I'm done with work I'll post compilation links
>>
>>107529102
can you make me slop? >>107528920
>>
>>107528904
I checked out day 1 a while ago but I'm severely allergic to AI prose
I don't even care if they use AI for anything else but I don't want to read LLM fiction
>>
>>107529088
>he can't btfo my casual times
Pajeet, I....
>>
File: 1764524929691031.jpg (663 KB, 1408x768)
663 KB
663 KB JPG
>>107529122
>>
>>107529253
many thanks, anon
>>
>she doesn't have all stars from all years yet
Get to work
https://adventofcode.com/2015/day/1
>>
>>107528904
i didn't do everybody codes; i'll try to do all of their available puzzles before Christmas
>>
File: 1745110854719708.png (1.53 MB, 903x906)
1.53 MB
1.53 MB PNG
>>107529122
>>
File: file.png (42 KB, 1200x1200)
42 KB
42 KB PNG
>>107523907
Missed last night because I was kinda tuckered out after Geoffslop. Working on day 12 now
>>
>>107526736
that's literally what np complete means retard, p means polynomial time, nothing about 2^n is polynomial. also finding the shortest path is not always a polynomial problem, check https://en.wikipedia.org/wiki/Shortest_path_problem#Paths_with_constraints
>>
>>107529307
cheers

i'll have like 30 minutes when i wake up to check the input and answer
see you tomorrow, unless the yookay gov blocks 4chan overnight
>>
File: file.png (41 KB, 1200x1200)
41 KB
41 KB PNG
>>
>>107529102
These are great
>>
I'm gonna make my own AoC! With Blackjack and hookers!
>>
Started late on day 2 and day 8. Other than that, this year was probably the easiest AoC of all time. Only problem I found challenging was day 10 part 2, but that too I was able to solve using scipy pretty easily.
>>
>>107528904
I did it, it was way better than whatever eric spat out this year
>>
File: IMG_8830.jpg (67 KB, 585x198)
67 KB
67 KB JPG
>>107529360
>>
Congrats to everyone who finished.

Sadly on day 10 my 98 years old grandfather had an episode and it felt to me to accompany him during nights at the hospital. So that was the end of this year's AOC for me. At least he was already discharged without any serious health issue besides his age.
>>
>>107528130
This is great.
>>
>>107529330
>>107529360
>>107529102
Best part of this thread.

Merry Christmas, everyone! Hope to catch you all this summer, and will def catch you next year!
>>
>>107529292
I'm a 524 starer, I can't cope with a bad aoc year by solving a different one instead unfortunately
>>
>>107529330
>>107529360
SOUL
>>
>>107529459
https://everybody.codes/
>>
File: tjsj0iiwm1971.jpg (52 KB, 640x624)
52 KB
52 KB JPG
>>107529438
You had hospital waiting room downtime. Filtered
>>
i wasted over 6 hours in total solving day 9 part 2.
i got the correct answer 3 separate times.

my area function was wrong
my area function was wrong
my area function was wrong
my area function was wrong
my area function was wrong
FUCK
>>
>>107529505
>abs(x - y + 1)
>>
>>107529335
FINDING
THE
SHORTEST
PATH
IN
AN
UNWEIGHTED
GRAPH
IS
NOT
NP
COMPLETE
>>
>>107529451
>>107529360
>>107529330
>>107529102
>>107529253
yay merry christmas art anons! thanks for the memes see you next year!
>>
>>107529525
it isn't, it's polynomial in the number of edges and vertices, which guess what, it's exponential
>>
>>107529512
just call me a faggot
it hurts less
>>
>>107529555
ur a faget
>>
>>107529545
you should make a thread on /sci/ with your new findings, anon.
>>
>>107529505
mine was too, anon. mine was too...
>>
>>107529525
It is when the size of the graph is exponential in the size of the input
>>
>>107529598
i don't even know if this is bait or mental retardation
https://cstheory.stackexchange.com/a/10402
finding if a solution exists to the problem is O(N^3), finding the smallest solution is O(2^N), which can be reduced to a SAT problem which puts it in NP-complete.
by your logic, every single problem is P because you can solve it with a BFS/Dijkstra on all the possible states
>>
>>107529627
which only applies to part 2
>>
File: file.png (42 KB, 1200x1200)
42 KB
42 KB PNG
One more star
>>
>>107529651
https://math.stackexchange.com/questions/3228355/finding-short-vectors-in-mboxgf2
ok, found it for you, you can go read it later
>>
>>107529662
no, i don't think i will pollute my head with whatever jew maths you study
>>
Can anyone reupload all of drawanon's drawings this year? I want to save them.
>>
File: cat.jpg (127 KB, 1024x999)
127 KB
127 KB JPG
>day10 part 2
make it stop
>>
>>107529330
>>107529360
>>107529659
Love you anon! Hope to see you again next year!! <3

>>107529737
see >107524663 and >107524668
>>
File: irs.jpg (186 KB, 1920x1080)
186 KB
186 KB JPG
>day 10 part 2
>spend the better part of a full day fucking around and trying different solutions
>do some research, find and implement Gaussian Reduction with backtracking to solve the system of equations
>turns out a lot of them have free variables which, surprise surprise, is an lp problem
>Eric: if u use a lp lib you didn't beat the game
fuck you I got my star
>>
Was going to try redrawing the calendar, but I'm a little too gassed for that, so I'm happy with calling it here. I'll whip up a catbox in a sec
>>
File: file.png (48 KB, 1200x1200)
48 KB
48 KB PNG
>>107529933
>>
>>107529659
>>107529938
Blessed!
Thank you for 24 elves!
>>
>>107529102
thank you, slop comic anon, looked forward to these everyday
>>
>>107529938
https://catbox.moe/c/rldl38
>>
>>107529938
i feel nothing when I look at your tranime sketches
>>
File: swaprows.png (18 KB, 604x560)
18 KB
18 KB PNG
chat I am getting a 2 in my pivot column during reduction of one of the real inputs and idk what I should do about it since the rest of the row is indivisible
I suppose it is legal to swap columns as it just means swapping the position of two buttons
or maybe I just have to leave it like that

the rest of the code looks like it works on the test cases it just struggles with reducing the real ones
to be fair the more I think about it the more it feels like I dont have to care about it and I can leave it as a 2
>>
File: 1749245523628378.png (50 KB, 863x774)
50 KB
50 KB PNG
After staring at the problem for 40 minutes and getting distracted 5 times, I realized I've officially burned out on AoC now.

It was fun, I wish the contrast between the "easy" and "hard" problems wasn't as stark, or that he could've interleaved them more, put day 9 and 10 on the weekend, make the mondays easier, that sort of thing.
Overall I'm happy that there's less problems now, and that I might actually get through them by the end of the month. That said, what puts me off from doing these in other times of the year is that I really need to ask questions to solve some of these...
>>
File: 1751353432287776.png (12 KB, 239x270)
12 KB
12 KB PNG
>>107530155
It's crazy to think I've been doing these for almost a decade already, but never managed to finish a single year...
>>
>>107530000
>day 10
>holy sovl and bigdigits
>>
>>107529938
I feel nothing but joy when I look at your chranime sketches.
>>
>>107530155
how have you not done 8?
>>
>>107530155
There's still time.
>>
>>107530224
I didn't expect such a hard problem on a monday, by the time I had written the parsing part I had to leave for work, and I didn't get around to it later in the day.
It always happens that the days accumulate and I prefer solving the same problem at the same time as other anons, so I can post my code and discuss solutions. Half of the fun is in that, so going back to old problems always feels like a slog.
>>
>>107530247
fair enough. the keyword is union-find if you change your mind.
>>
>>107530262
Thanks, added it to my notes. it seemed doable, just tedious.
I think the problem that got to me was day 10. I spent the entire evening on that one, and while I found an approximation approach that works on the test input, it doesn't find a solution for most of the lines in the real input (instead returning 0), and nobody in the thread was able to explain their solution to me, so I saved some of anon's non-import solutions for later review...
day 11 I'm sure I can figure out what the optimization is, my brain just hasn't been working since day 10.
>>
>>107530155
>day 8
>day 11 part 2
these should be relatively straightforward, unless you've never done unions or dp before

>day 10 part 2
if you make an entire linear algebra solver for this you're stronger than 98% of the coders in this thread
most of /g/ and almost all of reddit used z3 which is just import solution
there's also that one divide by 2 way that someone on reddit made and then someone on 4chan posted here

>day 12
there is a quirk of the input that makes the problem way easier than what eric is actually asking you to do
>>
I think just the OOB check left to write on my PS2 day 9.
>>
>>107530329
>day 10
Part 1
Pressing a button twice does nothing, so the minimal solution must have each button pressed 0 or 1 times. Try every combination of 0 or 1 presses of each button.

Part 2
Each button is pressed either an even or odd number of times, therefore every solution can be broken down into an even number of presses of each button, plus an extra 0 or 1 presses. If an optimal solution for some value has an even number of presses of each button, then half the number of presses of each button is an optimal solution for half the value. Try every combination of 0 or 1 presses of each button, and if all the remaining values for the targets are even, recurse on half the value.
>>
>>107529938
thank you so much o7
>>
>>107530000
holy kino overload
bless you anon
>>
>>107530329
barely anyone in here groked it but everyone ofc pretends they did. it's not that the solution is necessarily very difficult to implement, it's just highly unlikely that most anons would be familiar with the concepts involved at anything but the highest of levels, the majority of the board going "aha!" is laughable.
>>
>>107530000
did you make one of these last year by any chance?
>>
>>107529659
>>107529938
Merry Christmas, anon! See you next year!
>>
Popping in at the end of the last day for one final reminder: if you'd like to help make puzzles or get reminded, please drop by obonofcode.com!

I'll get started with the puzzles mid-January or so, and I'll also be in the #aocg IRC from time to time. Hope to see you all in the summer before saying hi next Christmas!

Merry Christmas to all of you! You're always the highlight of my holiday!
>>
>>107530727
Yeah, I think the catbox is still alive https://catbox.moe/c/zvkms4
>>
>>107530770
awesome stuff
>>
>>107530160
Nope, not crazy at all. Filtered once, filtered always, filtered eternally.
>>
>>107530828
I bet you felt really good posting that.
>>
>>107530866
Bet you seethed posting yours
>>
>>107530965
bet both of you faggots got massive butt plugs up your asses
>>
>>107530828
>>107530866
>>107530965
What no more December puzzles does to a mf
>>
Now what lmao
>>
File: aoc-day-01-sloppa.jpg (1.04 MB, 1408x768)
1.04 MB
1.04 MB JPG
bonus sloppa: Day 01
>>
Advent of Sloppa Index (Gemini 3 Pro Image Preview)

Day 08 >>107486885
Day 09 >>107497012
Day 10 >>107510101
Day 11 >>107521253
Day 11 Alt >>107520952
Day 12 OP >>107523907
Day 12 >>107529102
Day 01 >>107531411
>>
Day 13 status?
https://poal.me/pw4kr9
>>
In this post, I want to thank Eric, the Advent of Code team, and the entire community.

Last year (2024) was my first year participating, and it turned out to be incredibly inspiring for me. At the time, I had a problem: for some reason I couldn't dedicate enough time to self-learning and working on my pet projects, work felt like it was draining all of my energy. But after almost a month of solving problems every day, I decided that this practice should continue.

Over the course of the entire year, I learned something every single day, solved problems from different areas of computer science, and broadened my horizons. I worked on my pet projects without exceptions, even on weekends. Sometimes it was hard, sometimes easier, but after a year I feel a huge amount of progress, which gives me the motivation to keep going.

As for 2025, I really liked the 12-day format. During this period, you don't have time to get tired, and overall it feels like the contest flies by in one breath. This year had a lot of interesting and great problems.

My favorite was Day 4, I even tried to solve it on the GPU. In the end, the performance was about the same as on the CPU, but maybe I just need to improve my GPU programming skills

The most controversial day for me was probably Day 10. After several hours of struggling with Part 2, I decided to check to see how others solved it, and I was surprised that many people used Z3. For me, it felt like the problem shifted from programming to math, though I might be wrong.

Once again, thanks to the Advent of Code team for the wonderful and inspiring problems, and for the great weeks I got to spend doing what I love. Thanks to the community for all the inspiring visualizations, solutions, and discussions. All of this pushes us to become better and grow.

Thank you all so much, happy holidays, and see you next year!
>>
File: aoc10.png (1.1 MB, 1280x9265)
1.1 MB
1.1 MB PNG
chat it finally worked day 10 part 2 completed
>>
>>107531679
Good job, Anon.
>>
I think I have made a mess of my day 9 ASM solution.
It's getting kinda convoluted and I'm not even keeping track of what's going on.
>>
>>107531602
I appreciate the salt mining. Remarks directed at the redditor OP.

>it felt like the problem shifted from programming to math
Mathlets who are so openly proud about it are such detestable creatures.
>All of this pushes us to become better and grow.
Kill yourself.

>Thank you all so much, happy holidays, and see you next year!
It's Merry Christmas, fuck you.
>>
>>107532283
Jesus wouldn't want you to be so bitter this close to his birthday, anon.
>>
>didn't write a single BFS all year
I feel empty
>>
>>107531602
Holy reddit
And even the spacing matches
Obvious joke post but still
>>
Thinking about it, was Day 12 intended by Eric to be anti-AI? there's no way claude would think (if you can call AI "thinking" lol) of going the easy way out and not actually solving the actual satisfiability problem
>>
>>107532440
this was my initial thought as well, but I don't think it holds because it confuses humans too
>>
>>107532447
*confuses humans who use AI
ftfy
>>
>>107532440
filtering AI on.... the very last puzzle? Doesn't make any sense
>>
File: 5rnslq.png (3 KB, 230x219)
3 KB
3 KB PNG
>>107532423
>>
>>107532064
Are you writing your own hashmap in assembly? I did day 9 in riscv but I already had a hashmap I wrote for 2023
>>
>>107532306
>Defending millenial sop slop.
Here's the link, go be inspired by it.
https://old.reddit.com/r/adventofcode/comments/1pknsnk/thanks/

>>107532423
Sometimes it's hard to distinguish bteween parody, chat gpt, or real reddit, but this is authetic.
>>
Eric tricked us, there's day 13 after all!
https://adventofcode.com/2025/day/13
>>
File: 1646254439200.png (7 KB, 400x400)
7 KB
7 KB PNG
I used all my energy on completing d10 and have no energy for making my sloppy d12 broot smart
>>
File: day09emu.webm (159 KB, 662x583)
159 KB
159 KB WEBM
Turns out if I only try to make rectangles from half the points with my current code, the answer pops out.
So let's just call that pruning and end it there.
>>
File: day09.png (1.32 MB, 2202x3443)
1.32 MB
1.32 MB PNG
>>107532917
I am so done with this.
>>
>>107532917
Nice dude. I love your work. Very impressive
>>
Day 10 was by far my favorite. Part 1 was basic dynamic programming, but part 2 was such a bliss. It unlocked memories of playing with vector spaces in college, which was something I really enjoyed but not really use much anymore. Basically my strategy at first was to expand the set of buttons into component vectors and then compute the decomposition of the joltage vector by them. (Un?)fortunately, since we have more vectors than needed to span the vector space, and since we have a minimization problem, it's just Linear Programming problem and not really linear algebra, so it was solved in a few very satisfying lines of scipy-powered python.

Day 11 was also easy, but it's still fun just because everything with graphs is fun. Please more graphs next years! I love graphs! I don't mind easy problems if they're graph-shaped !

But, honestly, the best part of this whole adventure has been lurking on this sub. It felt good to be a part of a like-minded community and to read all of your quirky (in the most positive sense) approaches, pretty visualizations, and your hilarious memes! I was seriously considering dropping out on the first week and stayed thanks to y'all! Thanks to every poster, commenter and mod <3. And of course, big thanks to Eric Wastl for making this possible !

Merry xmas to all of you!
>>
>>107532917
>>107532937
How do you compile, link, and run this on your hardware?
>>
File: 20251213_123455190.webm (1.4 MB, 853x480)
1.4 MB
1.4 MB WEBM
>>107532937
>>
>>107532917
>>107532937
Based. I don't really have much to add to your posts, but it's impressive that you keep it up.
>>
>>107532806
Holy shit guys there's a day 99 https://adventofcode.com/2025/day/99
>>
>>107532963
hello fellow 172 enjoyer
>>
>>107532970
Day 13 is UP!
https://adventofcode.com/2015/day/13
>>
>>107532952
The assembler I use, naken_asm, handles the assembling and linking. Then I just push the elf over the network with ps2client running on the PS2.
>>
>>107532937
so can that thing import z3 or are you filtered now
>>
Eric Wastl?
More like Eric Washedl
>>
So we're all in agreement that Eric phoned it in this year?
>>
>>107532937
The most annoying part of this, and likely of my own doing, is that with every point you have two values, x and y, and when you have a line you now have four values. And when you want to check an intersection now you have eight values, and I'm trying to shuffle these around in registers and having to remember and check which register has which points x/y value and I probably should have made use of RAM more often.
>>
>>107532988
>read puzzle
>start thinking about edge cases
>get really confused

>look at my solution
>broot every permutation

10 years of aoc has rotted my brain. Just Broot.
>>
Today was ruined for me because this (warning: day 12 spoiler!) post showed up in my feed.

I'm not subbed to here. Reddit's algorithm threw it on my feed because I visited the sub a couple of times.

This year was really fun, but having the last day instantly spoiled kind of left a sour taste in my mouth, because it seems like a really fun day to figure out on your own.

Please, mods, could we enforce more spoiler shielding next year? Some of the memes just spill the tea. Which is fine, but those posts really shouldn't have any chance of appearing on anyone's feed without some guard-clause such as a spoiler tag.

And yes, I know, it's safer to completely stay off Reddit, but I didn't have much time for AoC today. I went to work in the morning, and was just browsing some memes on my way back home from work. I think it's fair that I wasn't expecting to be spoiled by getting the answer shoved in my face.
---
What a fucking faggot.
>>
>>107532998
I suppose I could try writing a z3 implementation in assembly....
>>
>>107533040
>miss showtime
>get filtered
>cry about it
>>
>>107533032
your stack?
>>
>>107533031
Totally. I think an AI generated puzzle could have been better.
>>
File: IMG_5062.jpg (29 KB, 520x476)
29 KB
29 KB JPG
I guess it’s time to go back to a year I haven’t done before and see if I can do it all the way without these threads.
>>
>>107533117
>coming to the thread before you have both stars
filtered
>>
>>107533117
Good luck anon. I already did all the previous years. I guess I will try the weird dragonduck stuff on everybody codes
>>
>>107533040
he's right doe
>>
File: day4.png (92 KB, 1424x922)
92 KB
92 KB PNG
rewrote the ones I used import solution for
>day 4
>>
so there are around 1000 rows
if I guess I have a 0.1% chance of getting the star for free
>>
File: day8.png (132 KB, 1204x1212)
132 KB
132 KB PNG
>>107533211
>day 8
>>
File: IMG_5068.jpg (9 KB, 320x180)
9 KB
9 KB JPG
>>107533123
I’m workin’ on it!
>>
>>107533065
I could have used the stack more, yeah.
There were some subroutines I was pushing register entries into the stack so I could use them again during the subroutine.
But I think I'd really have to throw out most of day 9 (gold) and start again if I was to change my value handling approach.
>>
File: day10.png (238 KB, 1400x1902)
238 KB
238 KB PNG
>>107533218
>day 10
>>
>>107533258
>import cache
>import chain, combinations
>>
i am awake; it is 4:40 AM
i will make instant coffee
i will check my day 13 puzzle
>>
>Computer booted
>Editor open and ready to go.
>Coffee brewing
>Music selected
All right, time to just hang out in the lobby here before the fun begins... ahh, what are we thinking lads? 3D grid day?
>>
14 minutes!
>>
File: aoc25ps2.webm (3.87 MB, 569x320)
3.87 MB
3.87 MB WEBM
Solution supercut.
It shouldn't be too difficult to guess which console I have my eyes on for next year, or at least narrow it down to a handful of contenders.
>>
>>107533366
Anon...
>>
>>107533431
At what point in time does the emulation become pointless? after that console gen its just normal programming right?
>>
5 MINUTES
>>
File: showtime.jpg (46 KB, 640x480)
46 KB
46 KB JPG
https://www.youtube.com/watch?v=hjGZLnja1o8
>>
>>107533040
you can't read the thread/sub/etc before doing the puzzle and then cry about it spoiling shit. that's entirely your own fault for being retarded. have some fucking self control instead of asking for rule changes, good god
>>
File: WALL_INCOMING.jpg (157 KB, 462x260)
157 KB
157 KB JPG
TONIGHT'S THE NIGHT

[spoiler]that i leave this board for a year, see ya next time[/spoiler]
>>
>>107533452
cancer music
>>
>>107533462
>can't spoiler here
man, fuck /g/
>>
>>107533474
now everyone knows that you got filtered
>>
File: 1750590401606228.png (29 KB, 760x117)
29 KB
29 KB PNG
Well, here's my puzzle.
https://harmonic-analysis.neocities.org/

I didn't have anyone else test it so maybe it's wrong, gay, retarded, or much easier than I think it is.
If anything looks wrong then tell me and I'll try to fix it.
>>
> https://adventofcode.com/2025/day/13
> it's real
>>
what the fuck eric this problem doesn't make any sense
>>
>>107533441
What do you mean?
I need the emulator for debugging and shit.
The assembler will happily assemble something that'll crash the console, and I have to work my way through what is going on when it does.
And don't get me started on how PCSX2 will happily read and write from unaligned regions of memory, something the console itself will not allow.
>>
File: bonus.png (1.14 MB, 903x906)
1.14 MB
1.14 MB PNG
Since you have little to do before Christmas, Santa has enlisted your help testing a new puzzle developed by the elves!
The puzzle includes four cubes with a number on each face (your puzzle input).
The instructions read: "stack the cubes so that all four numbers are shown on all four long sides".
An elf hands you a paper slip; she says you can enter a prize draw if you solve the puzzle by tomorrow!
To prove you found a solution, you must multiply together all unused faces, i.e. faces that are not part of any long side in your solution.

    +---+
| E |
+---+---+---+---+
| A | B | C | D |
+---+---+---+---+
| F |
+---+

A B C D E F
-------------------
cube 1: 1 3 4 2 4 3
cube 2: 1 3 2 4 4 2
cube 3: 2 3 2 2 4 1
cube 4: 1 3 2 3 4 1


What's the number to enter the prize draw?

$ echo -n answer | sha256sum
a367613375c7fcd7402955ec5143e208948604a13765c1805450f350ba570d3d
>>
uhhhhh guys, where is part1?
>>
>>107533492
Based. I am worried that this is a mathematically solved one-liner though?
>>
>>107533492
>>107533514
>2 puzzles
uhh we have 13 days lets cool our jets here nobody else post one
>>
>>107533519
>he doesn't have AoC++
filtered
>>
>>107533526
i have to post something for the anon who made the other puzzle
likewise i will be solving his puzzle
>>
>>107533530
I bought the battle pass so I have to do my daily grid quests before I get enough star runes to unlock day 13. I forgot to do the login one on day8 so I'm behind and I'm not paying for tier skips again. eric can fuck off charging 2.99 per part
>>
>>107533514
answer is 1152
>>
>>107533583
correct
>>
The reasoning behind the 12 day change shows Eric is pretty fried as far as AoC goes. The phone in was inevitable. I do have hope that maybe this year will help him rekindle his knack for puzzles and next year’s puzzles will be better.

t. Eric sympathizer. Making puzzles to satisfy 100k+ people seems very hard
>>
>>107533492
i am brooting your puzzle
>>
>>107533492
i got filtered on day 13
>>
>>107533658
>>107533664
Which part?
>>
>>107533664
i think you have to find all numbers which cleanly divide his number-1 into an even number
then your sum of harmonics should be the sum(n/2 for n in even_numbers)
i need to find a nonretarded version

>>107533700
part 1
just waking up with snus now
your puzzle is sparking joy, anon
did you solve mine? >>107533514
i think it's a lot easier; one anon already solved it
>>
>>107533714
>did you solve mine?
I'll do it later today.
>>
File: iqube.png (498 KB, 960x720)
498 KB
498 KB PNG
>>107533514
a bit of lore, this is based on a real puzzle i have
pic not mine, but i have it on my desk
>>
>dead thread
good riddance
>>
>>107533737
but we have two puzzles, anon
>>
>>107533492
I'm trying to do part 2 in a clever math way but haven't cracked it yet. probably should just broot it from my part 1 answer.
>>
>>107533763
I don't get gold stars/ducks for solving them, not interested.
>>
File: 1741084456333608.jpg (273 KB, 1408x768)
273 KB
273 KB JPG
day 13 sloppa
sorry for not including the 2 new puzzles
>>
>>107533492
for part 2 I keep getting 158041299322368 for a string length of 281474976710753, anyone else?
>>
>>107533514
idiotmatic python solution
import hashlib; print(next(filter(lambda t: t[1]=='a367613375c7fcd7402955ec5143e208948604a13765c1805450f350ba570d3d', ((i,hashlib.sha256(str(x).encode('utf-8')).hexdigest()) for i,x in enumerate(range(9999999999999))))))"
(1152, 'a367613375c7fcd7402955ec5143e208948604a13765c1805450f350ba570d3d')
[/spoiler]
>>
>>107533822
>yearly /g/ visits exhausted
I look forward to seeing you next year sloppa anon! I enjoyed your OC
>>
>>107533899
bloody basterd solve it properly
>>
>>107533514
cool puzzle, but your way to verify a solution isn't good enough. You need to encode the stack # of each block for the unused faces as well. As it stands you can just take 4 1's 4 2's 4 3's and 4 4's out of the input set of faces and multiply whats left.
>>
>>107533866
What's your strategy?
>>
>>107533928
cheers anon
i did think about the stack # but you can reorder the stack and the solution is still valid
and i don't think you can ignore duplicate numbers because some cubes have multiple duplicates
>>
>>107533492
yeah, I'm brooting this with hashcat
>>
File: silver.png (14 KB, 415x116)
14 KB
14 KB PNG
>>107533492
aha!
>>
>>107533935
I assume that the maximum value is at the midpoint, and for each harmonic I find the contribution at the midpoint. The direction you pluck shouldn't matter as its symmetrical and you would choose whatever way is positive.
>>
>>107533984
I see. In that case, I have a hint for you.
>That's not the right answer; your answer is too low.
>>
File: misaligned.png (7 KB, 191x282)
7 KB
7 KB PNG
anon your ascii art is misaligned and Christmas is ruined
>>
>>107533492
I think anons will get your P1 if they Sigma grind.
>>
File: 1762670853725811.png (9 KB, 147x282)
9 KB
9 KB PNG
>>107534010
Uhh this has been deboonked.
>>
File: solution.gif (212 KB, 1280x720)
212 KB
212 KB GIF
>>107533950
>and i don't think you can ignore duplicate numbers because some cubes have multiple duplicates

What I mean is, you know the sides of the cube are going to be 1,2,3,4 and the other sides will be the remaining sides no matter what. Here is my 'solution'
>>
>>107533514
This is really cool thanks! D: I think I'm misunderstanding. My logic is the numbers are 1,2,3,4 so in order to have each stack display that you have to stack them on a duplicate side, so it has to be a pair of sides that both have duplicate numbers?
from collections import Counter
data = """
cube 1: 1 3 4 2 4 3
cube 2: 1 3 2 4 4 2
cube 3: 2 3 2 2 4 1
cube 4: 1 3 2 3 4 1
"""
cubes = [[int(x) for x in row.split(":")[1].split()] \
for row in data.strip().splitlines()]
pairs = [[0,2],[1,3],[4,5]]
res = 1
for cube in cubes:
count = Counter(cube)
for i,j in pairs:
if (cube[i] == cube[j] and count[cube[i]] > 2) or \
(count[cube[i]] > 1 and count[cube[j]] > 1):
res *= cube[i]*cube[j]
print(res) # 3456
>>
>>107533899
my solution
async function sha256(message) {
// 1. Encode the message as a Uint8Array (buffer)
const msgBuffer = new TextEncoder().encode(message);

// 2. Hash the message using the SubtleCrypto API
const hashBuffer = await crypto.subtle.digest('SHA-256', msgBuffer);

// 3. Convert the ArrayBuffer to a hexadecimal string
const hashArray = Array.from(new Uint8Array(hashBuffer));
const hashHex = hashArray.map(b => ('00' + b.toString(16)).slice(-2)).join('');

return hashHex;
}
(async () => {
for(i=1;i<=6;i++)for(j=1;j<=6;j++)for(k=1;k<=6;k++)for(l=1;l<=6;l++)for(m=1;m<=6;m++)for(n=1;n<=6;n++)for(o=1;o<=6;o++)for(p=1;p<=6;p++){
ll=[i,j,k,l,m,n,o,p];
v=ll.reduce((a,b)=>a*b,1)
// console.log(v)
h=await sha256(v.toString())
// console.log(h)
if(h=='a367613375c7fcd7402955ec5143e208948604a13765c1805450f350ba570d3d')console.log(v,ll);
}
console.log('done')
})()
>>
>>107534074
oh I see my bug! oops!
>>
>>107534062
ah i see
nonetheless, a solution is a solution

>>107534074
not sure i fully understand your question but i'll try
>you have to stack them on a duplicate side
note most cubes have multiple duplicates
cube 1 has 2 threes and 2 fours
cube 2 has 2 twos and 2 fours
cube 3 has 3 twos
in other words, one cube may contribute the same number to multiple sides
>>
>>107534062
>>107534126
i guess part two can be to print a valid stack in the same ABCDEF format as the input :)
>>
>>107534062
wait isn't cube 4 an illegal configuration? the 1 and 3's aren't opposite sides are they?
>>
>>107534152
Yeah I am still going to solve for real, but I just thought that was funny. What I was originally saying is that I think if the cube number was encoded in the solution it would be harder to cheat that way. You would have to know what cube the extra sides belong to, which would require actually rotating them and solving the puzzle.
>>107534166
The point is it doesn't matter for the purposes of the solution. the 4 long sides will have 4 1's 4 2's 4 3's and 4 4's, and you can just take them out of the input in any order and you will have the remaining sides.
>>
>>107534177
>if the cube number was encoded in the solution
my backtracking found 8 solutions (all variations of one solution)
if i had a site, then i could accept some numeric representation of any of these
>>
>>107534177
nah I mean the actual puzzle is wrong
1 3 2 3 4 1
putting this cube on a 1 or 3 face will never result in the sides having the complete 1-4 correct?
>>
>>107534320
yeah but it doesnt have to, you are looking at each side for all 4 cubes

so if cube 1 is all 1s 2 is all 2s, 3 is all 3s, 4 is all 4s, thats valid.
>>
>>107534320
no, here's a valid configuration:
cube 1: 3 4 2 3 1 4
cube 2: 4 2 3 1 2 4
cube 3: 1 3 4 2 2 2
cube 4: 2 1 1 4 3 3

removing the unused faces:
A B C D
--------
3 4 2 3 ^
4 2 3 1 |
1 3 4 2 | stack upwards
2 1 1 4 |
>>
>>107534380
(i know it's solvable because i'm looking at the physical puzzle on my desk)
see: >>107533736
>>
>>107534365
>>107534380
ohhhh!! thanks!!
>>
>>107533492
I'm pretty sure I've solved this, but it tells me I get the wrong answer for P2... and now you say you haven't tested it, so I'm concerned.
>>
>>107533997
I'm going to have to broot out some test cases tomorrow to see what im missing.
>>
>>107534421
What's your input / answer, and what's your strategy?
>>
>>107534455
First part is the divisor sigma of half the input - 1. For the second part, it should be the sum of the even harmonics (maximum at the center) where the odd harmonics are all 0.

Am I far off? I tried moving off center, and this will always yield a non-optimal result.
>>
>>107534455
not that anon but i'm stuck on p2
input: 281474976710809
largest leftward swing: 6599685338400
largest rightward swing: 152079705624000
>>
>>107534495
>6 to the left
nvm i cannot into reading comprehension
sorry anon, false flag
>>
>>107534507
other anon... yeah I think I may have misread his question too.
>>
>>107534521
out of interest what are you getting for 281474976710825?
after correcting my reading comprehension i get 158679390962400
>>
>>107534553
p1: 277688934184200
p2: 238019086443600
>>
>>107534472
Consider what happens if you have a lot more odd harmonics than even ones. Then you should gain from moving off center, because the odd ones increase more than the even ones decrease.
>>
>>107534614
interesting
should i be taking the contribution of the largest swing at the midpoint, then the second largest swing above the midpoint, then the third largest, and so on?
>>
>>107534614
When I move off the center, by i, the even harmonic drops from the peak by i, and the odd numbered ones should equal i.

Solving symbolically, I get:
238019086443600 - 24 i, where it would be better for i to be zero, that is, stay on the center.
>>
>>107534553
I get your '158679390962400' answer if I take all of the odd harmonics (at their peak) and combining them with the even ones (which at that point will be half strength).

That's worse than staying on the center line though.
>>
>>107534614
i can sort of see how the peak may be off-centre?
       v
2
2|36
2-|-3-6
2|--3--6 <-- elevated
2-3---6
|23----6
3-2-----6 <-- midpoint
3|2----6
3-2---6
3--2|--6
3-2-|-6
32|6
2
^
>>
>>107533431
where is 10, 11 & 12?
>>
>>107533043
you don't need z3, see the rust anon that implemented branch & bound
>>
Who else completely missed Everybody Codes 2025? How popular would an Everybody Codes 2025 general be right now?
>>
>>107534838
this shit screams furry faggotry, mental illness puzzles
>>
>>107534658
>>107534738
For Part 2, what do you guys get for a string of length 1001?
Unless the answer is 728, at y = 333, I did something very wrong with the puzzle.
>>
>>107534838
i completely missed it, but that means i have many extra puzzles to do this month
some anons want to do previous aoc years
some anons want to do everybody codes together
we can probably keep a generic puzzle thread going albeit slowly
>>
>>107534875
i have neither a brute nor a correct solution yet
if you brooted 1001, then surely you know it's correct?
a complete search is complete, after all
>>
>>107534875
I get 936 at the center.
>>
>>107534875
p1 - 1092
p2 - 624 (at the centre)
though i have no faith in my solution
>>
>>107534792
I don't care anymore.
>>
>>107534902
Of course I'm sure it's correct and exhaustive.
But that doesn't mean much.
>>107534912
The contributions at 500 should be
harmonic: 1, amplitude at 500: 0
harmonic: 2, amplitude at 500: 0
harmonic: 4, amplitude at 500: 4
harmonic: 5, amplitude at 500: 0
harmonic: 10, amplitude at 500: 0
harmonic: 20, amplitude at 500: 20
harmonic: 25, amplitude at 500: 0
harmonic: 50, amplitude at 500: 0
harmonic: 100, amplitude at 500: 100
harmonic: 125, amplitude at 500: 0
harmonic: 250, amplitude at 500: 0
harmonic: 500, amplitude at 500: 500

This adds up to 624, matching >>107534934.

At 333, I get
harmonic: 1, amplitude at 333: 1
harmonic: 2, amplitude at 333: 1
harmonic: 4, amplitude at 333: 3
harmonic: 5, amplitude at 333: 3
harmonic: 10, amplitude at 333: 7
harmonic: 20, amplitude at 333: 13
harmonic: 25, amplitude at 333: 17
harmonic: 50, amplitude at 333: 33
harmonic: 100, amplitude at 333: 67
harmonic: 125, amplitude at 333: 83
harmonic: 250, amplitude at 333: 167
harmonic: 500, amplitude at 333: 333
>>
>>107534965
Shouldn't all even harmonics achieve their peak amplitute at 500?
>>
>>107534935
well, i care so you better fucking get to it, lest you want cock scented gums
>>
>>107534990
Even in the sense of "symmetric around the y = 500"? Yeah.
But not in the sense of "amplitude is even."
Harmonic 250 is
0 at y = 0
250 at y = 250
0 at y = 500
-250 at y = 750
0 at 1000
>>
>>107534875
1092, 728
>>
>>107535005
Ahh, that's probably where I've gone wrong.
>>
>>107534996
Na. I have to start working on understanding my next platform.
PS2 took me about half a year to get ready.
>>
>>107535022
next platform doesn't unlock until you finish all puzzles
>>
File: 1749848710185384.png (67 KB, 760x168)
67 KB
67 KB PNG
>>107535016
Good, I'll take that as confirmation and added it as a hint.
>>
>>107534895
>coding puzzle general

Someone start this please
>>
>>107535158
dead general
>>
|\
|/\
|\/\
|/ \
|\ /\
|/\/ \
|\/ \
|/ \
|\ /
|/\ /
|\/\ /
|/ \/
|\ /
|/\/
|\/
|/

anon's puzzle looks awfully fractal
>>
NOW WHAT
>>
>>107535255
bonus puzzles: >>107533492, >>107533514

gchq Christmas challenge: https://www.gchq.gov.uk/news/gchq-christmas-challenge-2025
everybody codes: https://everybody.codes/events
>>
File: file.png (26 KB, 659x205)
26 KB
26 KB PNG
>>107533492
I DID IT
SOLVED
Good puzzle Anon!
Should I reveal my algorithm? It's a little brute force-y
>>
>>107535158
Every time this has happened in the past it dies out quickly
The timed synchronized global releases of AoC and being a short seasonal event plays a huge part in interest staying high enough to last the duration of it
>>
>>107535303
>there are no silve- ACK!
i'm still trying to solve it in O(log n) since it looks so much like a fractal
>>
>>107535303
Talk about the hundreth monkey effect, I just came back and solved it also!

I used a integer solver, basically turned each harmonic into a triangle wave function and maximized.
>>
>>107535303
Congrats! I'm glad you liked it. I like to believe it would rank among the better AoC puzzles.
>>107535323
My own solution isn't all that smart either. I only thought of the puzzle two days ago and haven't had time to really investigate the mathematical details.
>>
>>107523907
can someone compile a list with all the puzzles you guys make? it's hard to keep track of them, also can't someone just make a github repo that generates a site based on a config and has the hash of the result
>>
>>107535352
you can obviously cut the puzzle in half at the midpoint
i think the peak is always between the new midpoint and the new end
it seems likely you can narrow down the peak in log n
>>
>page 10
The end is nigh
>>
>>107535357
>generates a site based on a config and has the hash of the result
what does this mean
>>
>>107535471
filtered
>>
>>107535307
Leetcode has synchronized daily problems and (bi)weekly competitions. I'm surprised there isn't more interest.
Would be nice to have a group of like-minded individuals to shitpost and compare solutions with.
>>
is this the end? the end of /aocg/?
>>
>>107535471
He wants to be able to input his answers into a locally website for some reason
>>
>>107535583
i'll do leetcode with you if you make a thread in the next day or so
>>
I support a Recreational Programming general. There's tons of good puzzles out there. Everyone knows /g/ could do with some more actual programming threads.
>>
>>107535583
leetcode is soulless
>>
>>107535593
yes, aoc 2025 is literally over
>>
>>107535612
/ppg/ - Programming Puzzle General

https://adventofcode.com/
https://everybody.codes/
https://cses.fi/problemset/ and https://cses.fi/contests
https://projecteuler.net/
https://leetcode.com/
https://open.kattis.com/

then probably alert people to any new problems or try to organise an earlier aoc / everybody codes / cses contests / etc
>>
>>107535653 (Me)
i will be going through the previous everybody codes event if people want to solve with me
>>
>>107535653
https://rosalind.info/problems/tree-view/

Bioinformatics themed puzzles. Maybe the closest to the AOC format since you get large input files to process.
>>
>>107535685
looks good, add it to the list
i gtg; i expect to see a brand new /ppg/ thread full of puzzles when i'm back
>>
>>107535653
this thread will be kept on life support by an incessant samefag.
>>
>>107535736
>page 10
>>
>>107535745
the to be /ppg/ thread, mongoloid
>>
>>107535760
no u, dumb retard
>>
>>107533452
based
sayonara, anon o7
>>
>>107535848
kill yourself
>>
>>107535877
you first
>>
don't leave me bros
>>
>>107535916
I'm leaving you for another woman.
>>
in cringe thread
>>
in based thread
>>
in dead thread
>>
in comfy thread
>>
okay can this thread die already so I can go to bed
>>
>>107523907
first for solving AOC in rust! :3
>>
File: Day 13.png (161 KB, 875x848)
161 KB
161 KB PNG
I FOUND IT! THERE IS A HIDDEN DAY 13! AND I THINK IT MAY CONTINUE!!!
After you've completed Day 12 you see Santa flying around on the screen, right? Well, I saw that Rudolf's red nose was clickable. So I clicked it and got to pic related.
Its a new puzzle!

THANK YOU, ERIC!



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.