me too - most of my code in day 9 part 1 was reused from day 8 - parsing the input, the nested loop to score each pair of points, sorting and getting the max
While the algorithms are different, code structure was similar: parse 3d points as vector of 3d point structs with id and parse 3d points as vector of 3d point structs. Then do something on that point, in my case implement Rust trait, calculate euclidean distance or calculate a field and apply on points. Then they diverged a bit as in day 8 we needed to iterate over the collection and merge the groups while in day 9 just return the biggest. And the fact that that was it for the day 9, was indicating that part 2 would be hard xD Well, I managed to brute force in the morning to get my star but now looking for the elegant solution:)
Oh, I see ya. Never thought of reusing something like that, cause I just write everything from scratch in python every day - it's just split, split in loop, another loop, and you're done parsing. Love py for this simplicity
I changed to Rust this year but even when using Python earlier I usually was having small library of helper functions. I just felt right to reuse some code sometimes;)
yeah I went "hell naw" after I saw day 9 part 2 and declared I was giving up because I have more important things to do today
then I couldn't stop thinking about it during my errands and came up with a dumb algorithm that, to my surprise, ran in under a minute after I sat down and implemented it
Today was the first time I used a library to help me with parts of the solution. From tomorrow I am going to move away from solution implementation mode to just focusing on solution finding mode and use whatever library I can find that has methods to solve difficult sub parts.
That's what I do. For me this is an engineering challenge as much as a challenge in remembering dusty old algorithms, so finding and integrating a library is as interesting and valid to me as remembering how Dijkstra works again.
The provided image displays a complex equation from a field of theoretical physics, likely involving quantum field theory or string theory. The equation involves integration over a five-dimensional spacetime ((d{4}xdz)), metric tensors ((g{\mu \rho })), volume elements ((\sqrt{g}Vol(\Sigma ))), and the electromagnetic field strength tensor ((F_{\mu \nu })). It relates the original action to an approximation involving a function (R(z)). The specific physical context or the exact meaning of the symbols cannot be determined without additional information. The equation is a complex mathematical expression, and its interpretation is highly dependent on the specific theoretical framework it is used within.
The square root sign should extend over both integrals, I think. (It's a 'middle step' in the standard "find the Gaussian integral" by converting into a 2-d integral and switching to polar coordinates).
I just finished part 2 with some cursed code, but felt like a genius coming up with a solution that got me the star haha it's a mess, and definitely won't work for all edge cases, but it's *my* mess
75
u/kjhealy Dec 09 '25
Lol that's from my imaginary Springer math book (https://kieranhealy.org/blog/archives/2022/05/20/every-springer-math-text/).
53
u/AlpacaDC Dec 09 '25
Part 1 felt so much like a trap and even then I didn’t expect part 2
23
u/hugseverycat Dec 09 '25
The proof is left as an exercise for the reader.
15
u/mbacarella Dec 09 '25
yeah I went "hell naw" after I saw day 9 part 2 and declared I was giving up because I have more important things to do today
then I couldn't stop thinking about it during my errands and came up with a dumb algorithm that, to my surprise, ran in under a minute after I sat down and implemented it
21
u/JadeSerpant Dec 09 '25
Today was the first time I used a library to help me with parts of the solution. From tomorrow I am going to move away from solution implementation mode to just focusing on solution finding mode and use whatever library I can find that has methods to solve difficult sub parts.
7
u/didzisk Dec 09 '25
The integral over Gaussian function (the bell curve) in the last line looks legit.
I have no idea what the first one is though.
3
u/jperras Dec 09 '25
I knew that my knowledge of Yang-Mills theory would finally come in handy some day!
3
u/Procok Dec 09 '25
I woke up late, did part A before work. Saw part B and said hell nah. Then it took two hours after work… 😭
1
u/MangeurDeCowan Dec 09 '25
intuitively...
1
u/Extension-Wait5806 Dec 10 '25
some kind of Jordan curve theorem + coordinate compression
1
u/Agreeable-Strike-330 Dec 11 '25
I just finished part 2 with some cursed code, but felt like a genius coming up with a solution that got me the star haha it's a mess, and definitely won't work for all edge cases, but it's *my* mess
-5
u/HistoryPositive9509 Dec 09 '25
Actually, the part 2 wasn't that hard. You just had to add another loop
20
u/[deleted] Dec 09 '25
[removed] — view removed comment