#advent-of-code
1 messages Β· Page 34 of 1
bruh the day 6 part 2 -_-
I am fucking stupid...
For day 9 part 2 I ||wrote this really elegant algorithm for calculating the higest/lowest Y-value for any X-value to the left and right of a given X-value||
I don't need that. at all.
I can just check whether ||there's a red tile inside my rectangle||
I don't think that works?
oh wait, red tile or line between red tiles
FINALLY
Wassup champs
Which day was hardest so far? Kinda struggled with day8
||Disjoint union sets|| didn't sit right with me
Should i spoiler that
I'm still trying to figure out why my day 9 doesn't work on the real input and does on the example
I have no idea what those are || I just made a list of sets ||
|| (union sa sb : [circuit | circuit <- circuits, circuit /= sa && circuit /= sb])||
Probably not the most efficient but it runs fast enough
||it's just mapping each element to a parent||
Definitely today
For me at least
Havent started on day 10 yet
at least it's rust
p1 seems trivial enough modulo annoying input parsing, maybe p2 does something fun
p1 was reasonably easy
Yes, I had no trouble with p1. I don't start when the puzzle comes out, btw.
p2 i have an idea but i havent gotten around to coding yet
yeah same
i mean
i was for the first few days
I did part 1 with binary XOR ._. and now I've to change everything for part 2
but rn theres no chance of getting em done quick quick
so
i mean
d9 p1 was like 10 mins tho
so maybe not
It's not like all later puzzles are always hard.
yeah fair enough
They're just more likely to be hard.
interesting
the boxes one was the easiest
Is this related to advent of code?
no
they have some shit bash code
ok i couldve posted it somewhere else i didnt realise
but also its really funny yall should go check it out
code in question:
lmao
its a sleep command that ends up running basically forever
theres a screenshot of some guy's usage
5135 hours
just sleeping.
apparently it would cost you like 2.5k usd
cuz github has some stupid bug
Let's please keep this channel focused on Advent of Code.
This is completely irrelevant
Welp that's not making things easier
rust errors are quite excellent sometimes
they are. dabbled a bit in it for uni
might do aoc eventually in it
I love that day 10 has a reference to the Pannenkoek Watch for Rolling rocks SM64 video. That's one of my fave Youtube videos, so I feel compelled to complete this day no matter what may come
coincidence?
hmmm
wow who logged me out
yeah no
its never gonna run for actual input
aaaaaargh
ig it at least works for example?
i have one idea
for part 1 does the stuff in curly brackets do anything?
[.##.] (3) (1,3) (2) (2,3) (0,2) (0,1) {3,5,4,7}
you'll see
not for part 1, no
Because none of the machines are running, the joltage requirements are irrelevant and can be safely ignored.
running list of the top 5 hardest days imo
the fish one from 2021 is somewhere in the top 10
2019 day 22
ive only done 2021-2025
but yes at a first glance that one looks difficult as well
Got stuck for a while on part2 for day10 because I didn't notice that ||indicator lights were now irrelevant||. After that I got stuck again. Well, kinda. I found an algorithm that in theory might find a solution within a few hours (probably <24), but my computer has insufficient RAM. Part of me wants to try find an algorithm with better space complexity - even if it's slower, and maybe try parallelization. But the rest of me recognizes I need to find a different track, because
every problem has a solution that completes in at most 15 seconds on ten-year-old hardware
<@&518565788744024082> Good morning! Day 11 is ready to be attempted. View it online now at https://adventofcode.com/2025/day/11. Good luck!
I forgot π time to rush
It looks like more combinatorics again :( I guess no regex solutions today either
My part 2 code is producing different answers each time I run it wtf
||is there a loop in the input||??
maybe in your input? my code accounted for it, but i remove the check and it's still fine
Nvm I figured it out I'm just stupid
My initial solution hung so I assumed there must be a loop. But nope.
I ||forgot to clear my entries when I read from them|| so ||it was dependent on the order they were visited|| which theoretically should have affected p1 as well but I guess the magnitude of the difference gave me a free pass on that lol
nope. for reference my answer had || roughly 550_000_000_000_000|| paths so you might want to ||optimize||.
classic specific gitignore moment
Yup. My Go solution runs on 1.6ms π
I think these are getting too hard for me. π Day 9 was the limit
ah, 7ms for my python solution. Good enough for me.
No way. I have no idea how to begin optimizing for 11.2
but I agree 10.2 is impossible
hint: || you don't need to find the paths, just count them||
10.2 was not bad if you ||use an external lib,|| I'm still rewriting my ||native python solution for 10.2||, I had this weird approach I'm not willing to let go.
You might need to ||rethink how you approach the problem||
||yeah. I know I need to use a linear programming solver... but at this point, I don't know enough math to do it myself, and asking a LLM what to put into a solver defeats the purpose so I might as well just not do it.||
Using one is fairly easy and doesn't take that much knowledge.
||but you need to know what equations you are asking it to solve... How to use the libraries like z3 etc are easy enough. The reason I gave up was because I don't know what to put in them.||
Yes, you do. But ... it's not that involved? Happy to be more explicit in #aoc-solution-hints if you want help!
No harm in learning how to use a new library in order to use it. That's part of the experience.
Maybe I'll get to bed at a reasonable hour tonight. Time to step away from AoC/the computer and do night time chores.
solution for part 2 works, got the star. what i dont understand is whether ||repeat nodes|| are allowed? like if ||svr -> dac touches node aaa, and dac -> fft -> out also touches aaa, why that would be considered valid||? it doesnt seem this way in the samples
could also just be the specific examples given dont have that happen but it's allowed regardless
fwiw, what you need to learn to use one of these is just how to define the constraints
it will be just one part though
assuming it's like usual
oh yeah
one part?
in this case you have ||n variables x_i that are x_iβ₯0, for how many button presses for each button||, and then you have ||one constraint per output||, and you want to ||minimize sum(x)||
traditionally the last day has had 1 part and part 2 is "get all other stars"
i did not know this!
so you get the final star by just getting the rest 48?
...10 in this case
49, 23 this year
is the part 1 hell
i know people manage to not do d25
and have done all the rest
no, it tended to be easier than previous days
i'm probably gonna drop out of the roulette for now, have some other work i want to do
and i'm already 2 days behind
will return after AoC is over tho
oh we had rust yesterdya
i haven't looked at yesterday's problem at all, but from what i've heard about it ||it's just ILP so I would probably just be looking at a rust library for that||
it is
i didnt realise
so it should be maybee kindaaa easy?
now that i know how to do it
so sure ig
i literally had an exam that day where a part of the content was on that specifically
so
||solving like 6-7 systems of linear equations
||
sploier
well that was easy
having 24 actual stars and a 25th free star would be so elegant
alright
"||it's just ILP||" is a funny thing to say
a bit like saying "||it's just TSP, how hard can it be?||"
though to be fair we have some decent methods for ||ILP ||
look i'm a mathematician
if you can reduce it to some other problem, that's the end of my job ||\s||
NP - no problem
Spoilers
...You know, "Is problem no problem?" isn't an entirely incorrect phrasing of P vs NP
It goes into ||z3|| and that's that
except reversed
P - no problem
NP - problem
Yeah
P is no problem and NP is problem but if problem is no problem then NP is no problem but P is still no problem
P is np and NP is p but if P = NP is np then NP is np and P is np too
just hoped on and saw this
We're all NP down here
p is np and np is p but if p=np then np is np and p is np and p is p and np is p
if p=np then nothing is np
if p=np then nothing is np and everything is np
but p is not nothing that means np isnt nil
if p = np that means that the momentum of something can be expressed as an integer multiple of some other momentum
for d10p2, how do I solve this?
linear algebra?
||brute force|| all the things /j
||in all seriousness linalg is one way to do it||
||cvx|| could solve it
hmmm
ahhhhh lmao
yeh it wu be nicer than having 50,50,50,50,24 stars
yeaa
we found salt die's reddit
NaCl = salt
where is the dying tho
that's the cube
checked this out
looks interesting
also intimidating
i feel like im learning a new language im so lost
I suspect my lb rank is gonna drop tonight. Company holiday party or AoC? Or AoC @ party?
Bro created a new language π₯π₯
You can use ||libraries like Z3, scipy||
or if you are a maniac
||you can re invent what they do using simplex , branch and bound optimizations what not||
||scipy|| how?
||linprog||
||can that do integers||?
||it's got a parameter called 'integrality'||
finally
grats!
rip, that's like the only relevant sentence
i wonder
yeah nope max rectangle doesn't happen to have red corners
sadge
i guess it does make for a simpler algorithm now, but kinda annoying since i coded up an entire thing for this
i'm kinda sad it has to have red corners
what were you even checking in lol
i found the largest rectangle with red or green tiles
but that doesn't necessarily have a pair of red corners
at least most of my code is usable i think
ok i should probably sleep
guess i'll leave it to tmr
this 10 after the 11 looks so upsetting
one thing I hate about that is not being able to reorganise without unfollowing the posts
i underestimated my inability to sleep
there needs to be a leading zero
!subcribe
in the private leaderboard API:
Please don't make frequent automated requests to this service
I wonder why they don't just have a ratelimit
<@&831776746206265384> scam
!compban 1357158747973222502
:incoming_envelope: :ok_hand: applied ban to @hoary agate until <t:1765850853:f> (4 days).
Android client deals with it 
nuuuu you just reminded me of the tradition
I hope it is 2
27 parts inco
LOL
i want it to be bad so badly
I'm pretty sure this is to do with the order you opened the channels lol
day 12: solve days 1-11 but your runtime has to be <10 seconds total
The only puzzle I didn't solve is day10p2
yes.
otherwise this year has been easier than last year?
or maybe we've gotten better
yeah with the exception of days 10 and 11 which were pretty on-par
<@&518565788744024082> Good morning! Day 12 is ready to be attempted. View it online now at https://adventofcode.com/2025/day/12. Good luck!
oh god
THE FINAL DAY
yippee
its the order you join in yeah
ok what.
and here I thought they might go easy like day 25 lol
yeah what the hell is this
π
Considering giving up after just 4 minutes lol
no clue where to even begin here
Same Lmao
i might actually give up
im gonna think about it for a while
and almost certainly come up with nothing
so then id come back later
you can even rotate them bro what
pieces are able to overlap in their empty spaces
so it's not really 100x100
||maybe you're "supposed" to hardcode a table of which shapes can fit into each other and how||
||and then try to make amalgamations of them?||
oop no spoiler chat
||but still we can't think of every orientation right? and suppose in some answer instead of a tigher fit , we use another fit so space is left somewhere else||
the trick i used is ||the only thing we need to know about each shape is the area||
that was my idea. that plus ||maybe instead of forcing them to fit in a grid, place all the required pieces down and just add them into a blob, then make the blob look like the grid||
that doesnt work in all cases though
OH WAIT
im actually dumb
π
????
?
no way that works
that really doesn't work always though
wait the sample input literally disproves this
yeah thats what im thinking, no way it can
eric why
same thoughts
its never been this easy
yeah... day 12's a big nope from me
i guess that does serve to like
eliminate options
but i doubt itd ever come up
I started the puzzle exactly on 10:30 thinking I should start at time especially at the last day
:(
the actual input is nicer then the sample
i was told the last day is typically easier
the actual input says 2 are valid, and following that process it says 3 are valid
I knew I was getting in a cranky mood from day 10 but I thought... might as well just look at the last day...
bro's trolling right?
though ||it does serve as a decent heuristic and eliminates ~50% of the rows initially||
We're just gonna assume input is nice?
im not it works for the actual input
oh does it now
?
it does in some cases
i suppose
does everyone get the same input?
no
||WAIT WHAT||
what trig
||lmao, did you submit and have it work?||
agreed
i reember this happening like once
bro got easy input it seems
i think it happened once in 24 too
||wait like it worked for me too||
but on the last day seems suspect.
||my input shapes are so bad , I can't even think how to do this||
i told you
||the area thing?||
ok but like still
||area is working? π||
||i believe that eric just generated the input based on this and thought "eh, no computer could actually verify these before the heat death of the universe"||
spoiler
spoilers please
this is true π΄
its so bad
one of these days he's gonna generate an NP problem not knowing it is one, that someone happens to prove P = NP with
LMAO OK
that's what i'm sayin!!!
time to go do it
nah
woah, it worked for me too
so that's a finished calendar
THIS IS SO STUPID
and like previous years, ||everything is animated once you complete it||
i didnt even code up parsing yet
cuz i thought its gonna be a nightmare
hahhaa
hooboy
||day 11 was animated too||
I did the parsing initially because it seemed fun... then stopped
THAT'S ||TODAY'S EASTER EGG||
i can code it up in like 10-15 mins thp
lmfao what
what a cop out...
i cannot wait to see people in r/adventofcode showcase their actual solutions
it doesnt even feel fair
like
all this does is tell us which def cant be done
but nothing about the rest could be
agreed
it annoys me that ||the example doesn't work this way tho||
i feel bad even coding this up it feels like a total cop out lol
no way lmao
I was thinking it would be hilarious if the dumbest solution worked on the input
but it really happened
atp i dont even think we should spoiler this
since nobody else would be psycho enough to try this
and thats not their fault
and its not fair
π
I had tabs open for researching ||polyomino packing|| and everything
same
lemme just go code this up
then we can wonder about a better solution
maybe we were given grace after day 10...
lmao
should i take my time or should i rush
Let's use SAT solver to solve this /s
I was gonna try to eliminate some using this
it just so happens that it does
thats all i was gonna do
i wouldnt think to just post that answer
thank god I decided to check back in here before I went down this rabbit hole π
thats insane
SAME
i feel bad spoilering ||the area thing||
its not like any of us came up with ourselves
indeed
input is ||35x35 - 50x50||
dont spoilers in this channel pls
||I wasn't gonna attempt it anyways It didn't make sense like day 10 p2||
i have so many questions but most importantly what the actual fuck
I don't believe today's problem can be solved efficiently?
with like arbitrary shapes and area
90% sure it's ||np complete in general||
Now I've to return back to all days to see the easter egg ._.
i might have been too slow
aaand i get an error on actual input
it feels wrong lol
wow what
whats with this
||telling you to go finish the rest of them?||
||i already have!||
||you won't be able to get the last star unless you've finished the rest, which you have but if you haven't it'll show xyz||
ah sure but i thought it wouldnt even show for me since i have lol
what are you saying what the fuck to?
why?
Nah the past few days took a bit of effort
Even if today was
Anti climactic
because what the hell was this solution today
havenβt attempted it yet
is it hard?
||looks hard, but there's a dumb solution, that technicalllyyy shouldn't work, but for the input given, does||
AoC agrees
its not even a solution
it feels like the puzzles this year were easy until they flipped a switch on the shapely one (assuming you donβt use shapely)
its just ||a way to eliminate some of the options||
||but you should still have to check for the rest||
interesting
Welp. Yes.
full on 'solution' description:
Frankly speaking, this has been consistently my least favorite part of AOC, because this is clearly intentional (And also not the first time they've done this)
||My solution which works on actual input but not on sample||
The given || shapes do not perfectly pack. Which would be a shortcut to solving the problem, but they don't do so, so even that doesn't exist. ||
Alright. Time to go read the AoC 2025 story with the hover texts. And to rewrite my terrible framework.
i was thinking of like ||some sort of heavy caching solution, build up possible shapes from the ground up, etc etc||
but nooo
idk
id rather it have ended with a problem like d11 even
that was nice and sweet
and fair
ok it is
fine
||the minimum we have is like||
so ig thats slightly more fair?
i dunno
None of the provided input data || requires more than 75% of the grid covered ||
||im sure the ones who realised it themselves feel happy with themselves||
and || a basic arrangement of the tiles || always does better than that
Hold on
The fucker.
|| Statistically, the polyomino's I have only cover 7/9ths of the space. Which is to say, a full tile of them horizontally will leave 22% of the tiles free.
HOWEVER.
All of the "good" arrangements have, at worst, 25% free space. Which means that you should be able to solve the actual input by merely tiling them without any packing at all. This is also unlike the test data, which has polyomino's that are less dense than those provided in the actual data.
Excepting for the cases where the edges don't round nicely (because the omino's are 3x3, and some of these are non-divisible-by-three, which would leave you wtih two columns of empty space). But we can handwave that and say "yes, but remember, we didn't do any packing yet. "
||
rip
The worst case in my data requires || 74.4% coverage. Just tiling gets 77%. So you can just tile with no rotation or anything and get the correct answer ||
...anyway a decent chunk of that was wrong because I mixed up || the test ominos and the real ominos. But the packing limit of being able to fit sum(presents) 9's in the grid naively holds ||
hmm
dominos
pizza etc
the >24h ruining this screen
freaking thanks d10
leaderboard/personal times
just import some library and be done with it
Meh I never wake up early ._. Today was an exception
also what the hell is this ascii art of
i woke up early every day until d9
cuz d8 had broken my morale
actually no d9 i also woke up early
d10 i didnt
how did you complete part 2 in 40 seconds?
d10p2 was just 'import a library'
instead of using shapely iβm going to implement the algorithm myself
bruh
yeah then its awful
oh
there isnβt?
day 12 there was no part 2 ...
.
wow, that...sure is a day. aoc sure is ending on a low note
Why's that?
It's a ||fake problem||.
Oh....
Yes!
I donβt remember how much of it I did
Codyssi, Everyone Codes, CodingQuest, Tom's Data Onion
How much of what?
I'm going to go binge this to copeβ’ with today
https://youtube.com/playlist?list=PL2HVqYf7If8cY4wLk7JUQ2f0JXY_xMQm2
Codyssi!
Iβm out rn Iβll check when I get back at my laptop
Ooog
It's easy to check? 22 puzzles
22 okay
fun question, btw: does anyone have a fast python solution for aoc 2015 day 4, the one with the md5 hashes?
I tried parallelizing my Python solution but it basically didn't work at all to utilize multiple cores, weirdly enough
(and the Rust solution was way faster π₯΄)
no surprises there
i havent done 2015
i think im gonna speedrun the first few days of codyssi
well not speedrun speedrun
probably not how you're supposed to do this but it works :D```nix
buildPhase = ''
runHook preBuild
cd src
sed -i''' -e 's!DEFPYTHONPATH=.*!DEFPYTHONPATH='$out'/lib!g' Makefile
CFLAGS=-std=c89 make python
runHook postBuild
'';
Codyssi is fun
it was launched this year right
i think i did the first few days as they released
but im not sure
aw codyssi wont let you log in with github
Is it just me or are the scipy docs taking an eternity to load?
We are coincidentally on the same leaderboard. π "Joe Banks"
oh i wonder how thats doing
Not sure where it's from... can't remember
https://scipy.github.io/devdocs/ useuing this for now
is it not the server's
anyone here got day 10p2 without just using a solver
nah idts
altho theres an interesting idea i found
posted in the forum thread
forum channel?
forum.
so was a solver intended solution?
i guess?
im not sure thats insane
like we use libraries all the time
like regex
some of these seem designed for regexing
granted regex is built in
but like those solver libraries seem so niche? are they more common than i think
i mean
linear programming is a common thing
also you can do it with just numpy
itll just be annoying
there's #1448177606359781466 message
||i also got my brute forcer down to under 2 hours||
Solved the first 11 days, but wth is this day 12 π
I donβt even know where to start
minor hint: ||try the easiest check for whether it's impossible||
i think my favourite day this year is either day 7 or day 9
those are definitely the ones i found hardest at least
and the ones i have the nicest solutions for imo
this year has a really pretty map tho
finally got pithon
day 7 was pretty
day 9 was fun yeah
day 7 was def not hard tho
what is this ascii art representing
i found it difficult because i did it in zig
ah sure then
if i did it in python it would've been fine probably
i went with the laziest parse i could because i didn't want to touch zig dynamic arrays
which also meant my logic was basically language independent
i also just had a lot of OBOEs because my code was quite messy
what could you possibly need jinja for
i dont recall installing that.
The underground rooms you decorate at the North Pole.
my deps empty, cpp β
It is a general purpose template language, right?
i think my favorite langs this time were idris and clojure
idris felt like haskell but more
though the errors with type inference did suck at times
and idk i just really liked closure for some reason lol
for days i'd say 3 and 9
(((((((Iβm)just)not)a)fan)of)Clojure)
(((Not)sure)why)
wrong way
Is there really a right way
i think the more i do functional stuff the more my python starts looking like a lisp
i feel like my style of python is
functional or dp
I think odin was one of the more interesting things
or bfs/dijkstra/a* ig
i still need to do odin
and rust
and for my own sanity I'm doing julia
π
which kind?
err, meant for the last msg
uh
which kind of arrays
im fine with hardcoding so like fixed sized arrays of ints
one of your bigger pains is going to be io
there is ReadChar, PrintChar and Print(i32)
π
also coordinate compression is not too bad the way I did it
ok it can't be worse than writing assembly
did anyone else do that day the way I did it?
||coordinate compression, and then 2d prefix sums||
spoilers for everybody.codes day 8 p3 ||```py
between_range = range(a, b+1)
return (b in connections_from[a])
+ iter_len(filterfalse(
partial(contains, between_range),
chain.from_iterable(
map(partial(getitem, connections_from), range(a+1, b)))))
also the 3 times I have implemented a DSU this AoC I've messed up the exact same line all 3 times
0 2 6 10
-> 1 0 1 0 0 0 1 0 0 0 1 (counting sort kind of thing)
-> 0 - 1 - - - 2 - - - 3
though for practical reasons I compressed it to
0 - 2 - - - 4 - - - 6
interesting
and now you have the mapping as an array
i presume carbon definitely does not have a hashmap
nope
ok yeah I might do that
i need to finish rust, odin, and python 0.9.1 first tho
my rust ability is lacking
for your own sanity
#!/bin/bash
carbon compile --optimize=speed *.carbon \
&& carbon link --output="main" *.o
how did you guys install carbon?
I just downloaded the release
i used compiler explorer for everything
it's motivation!!!
if it times out then your solution aint good enough
-# (i couldn't get the compiler to run)
for me it literally worked out of the box
that is not related to this channel, try #python-discussion
oh sorry my bad
π Could not start dynamically linked executable: carbon NixOS cannot run dynamically linked executables intended for generic linux environments out of the box. For more information, see: https://nix.dev/permalink/stub-ld
ah, you nixed yourself
yeah lmao
what's the topic of the aoc channels?
advent of code
still haven't got all the obsidian plugins to work yet
what's that...
it's a yearly set of programming puzzles released daily around christmas
oh i forgot the bot did that lol
so what's the puzzle now
we're currently on day 12/12
https://adventofcode.com/2025/day/12
it's too hard
I don't understand any of that
yeah that's actually what everyone's saying today lol
but if you're a beginner, it might be better to start off on one of the earlier days
the difficulty tends to ramp up as the days go on
i feel like this year difficulty peaked on day 9 ngl
thats exactly the day im stuck on π’
should i just skip
you could skip and come back yeah
have you completed this year
yeah
cuz ive heard that you need all the other stars to get the last
you can still do the puzzles, you just can't get the last star until you go back and finish day 9
alright
thats one ive not heard of
oh that makes this ridiculously easy
i guess im proud of having done it myself
valuable dev info
but hmm
i guess i wouldnt complain too much about never doing it again
why do you know of ||shapely|| anyway
have you used it before
same type of problem last year
let me consult my archives
||coordinate compression|| is a more fun approach to the problem
i.e., what if we ||contort space|| to make the brute force check work
||i still find it funny that you can even do it wrong and end up with the right answer||
indeed
theres always some random polygon problem in these things
although its not very brute forcey
like the ||odd even check or whatever else you might implement||
which one
my thing was brute-forcey
||flood fill the interior||
||coordinate compression for day 9, you can essentially over-compress the input data in a way that should cause bugs, but the input data just so happens to not trigger said bug||
and then for the rects check ||all cells it covers in the grid||
ah i tried that with actual input without ||coord compr|| and it was hell lol
ah
the fun thing is that the algorithm doesn't change
i dont know how ||coordinate compression|| works tbh so ill have to look it up
same algo would work on the full grid, it's just very inefficient
things learnt this year are ||coordinate compression|| and ||dsu||
and a bunch of libraries
yeah indeed
compressing 100k side length into ||a few 100s||
hmmm
well, more like ||500|| and I did ||1000|| for convenience reasons
||you make two lists, one of each unique X position, the other of each unique Y position, and sort them, then map each coord (x,y) to (2 * xs.index(x), 2 * ys.index(y)), essentially - now with the input data your max X and Y positions are like 500 instead of 100,000 or whatever it was||
||what are xs and xy||
if i had to have guessed, id like ||find the greatest common divisor of all side lengths and divide by that||
well ||the gcd for height and width separately i suppose||
so I did ||counting sort|| and some stuff, thankfully ||100k is not a huge number||, so a ||100k long array|| works ok as a ||mapping||
I did this
||if you've got the original list of coords tiles: list[tuple[int, int]], then xs = sorted({x for x,_ in tiles}), and ys = sorted({y for _,y in tiles})||
||tiles: list[tuple[int,int]]|| right?
oh yep, correct
no gcd involved
okay sure so just ||sorted stuff||
the rest hm
hold on brb
coordinate compression example
basically there are regions where nothing interesting happens, so collapse those
||I didn't bother with the coordinate suppresion thing since just checking all line segments took under a second anyway||
but coordinate compression allows you to just don't do geometry
it's great
it's a simple thing to allow a very dumb solution
i don't get it
by "collapse" do you mean remove them
so you only get the relevant cells
||just translate coordinates, e.g. for the x-axis translate the columns which have any corners, in this case translating to multiples of 2 is convenient for being able to flood-fill in the grid||
here ||all the columns between corners "where interesting stuff happens" gets squished into 1 column each||
and then do the same ||for the y direction||
<@&831776746206265384> want some crypto scams?
!compban 1357243121011785809
:incoming_envelope: :ok_hand: applied ban to @trail vessel until <t:1765897072:f> (4 days).
moderators did not want crypto scams
||if you split the area into 3x3 chunks there are always at least as many chunks as minos||
oops I forgot to scroll
i think this might be me first top 1?
a lotta people left compared to last year so lmao
true
someone named oliver Ni used to appear consistently before
if my memory serves
top 1 what
Are you guys tryharding release times π‘
top 1 pydis leaderboard!!!
first!!! congrats @pine tiger
python discord
top 1 is an interesting way to put it though lol
in sorted(leaderboard)[:1]
They do have that name on their profile
Geez, I forgot this was a thing.
aoc?
Hello, I just learned about Boyer-Moore Voting algorithm, so cool
How do I join advent of code?
From the website, you can create an account. Then you start solving the problems.
You can read more here #announcements message
then the #1047673173447020564 has a thread for each day.
None spoiler help would be done in this channel ( #advent-of-code )
as well as in the #aoc-faq channel
i dont know where to start for day 12 lol
With the spoilers π
ok, finally I have time to look at today's problem
now...do I have python 0.9.1 around?
I might have deleted it
What is python 0.9.1? You mean Python 3.14?
that would have been an impressive typo
Upload and changes to Python 0.9.1 release (from 1991!) so that it would compile - smontanaro/python-0.9.1
it doesn't compile for me π
one missing header include which was easy enough to fix
but now mentions of flushline which is defined nowhere
your tip from last year actually helped me with that lol #1321343119676932117 message
oic
CFLAGS="-std=c89" make
now, I remember multiplication being broken on non-windows
let's see
yeah...
>>> 1*2
Unhandled exception: run-time error: integer overflow
Stack backtrace (innermost last):
File "<stdin>", line 1
ok, some guy already solved that
https://discordapp.com/channels/267624335836053506/1321343119676932117/1321376271371993128
so the bug is assuming that long is 32 bits
(maybe the project will accept a PR)
convert to double lmao that's so good
editor kept removing my trailing spaces too
huh
>>> a = [1, 2, 3]
>>> a[-1]
Unhandled exception: run-time error: list index out of range
Stack backtrace (innermost last):
File "<stdin>", line 1
>>> a[:-1]
[1, 2]
π
Unhandled exception: type error: unpack non-tuple
ran into all the same errors lol
there's an atoi???? i missed it and used eval instead oof
oh yeah
Parsing error: file main.py, line 32:
if c == '#':
^
Unhandled exception: run-time error: syntax error
good, Completionist Role is getting assigned
soonβ’
i think i had to relink before it got assigned but it worked :D
gonna have to lock in this weekend to catch up on all the days I missed
we'll see when the role kicks in
Is it contagious?
seems so
When does it end? How long do we have to finish all the problems?
lmfao i did that exact thing
I had a look around in the stdlib and there's also a file for lambda calculus
The discord role or the site? There's no end time on the site
day 9 part 2 not looking so good
actually now it's at 4 hours
still not great though
oop forgot to turn off the alarms
How long until we no longer get credit for completing it? I have 4.5 problems left to solve. How long until I donβt get my gold stars any more?
you'll get the gold stars no matter when you do it
what progress bar is this? looks interesting
omg pink role!
i love it
tqdm
does it stay for the month, until next year, or forever?
That will also be applied automatically (until they all get removed in January)
ooooh
the role or the stars?
Gm
gm
the role
Until January
Please react with β
to upload your file(s) to our paste bin, which is more accessible for some users.
I cannot get real output , can Anyone solve this.....
This doesn't seem to be related to Advent of Code. Or Python, for that matter.
damn, I'd see a doctor
agh i want pink role
what day is preventing you from getting pink role?
anything after day 8 looks hard
i heard people had to use ||"solvers"|| for day 10
i have no idea what that is
like ||z3||
a ||theorem prover||??
||integer linear programming||
||you tell it to maximize/minimize a function under some constraints||
indeed
okay i'll get to that after i solve day 9 part 2
a library
i'm still stuck on the polygons, not even llms can help me
people also used libraries for that
altho most i know didnt
anything i do either doesn't work, or does work but is too slow for the real input
didnt i help you on the ||odd even checks||
yes
why is too slow
but i have no idea how to cast a ray, or check if there's a wall
without being slow
it runs in like 2 minutes top
nah my solution ran out of memory after like 30 mins π
ah
you wanna go to #aoc-solution-hints and talk about it
yea sure
there are better ways than ||raycasting|| if you don't feel like it
you shouldnt be storing so much stuff that it runs out of them memories
its really easy tho
matter of taste ig, I tend to avoid doing as much geometry as I can because it usually spawns a lot of edge cases
you can avoid doing line intersection at least
That's why you always read the rulesβ’
once was smth like a 'wow what the fuck is this monstrosity' in reply to some meme code
and the other was for d8p2 wherein i 'cant be fucked to write a binary search myself'
indeed
cant even be mad
a subreddit being not hell is nice
maybe its too nice but oh well
Maybe I'll do an apology in an appeal later
too much going on at once to remember that r/aoc wont let me say 'fuck'
Nice role
Write a browser plugin that prevents you from posting certain words in certain subreddits
Sad that the advent of code isn't open source :/
whats with this trend of having your first name followed by ellipsis
If you're talking about in discord, then you have streamer mode turned on
Oh
Lmaooo
mb
Actually it wasn't happening for every user
Only for demantati in this chat
Maybe because of nickname = username
<@&831776746206265384> wanna try a new analytics tool
Chris who
damn solving AOC using cpp is hard ._.
the hard part is I don't have traceback error π₯²
!cpban 1444559184497479792
:incoming_envelope: :ok_hand: applied ban to @wind shoal until <t:1765981473:f> (4 days).
going back to read the story, and its kind of rushed imo
guy could have spaced out the days so that we get to dec 24
like one puzzle every 2 days would be fine
yo
I'm glad it didn't go there, I have shit to do on the 24th
it would have been half a day
I spent like 10+ hours on day 12 though
That was the day I spent most time on this year
Cause I'm a dum dum
π
but now im hurrying trying to put xmas presents under a tree and stars on it, its the 13th, whats the rush for
why do these elves even take them down, they have one job
You're one of those people that left studying for exams until the night before, aren't you?
"one of those people" referring to most people here
We're in this message and we don't like it
i should probably keep working on d9 and d10 but too lazy..
Santa Claus
Yeah, when you gotta visit as many homes as I do you don't got time to make sure the presents are arranged in an aesthetically pleasing manner
not that putting them all flat on the floor is all that aesthetically pleasing
iβm somewhat glad it was shortened to 12 days instead of the full 25 this year so i could get them all done before i went out of town
that being said, i feel like as a result the puzzles this year were very unbalanced
days 9 and 10 were significant difficulty spikes compared to the other days, and less gradual compared to past years
and also super math heavy π
I hope they can calibrate the difficulty curve better next year
i miss the yearly opcode question :(
hmmmm?
the ones like βthis number means perform this action, this other number means take the next two numbers, find their LCM, and perform the next action based off of thatβ
etc etc
every number in your input is translated into an action that you perform, and you have to figure out what the end result is
I did 2015 d22 just now, that was fun
what were the egregious issues with the curve?
11 being too easy compared to 9 and 10?
I have a hard time to judge difficulty since I have a lot of existing experience
1-5 were quite easy
6 was "pain in the ass to implement" flavor of annoying (also C did critical damage)
7 was staightforward if you are used to ||DP||
8 is quite literally just ||Kruskal's algorithm||, not sure if things are hard if you didn't know that
9 got harder, and there are a lot of sensible approaches here, neat problem
10 was a massive spike
11 came back down, but still expected doing some basic ||DP on a DAG||
12 was ||a troll||
honestly the spike at 11 isn't unlike other years where the difficulty often spikes at around day 21-22
this took 27 mins to compute π
d9 p2
reasonable
asked for a hint in #aoc-solution-hints. if you can help i'd be grateful, but no pressure
relatable
Oh boy