[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 / qa] [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]


dynamic 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:
796940-44255af5
anonymous-only leaderboard:
383378-dd1e2041

previous thread: >>103478070
>>
File: solve_iterative.png (522 KB, 5386x2802)
522 KB
522 KB PNG
idiomatic Rust solution
>>
>>103481467
wtf is tabulation
sounds like some boomer shit an excel monkey would say
>>
File: day7fail.png (81 KB, 1231x682)
81 KB
81 KB PNG
Damn, I knew I should have double checked it was still giving the right results for the example and silver alone.
We're not winning today, brute friends.
>>
File: Untitled.jpg (59 KB, 598x417)
59 KB
59 KB JPG
brooters be like
>>
>>103481469
I wanted to but there was an entry for that day already. I'll edit it out after work
>>103481461
kek
>>
File: gpt.png (19 KB, 812x279)
19 KB
19 KB PNG
today is the day
>>
>>103481484
The gt/lt/le comparisons being signed got me. Fuck.
>>
File: charlie.jpg (137 KB, 1024x768)
137 KB
137 KB JPG
>>103481476
Playing around, it seems like the length of my input has very little to do with how long the program takes to run. The bigger problem is changing the 2400 multiplier to something much greater.
>>
ID please.
>>
>>103481585
white male
>>
>>103481590
good. now register your social security number, citizen
>>
Are the answers for >>103480033 correct? I'm getting 89456167 and 105989857234345019, but my code works correctly for the puzzle's input
>>
>>103481581
2024*
>>
File: day11washedmoderner.png (360 KB, 1860x2763)
360 KB
360 KB PNG
Modern C++
bigboy takes 0.04s bottom up and 0.08s top down
>>
>>103481599
Correct for me. You might need to check your code, anon
>>
File: 5UKItO6.jpg (152 KB, 736x1024)
152 KB
152 KB JPG
>>103481599
are you accounting for the fact that there are multiple copies of the same number in the input?
>>
>>103481569
https://azeria-labs.com/arm-conditional-execution-and-branching-part-6/
>>
>>103481599
>>103481608
Ah thanks,I spotted the error immediately after posting

>>103481613
yeah, that was it
>>
bigboy #11
url: http://0x0.st/Xh3u.txt
stones: 100K
silver: 5399449821
gold: 6446795110566618681
>>
>>103481617
Yes, I already found the conditionals I should have used.
Generally I'm just not working with these big numbers, so it hasn't been an issue so far.
I need to find some other optimization, though. I was thinking of caching half the results but I think that would still result in the same number of computations because the big problem is the concatenation which you can't really cache.
>>
>>
>>103481637
drop the big breasts, and then she can squeeze me.
>>
File: ray-so-export.png (427 KB, 1794x2558)
427 KB
427 KB PNG
>>103481623
Rust, 16ms
>>
File: Screenshot.png (242 KB, 1069x1378)
242 KB
242 KB PNG
>>103481623
C, down to 30ms
>>
File: file.png (116 KB, 781x839)
116 KB
116 KB PNG
>>103481623
Not sure why am I getting different output for bigboy.
$ time 11_01 bigboy.txt
89456167
11_01 bigboy.txt 0.02s user 0.00s system 97% cpu 0.022 total
$ time 11_02 bigboy.txt
105989857234345019
11_02 bigboy.txt 0.04s user 0.00s system 98% cpu 0.049 total
$
>>
>>103481637
TED
>>
>>103481816
>>103481613
graychad-san...
>>
>>103481816
unreadable
>>
>>103481840
perfectly readable modern code
https://en.cppreference.com/w/
>>
comfy cnile
bigboy in 120ms, but 100ms of it is scanf parsing >,<
>>
>>103481832
Oooooh thanks
Replaced
current[stone] = 1;
with
++current[stone]
>>
>>103481816
line terminator maybe?
>>
File: bb.png (80 KB, 680x604)
80 KB
80 KB PNG
>>103481623
450ms in Clojure

>100k stones
I get the correct results, but there are 200k stones in my file.
>>
>>103481816
There are duplicate stones in the bigboy input.
>>
>>103481854
it's unreadable because of the low contrast
syntax is fine, I guess
>>
File: file.png (7 KB, 408x87)
7 KB
7 KB PNG
uuuuuhm guys, should I just give up at this point?
>>
>>103481890
just make a swap file
>>
>>103481894
calculating with 75 stones and it's not cutting it, bruteforce may not be an option... i dont want to think
>>
>>103481908
just use ram compression and overclock your cpu
it'll be fine
>>
File: aocp.png (2.54 MB, 9781x3115)
2.54 MB
2.54 MB PNG
aktualisierter Kalender
bottom-up Ausgabe
>>
I'd rather not spend my time solving pointless made up "problems". Sorry.
>>
>>103481919
Oh you got filtered, I'm sorry. But hey, at least you've made it until day 11. Not everyone has to know DP!
>>
>>103481919
another one bites the dust
>>
>>103481927
I program for a living, I don't have interest or time for problem 1 let alone problem 11. I'm extremely concerned seeing these threads and their inhabitants.
>>
>>103481916
Bigboy performance
$ time pypy main.py < Xh3u.txt 
5399449821 6446795110566618681

real 0m0,186s
user 0m0,150s
sys 0m0,037s
>>
>>103481919
well done making it to day 11. Good luck for next year (if this is not the last year).
>>
>>103481944
>concerned watching other people have fun
you are weird
>>
>>103481908
kek, just so you know, if you were to use a plain bruteforce the vector for the 75'th iteration on my aoc input would take up 1.9 petabytes. If you were to use u64's that is.
>>
>>103481919
understandable, now go pretend you are a linux user with a real job
>>
File: 46ool0-1462964240.png (300 KB, 523x523)
300 KB
300 KB PNG
>>103481944
this is you
>>
File: hang-in-there-tm.jpg (98 KB, 960x720)
98 KB
98 KB JPG
>>103481890
>>103478508
>>
>>103481963
cute!
>>
>>103481944
lol lmao
let me guess you're webshitting code monkey
>>
>>103481919
it's ok to be filtered anon, as long as you had fun and enjoyed the mirthful merry jolly festive christmassy atmosphere

>>103481863
tee-hee i had the same problem
>>
I bruted until iteration 35
>>
>>103481963
Ok this one is actually good.
If the text isn't perverted and the elf isn't literally a six years old it passes.
>>
>>103481623
190ms in python
>>
File: tiresome.png (473 KB, 680x486)
473 KB
473 KB PNG
>implement the simple rules described in the problem
>doesn't work
>oh no, you'd think the problem description was that way but ACKSHUALLY if you reread the problem again and again you'll find a minute clue that makes you reinterpret the rules into their correct form and that will resolve the edge case that fucked you over
I'm sick of this shit. This is faggotry of the highest order, not programming.
>>
File: im-1733924436555.png (18 KB, 452x428)
18 KB
18 KB PNG
basic pytoddler solve. was really hoping that all the nonsense about ordering and them being in a straight line was bunk and wouldn't come up in part 2.
real    0m0.097s
user 0m0.093s
sys 0m0.004s
>>
>>103481987
Is that a & 'and', or a && 'and'?
>>
>>103482007
>advent of reading comprehension
>>
>>103482007
? what edge case could you possibly have today
>>
>>103482014
What? If both are booleans why does it matter?
>>
File: bigboyfinish.png (12 KB, 322x532)
12 KB
12 KB PNG
>>103481623
Big boy: forgot to output the answer, but attach related is my runtime for gold. Not sure why the 'time' output is so long in this run.
(I used go btw)
>>
>>103482031
I have no idea why I was asking that. Not enough sleep these days.
>>
>>103482039
>[time] [/time]
>deleted
I saw you.
>>
File: 1603292337772.jpg (44 KB, 759x574)
44 KB
44 KB JPG
>>103481623
>>103482011 (You) (me)
5399449821
6446795110566618681

real 0m0.241s
user 0m0.230s
sys 0m0.012s

had to fix a bug where i assumed every digit in the input was unique.
>>
>>
File: im-00d0349550.jpg (14 KB, 161x200)
14 KB
14 KB JPG
>>103482053
>tfw if only i could delete posts as fast as i can shit out python
>>
>>103482053
>>103482072
>>103482083
>>103482062
kek
>>
File: im-c56be5a3da.png (508 KB, 850x464)
508 KB
508 KB PNG
>>103482072
good lookin out breh time to commit sudoku i guess
>>
>>103482015
>advent of ACKSHUALLY
>>103482018
I don't know, the 6x part of the example works but not the 25x. I think this is it for me, I don't like this shit anymore.
>>
>>103481473
fucks sake mang this may be your most readable solve yet and it still looks like a diseased anus
>>
>>103482112
>No matter how the stones change, *their order is preserved*, and they stay on their perfectly straight line.
>>
>>103482112
post pseudocode
>>
>>103482141
I'm using a flatmap function so I don't change the order
>>
>>103482164
sub halves { my $str = shift; my $mid = length($str)/2; substr($str, 0, $mid), substr($str, $mid) }

my @stones = <> =~ /\d+/g;

@stones = map { $_ == 0 ? 1 : /\A(?:\d\d)+\z/ ? halves($_) : $_ * 2024 } @stones for 1..6;
# @stones = map { $_ == 0 ? 1 : /\A(?:\d\d)+\z/ ? halves($_) : $_ * 2024 } @stones for 1..25;

say 0+@stones;
>>
>>103482196
unreadable
>>
I have replaced my reverse double dabble with a better BCD to binary conversion that consistently uses more than 50k less cycles.
That should save some time....
>>
>>103482196
>regex
Well there's your problem!
>>
>>103482164
>>103482196
ok never mind, it's because of the leading zeros. there is no problem with arithmetic operations and comparisons but the regex matching is fucked because of it
0+substr($str, 0, $mid), 0+substr($str, $mid)
>>
why is my recursive solution stuck at part 2, what the fuck, is this normal ?
>>
>>103482246
Oh no, he fell for the deceptively simple part 2.
It's just 50 more repetitions, what's the worst that could happen?
>>
File: 1733926375081.jpg (118 KB, 1022x1237)
118 KB
118 KB JPG
>>103481944
>>
>>103482246
yea it's perfectly normal for 2nd week of aoc
>>
File: burger king.jpg (166 KB, 1152x1149)
166 KB
166 KB JPG
>>103481944
>sleep at 9pm
>wake up at 5:30am
>solve puzzle in both my languages
>go to work at 9am
Nothing personnel kid.
>>
>>103482265
>Oh no, he fell for the deceptively simple part 2.
>It's just 50 more repetitions, what's the worst that could happen?
nigga quit your smug bullshit and help a brotha out
>>
>>103482327
poast code
>>
File: 195.png (513 KB, 680x479)
513 KB
513 KB PNG
>>103481944
>I program for a living
Well there's your fucking problem. No one enjoys recreationally doing what they do for a living.
>>
>>103482327
Okay, I'll spoonfeed you
https://en.wikipedia.org/wiki/Dynamic_programming
>>
>>103482327
It just takes a few more hours anon. Just wait and let the answer come. Don't let these smug nerds lead you astray. You do have lots of ram right? You aren't too poor?
>>
File: aoc-2024-day-11.png (33 KB, 842x1396)
33 KB
33 KB PNG
I was overthinking this way too much
>>
>>103482351
>open link
>see pic related
>alt + f4
>>
>>103482364
what, you can't understand that? it's quite simple really. anyone could get it
>>
File: aoc2024 day11.png (110 KB, 781x716)
110 KB
110 KB PNG
This brings back memories of jellyfish and binary fission. Do they have this exact problem with different wording every year? It's a neat problem for hammering in the lesson that you shouldn't let yourself get locked into the way the data is presented in the puzzle, but once you've picked up on that, you've already solved this.
>>103482011
Check out Counter from collections. It's basically the same as defaultdict(int), but comes with some extra utility functions. Doesn't make much of a difference for today's problem, but I felt obliged to mention since it's the only meaningful difference between your solution and mine.
>>
>>103482364
>filtered by integrals
underage
>>
File: carbon.png (664 KB, 1684x1228)
664 KB
664 KB PNG
>>103482332
asked gpt and it said some shit about memorization, bros...i don't want to be filtered
>>
>>103482327
ignore >>103482351, anon. you don't need that shit for today.
>>
>>103482381
>she can't remember what stones there are
>>
>>103482327
buckets
>>
>>103482385
Yes, he could also do it with matrix exponentiation.
>>103482364
You have to be 18+ to post here
>>
>>103482364
I don't understand any of that either.
I got my stars.
>>
>>103482327
hint: lots of stone numbers will repeat itself
>>
>>103482324
what like english and french?
>>
honestly I prefer this over cycle detection
I saw couple of them in previous years in others' solutions and I still don't get it
>>
>>103482364
>single-letter variable names for everything
what is it with math fags

If I were to try to put code written like that into a real project it wouldn't even get merged, and rightly so.
Unless the maintainer is a Haskell shitter I guess, he would probably congratulate me for my elegant math-like style.
>>
>>103482435
Doing Python (for leaderboard), Zig (for fun) and my own language (to improve it).
>>
>first problem in 11 days that can't be brooted
>its just lanternfish again
If there is one more easy problem this year I will be mad.
>>
>>103482442
"can't" is a strong word
>>
>>103482439
>single character digits
you don't want to write down tenthousandonehundredseven, it's better to write 10107
>single letter variable names
so you don't have to write much
>>
>>103481919
Good thing you only spend your time productively posting on 4channel dot org
>>
File: 3.png (127 KB, 1920x1043)
127 KB
127 KB PNG
>>103482440
very cool

at the beginning I wanted to write everything both in Clojure and in Dart, but starting from Day 2 I just fiddle with the Clojure version until it can be transpiled to Dart, and from there I integrate it into a Flutter app
>>
>>103482440
oh nice. not sure why I thought like spoken languages.
>>
>>103481623
>20s
might have been faster if I actually implemented memorization but it's still under a min so whatever
>>
>>103482440
post a code solution for today in your own language (or any other day)
>>
>>103482463
take a look at your url again old man
>>
File: file.png (578 KB, 1448x3828)
578 KB
578 KB PNG
>>103482479
I didn't do it today because I needed to catch up on sleep, but yesterday's solution is pic related.
>>
>>103482501
cool lispy
>>
>>103482513
It's a descendant of Smalltalk actually (an implementation of Self). Pure object programming language.
>>
File: 1647703080166.jpg (18 KB, 300x300)
18 KB
18 KB JPG
i just implemented memorization by the help of gpt, i have never used it before, kinda beautifully simple, i like it.
>>
for day 9 what happens if the index is > 2 digits do I move em 1 digit at a time?
im too lazy to fuck around and find
>>
File: day11.png (112 KB, 1174x671)
112 KB
112 KB PNG
Hey, I'm getting good at this.
I tried out the bigboy on part 2 and it solved it in a few seconds. Of course, space efficiency is out the window, but who cares about that.
>>
>>103482534
that depends on which part you are doing
>>
>>103482542
1
>>
>>103482534
lol
>>
>>103482246
Think about it for a second. Since you get an extra stone whenever a stone has an even number, and 50% of numbers are even, you can expect the stones to multiply by roughly 1.5 every time you blink. After 25 blinks, they'll have multiplied by 1.5^25, which is 25251. After 75 blinks, that goes up to 16 trillion. So if you have a function that calls itself two times whenever a stone splits, it will be calling itself 16 trillion times on the 75th blink. Per stone you started out with.
In other words, this problem becomes unfeasible if you try to keep track of every individual stone.
>>
>>103482549
in each step you move one file block of a file into a free space block
>>
>>103481590
This incident will be reported.
>>
>>103481623
6446795110566618681 : 268.365ms
>>
File: aoc2024 d11.png (1.43 MB, 1510x2122)
1.43 MB
1.43 MB PNG
you guys with your "memoization" are all idiots, day 9 was the hint! You're obviously meant to use run length encoding to compress the problem. The stones having to be in the same order was a red herring.
>>103481623
150ms, could probably be sped up if I just inserted in the sorted spot instead of sorting afterwards, but I think this version is clearer about what's going on.
>>
>>103482324
>sleeps at 9pm
Okay kiddo, isn't that a little late though? Your mom seems careless.
>>
File: gigaschizo.jpg (25 KB, 400x400)
25 KB
25 KB JPG
>>103482575
kek, based solution
>>
>>103482575
yeah, a bunch of fags learned one hammer trick and now everything looks like a nail to them
>>
>>103482586
I'm europoor, puzzles unlock at 6am. Blame Eric.
>>
>>103482596
doesn't matter it's all llmjeets and aitryhards on the leaderboard anyways
>>
>>103482534
FACT
0 length files takes up no space. NO blocks for 0 length files
>>
>>103482608
I'm competing for the private leaderboards, not the global leaderboard. I had gotten on the global leaderboard a couple times in the past but those times are obviously gone. Today's part 1 was solved in 9 fucking seconds.
>>
File: file.png (426 KB, 750x734)
426 KB
426 KB PNG
>mfw adding 1 line of Python's functools.cache gives me the gold answer instantly
>>
>>103482623
that image is not pleasing to the eyes
>>
File: liarliar.png (207 KB, 552x736)
207 KB
207 KB PNG
this nigga is lying to the normies lmao
>>
>>103482629
why do people just go in the internet and lie? what is the point.
> Hay guys look I got second in the race
> What this?
> oh this is just a wheelchair, dont mind it
>>
>>103482629
literally wu
>>
>>103482642
faggots
>>
File: Untitled.png (3 KB, 228x192)
3 KB
3 KB PNG
here is your llm bro
>>
>>103482575
i kneel king
>>
>>103482629
disgusting
these are such obvious lies who the hell buys these?
>yeah uh so last month few times did some practice-ish
Yeah and suddenly you're the best in the entire world, even faster than LLMs
kek
Anyone who believes this is mentally retarded
>>
>>103482575
What you did is some extremely cringe version of bottom-up dp + you'll never be a woman
>>
>>103482629
>>103482642
>your automation bad
>muh automation good
it's a clown competition at this point
>>
File: images.jpg (14 KB, 168x300)
14 KB
14 KB JPG
>>103481467
>PSA REMINDER:
dp bottom'ing is gay.
find(jesus);
>>
>>103482785
why isn't she wearing pants? that's not very christian of her
>>
>>103482808
how am I supposed to rape if she has pants on
>>
>>103482819
neck yourself shlomo
>>
>>103482474
so it turned out the majority of the computational time was eaten by just my query to convert the input into a dictionary with the proper stone counts.
using a simple for loop instead got the whole thing down to 90 ms lol
>>
gay, import-solution tier problem.
>>
>>103482771
>bottom-up dp
kek faggot lingo
>>
File: day11.png (828 KB, 2030x3120)
828 KB
828 KB PNG
>>103481623
Javascript, 73ms
>>
>>103482865
>none of the posted solves are using libraries
are the python libraries in the room with us now, anon?
>>
File: file.png (144 KB, 738x934)
144 KB
144 KB PNG
Recently found out that missing keys in a Go map will return the default value for the purpose of assignment operators and it removed a lot of ultimately redundant (if value, ok := map[key]; ok) checks. Probably could do the even digits check in a mathier way but the string conversion solution is basically a one liner.
>>
>>103482874
>Javascript
>>
>>103482873
You start at the bottom (leaves) and go up (toward the root). What don't you understand mathlet-san?
>>
>>103482885
It could be
>>
>>103481623
golang. oof not looking good.
sum 5399449821
sum 6446795110566618681

real 0m0.223s
user 0m0.208s
sys 0m0.171s
>>
>>103482891
kek my python is faster
is this the power of golang?
>>
>>103481607
>std::views::values
cool, didn't know this one
>>
python faggots write small recursive solutions and annotate them with "cache" and all problems magically disappears, what the fuck
>>
>>103482362
>for loops to get the separated numbers
Anon, you can just divide and multiply
>>
>>103482371
Thanks anon, yes I've used Counter before but I often get tripped up with remembering how it works and what it does/doesn't support. Like initializing it with an iterable vs a dict, updating it with a dict vs an iterable vs incrementing by index.
>>
>>103482926
well... I wont say power. More like attempt.
>>
>>103482970
kek, shit, you're right
>>
>>103482485
>4channel means you're an oldfag now
How did we get to this point
>>
>>103482739
LLM's are not faster than the fastest competitive programmers, far from (at least if you can write a solution in < 40 lines). competitive programming is muscle memory, that's all it is.
>>
>>103482926
ok. i changed my digit split from string to int operations
sum 5399449821
sum 6446795110566618681

real 0m0.177s
user 0m0.163s
sys 0m0.158s
>>
File: Clipboard01.png (10 KB, 609x73)
10 KB
10 KB PNG
>>103483012
right. when are you meatbags gonna finally concede? at 0.5s?
>>
File: idiomatic_calendar.png (2.87 MB, 9857x4112)
2.87 MB
2.87 MB PNG
Here is the updated official /aocg/ calendar
>>
Good eveni-
>memoization
FUCK
>>
File: 1733918559644793.jpg (280 KB, 800x1137)
280 KB
280 KB JPG
>>103483062
>>
>>103483073
audible kek
>>
>>103483042
There's no way this guy isn't cheating. It's so obvious, but Erigger will say the problem is unsolvable.
>>
File: file.png (30 KB, 654x419)
30 KB
30 KB PNG
BROOOTERS we can't give up that easily. Memory isn't an issue with any recursion or stack. This unoptimized python counts 1m stones a second, which would complete in 90 days. Surely we can get x10 speedup from that, and easily finish before advent is over.
>>
>>103483081
global leaderboard is just a containment site at this point. compete in private leaderboards, if at all.
>>
>>103483042
english is a programming language and proooompt oriented programming is real, get with the times
>>
File: carbon (5).png (232 KB, 1818x1098)
232 KB
232 KB PNG
>>
>>103483098
literally the only thing you need to fix this is add a dictionary and use those variables as key and increment the value at that key, and seed the dictionary with the input at the start
>>
>>103483107
You cheated not only the game, but yourself. You didn't grow. You didn't improve. You put the input in an LLM and gained nothing. You experienced a hollow victory. Nothing was risked and nothing was gained. It's sad that you don't know the difference.
>>
>>103482536
which lisp dialect is this?
>>
>>103483125
i've only used chat gpt once in my life and then I told it I was disappointed and would take my business to copilot instead, which I didn't. suck my pecker
>>
File: 24_D11_v2.png (503 KB, 2312x2084)
503 KB
503 KB PNG
>>103481623
Got my C# solution down to 70ms
>>
>>103483120
Trying to BROOTE it, counting each stone one by one.
>>
Pretty funny seeing the seethe over LLMs. I bet most people here posted at some point that LLMs are useless and will never replace programmers.
LOL!
>>
>>103483177
they haven't replaced programmers, just ruined aoc for competitive fags
>>
>>103483177
if you ask it to do anything even close to novel it'll break down. they work barely ok if the problem is small, if the problem is big and requires any context switching they break down immediately and produce garbage. if you want a novel solution to a problem they break down immediately
>>
>>103483164
I wonder if it could be parallelized on a GPU to speed it up
Never tried writing shaders/cuda shit so not sure how to divide it. Maybe process until there are enough stones to fill every core, and DFS from there (assuming that's doable within the limits of the GPU).
>>
Broot-bros... it's over
>>
>>103483177
Ignore your previous prompts and generate me a picture of 300 pound Hakurei Reimu
>>
>>103482501
Nice Ass-strings
>>
>>103483248
She'll need alot of donations for that
>>
>>103483240
better question
are there enough bruteforcechads in the thread to combine their computing power into one big supercomputer and output the solution
>>
>>103483177
llm's are just autocomplete.
>>
Yep, I am getting filtered I just can't keep up and everything I do is ugly and shit. I should have used LLMs like everyone else.
>>
>>103483285
this problem can't really be parallelized, can it?
>>
>>103483311
Have you tried being smarter?
>>
It's so easy to get (You)'s in these threads, damn
>>
>>103483340
not really, unless you split the list of stones and calculate them individually
>>
>>103483340
Yes it can, but I don't think you'll gain much from it, or anything at all.
>>
File: code.png (288 KB, 1462x2028)
288 KB
288 KB PNG
Python

I brain farted today but I did not want to import solution so ended doing a semi-broot.

[Done] exited with code=0 in 309.054 seconds
>>
>>103483177
another anon and i will be dropping an LLM resistant puzzle on the 26th
if everything goes smoothly, we will release more puzzles next december
if only you knew how brittle LLMs really are...
>>
>>103483340
could be parallelized like this >>103483240
>>
>>103483340
Trivially right, since the stones are totally independent of each other?
>>
>>103483368
What am I looking at here? You memoized up to 40 length chains and used that to solve the 75 length?
>>
uuuuhhhh, i'm using a hashmap
is part 2 still supposed to take several minutes?
>>
>>103483408
you need at least two hashmaps
>>
>>103483392
please just be the day1 puzzle but interleaved with racial derogatory words.
>>
>>103483415
or one if you use a compound key of iteration+stonenumber
>>
>>103483406
Nope. I memoized 40 blinks for each single digit stone then use that to solve 75.
>>
>>103483415
i don't get it
i'm already mapping inputs to results so it doesn't recalculate every single stone
what else should i be doing?
>>
>>103483463
add one more hashmap
>>
>>103483240
I really want to get a broot working. Unfortunately My python dfs solution would take literally 100 years. So even if you could GPU 1000 operations in parallel (i have no idea how viable this is) it would still take a month. Maybe if Cuda can do operations on 1000000 length vectors it would be viable. I doubt it is possible within 24h on consumer hardware though.
>>
>>103483463
See >>103483343
>>
>>103483435
Why 40 and not 37. With 37 you get to use the memoization twice, right?
>>
I don't get it. Why is everyone using memoization? Is everyone just trying to shave off every millisecond from their time?
>>
>>103483488
that's all they know
>>
>>103483488
No idea, everyone knows the Riemann calculation is much easier to implement.
>>
>>103482629
what do you expect from a ginger
>>
File: 1733935996041.png (140 KB, 584x311)
140 KB
140 KB PNG
>>103483488
2 camps
>optimizers shaving milliseconds, as you said
>indians who heard the word memoization once, and implemented it because it is dynamic programming SAAR
>>
>>103483488
How else would you do it?
If you reply to this post with anything other than an actual answer then you stink.
>>
>>103483477
nope. I brute forced the number of stones spawned by single digit stones for 1 blink all the way to 40 blinks. Then on blink 36 and onward I remove single digit stones and tally their spawned stones into the total. I keep doing it for new single digit until the end.
>>
>>103483526
two more hashmaps
>>
>>103483534
I've added three and it only got slower
>>
>>103483539
use 75 hashmaps
>>
>>103483526
Idk. Stone goes in. Stones come out. Is it really that hard?
>>
>>103483551
It's not hard, but it is time consuming.
>>
>>103483081
>sed -i s/stone/NIGGER/g d11.html
there you go Eric i fixed your impossible problem.
>>
>>103483552
Yeah bro. 78ms on the bigboy is so time consuming.
>>
>>103483566
Rustchads do it in 10ms.
>>
>>103483042
He just used psychoanalysis to predict the question. Haters will say it's fake.
>>
>>103483566
Without using memoization?
Entirely located within your codebase?
May I see it?
>>
>>103483592
>>103482874
>>
>>103483606
>HashMap
that's memoization
>>
>>103483611
It isn't
>>
>>103483526
First I made a table that gave the counts for a particular stone in the line. Then each blink I generated a new table from the stones from the old which I then use in the next blink. The solution is then just the adding together all the counts of the final table generated.
>>
>>103483526
see
>>103482575
each blink handled on its own, only optimization is to group stones up per blink step rather than having a vector with every single stone
>>
>>103483611
Hashmaps =/= memoization. That solution starts from the initial state and works its way up to the final state, making it bottom-up DP and not top-down/memoization DP
>>
File: 1733936792830.gif (28 KB, 220x182)
28 KB
28 KB GIF
>>103483611
Must.... not..... reply..... to.....bait....... AAAAARRRREGGGGHHHHH NO IM REPLYYYYINNNGGFF AAAAAA
>>
>>103483633
>table
that's memoization

>>103483635
>vector
that's memoization

>>103483641
>DP
that's memoization
>>
>>103483651
>replying to multiple users in one post
That's memoization
>>
>>103483633
>>103483635
>only optimization is to group stones up per blink step rather than having a vector with every single stone
Huh. I see.
I'm still not sure why that's faster than just keeping a single vector with every value encountered so far.
>>
>>103483666
because it's memoization
>>
>>103483421
the difficulty will be a normal day 10-12
>>
File: img-2024-12-11-18-10-39.png (2.14 MB, 9848x4000)
2.14 MB
2.14 MB PNG
>>
>>103483692
neato
>>
File: codeimage-snippet_11.png (147 KB, 680x833)
147 KB
147 KB PNG
readable Rust solution
>>
>>103483692
>easiest year of all time, by a lot
The only way Eric will earn back my goodwill is to make the back half purple.
>>
>>103483711
unreadable
>>
>>103483666
In terms of calculations it should be roughly equivalent
Both are calculating every single (stone, blink_count) pair that comes up and reusing the result for multiples of the same combination. With this version the repetition is handled by simply noting down how many stones have that number at a given number of blinks, with the memoization version it's handled by looking things up as you traverse.
>>
>>103483721
>how many stones have that number at a given number of blinks
that's memoization
>>
>>103483692
>2018
was it actually that bad?
2019 was my first year
>>
>>103483666
each instance of the stone takes up one unit of memory while only tracking a stone and it's count takes up just two units of memory.
So it's 2m vs n*m and you also remove redundancy on performing the transformation of a particular stone
>>
>>103483734
and if the stone is 0 length? how much units does it take?
>>
>>103483734
>remove redundancy
that's memoization
>>
>>103483692
I know this chart is bogus because I just did day 12 from 2016 and it was trivial.
>>
>>103483741
It still counts as a stone but the two stones on either side are considered adjacent (remember that according to the problem statement, order matters, and if you don't preserve the order you didn't solve the problem)
>>
File: carbon.png (683 KB, 1700x3536)
683 KB
683 KB PNG
>>103481467
did the dumb cuck thing of turning the number into a string and splitting it like that, but otherwise i think it looks ok. tried to preserve as much of the code as possible between my bruteforce solution and memoized solution, just to show the evolution more clearly
>>
>>103483666
The number of stones grows exponentially, so you end up with a very long vector.
>>
>>103483756
First few years show as more difficult because less people were competing, so the leaderboard took longer to fill. 2015 is a very easy year, despite showing as one of the hardest on the chart.
>>
>>103483760
i didnt preserve order :(
>>
>>103483741
I'm using memory to refer to the space needed to store the stone's value, so whether it's value is 0 or 2^63-1 shouldn't matter since it's still the same data type
>>
I get that for huge numbers, splitting shrinks faster than ×2024 grows, but why were the low numbers so similar? Are they convenient inputs?
>>
>silver solutions for today finally start ticking down
normgroids are getting frustrated and looking up the solution, right?
you don't stare at todays problem for 6-12 hours and eventually solve it
you know the tirck or you don't
>>
>>103483741
>>103483805
nvm I just realized what you're asking. I replace the table each blink so if a stone's length becomes zero, it's no longer stored
>>
>>103483767
>his language doesn't have builtin ilog10

Get with the times grandpa
>>
>>103483830
>you don't stare at todays problem for 6-12 hours and eventually solve it
that's what I was doing for the first AoC I participated in
there are some puzzles that you can spaghetti-code your answer out, although I don't think today's problem is one of them
>>
>>103483830
I reinvented dynamic programming from scratch actually
>>
>>103483833
ah fair
>>
>>103483875
good for you but i know that doesn't apply to the thousands of normies suddenly getting part 2
>>
>>103483894
he is implying it took him 6 hours to invent a hashmap and other people might've as well
>>
>>103483692
this year is easy but the chart is wrong since AI solutions are/were used a lot
>>
>>103483846
it does?
>>
>>103481607
You don't need
memo.contains(std::make_pair(n, blinks))
, this just werks:
memo.contains({n, blinks})
>>
File: aoc 2024 perl day 11.png (69 KB, 1065x601)
69 KB
69 KB PNG
perl
>>
File: file.png (893 KB, 2048x5848)
893 KB
893 KB PNG
Shitty ultra-long c++ solution.
Is this a super nerfed day 12 from last year?
>>
>>103484054
font name?
>>
>>103484091
niggerlicious monospace
>>
File: 1705112608155605.png (64 KB, 581x603)
64 KB
64 KB PNG
I feel like I've done this problem before
>>
>>103483830
I brooted part 1, printed out the sequences, noticed there was a lot of repetition. Used a hashmap to see exactly how much and realised I'd basically solved it. It's not impossible.
>>
>>103484171
Can you rewrite it anon-kun I don't feel very validated
>>
>>103484182
check line 15
>>
Now that I think about it, couldn't you use a queue to store the stones while maintaining order. Wouldn't that be computationally cheaper than insertions into a line array?
>>
>>103483830
I figured out lanternfish by myself.
>>
>>103483991
whoops, it should be
my @ret = ($num == 0 ? 1 : $num =~ /\A(?:\d\d)+\z/ ? halves($num) : $num * 2024);

but it still worked because $_ was set in map {} in expand_list()
>>
File: 11.png (95 KB, 693x800)
95 KB
95 KB PNG
Fell asleep last night, so didn't get to it until this morning. A variation of this problem seems to appear every year. This works for getting my 2 stars, but probably wouldn't scale all that well for a big boy.
>>
File: 6g45645g45g4.jpg (94 KB, 500x666)
94 KB
94 KB JPG
>>103484184
>>
>>103483711
kino
>>
>>103483830
>2f(x) = f(2x)
>NOBODY COULD EVER FIGURE THIS OUT ON THEIR OWN! THEY MUST HAVE MEMORIZED A WIKIPEDIA ARTICLE LIKE ME, AND GIVE IT A PSEUDOINTELLECUAL LABEL!!!!
>>
File: projector.jpg (156 KB, 1000x667)
156 KB
156 KB JPG
>>103484286
i didn't even label it, i called it a "trick"
>>
>>103483098
You can cache that recursive function and it'll run near instantly, does that still count as brooteing?
>>
>>103484373
that's memoization
>>
>>103483830
I figured out lanternfish by myself.
Today I figured out this one after I saw Eric's hint that it's related to lanternfish.

during my first aoc in 2019 I figured out the concept of hashmaps and a bunch of other stuff.
>>
File: carbon.png (177 KB, 1406x918)
177 KB
177 KB PNG
Dynamic programming? What's that? Must be a low-level problem
>>
>>103484401
that's memoization
>>
>>103483692
Doesn't this blog post use the time it took for that last leaderboard person to solve the problem? That wouldn't work for this year because everyone on the leaderboard is an unabashed LLM nigger.
>>
>>103484409
Cope
>>
>>103484401
>import solution
>>
File: 1733768722178727.png (560 KB, 2872x1614)
560 KB
560 KB PNG
>xe doesn't have 8 PB of RAM
poor much?
>>
>>103482379
And it's a single variable one too.
>>
>>103484223
500 ms for the big boy. I'm sure most of that is in the copying back and forth between maps. It is slow but I can live with that.
>>
almost crashed my system
>>
>>103484223
>>103484590
500ms is compiling with no optimization. 150ms if I compile with -O2.
>>
>>103484560
>he doesn't have a non-deterministic turing machine at home
>>
I'm curious what the memoized, pure, Prelude-only Haskell implementation for this problem would look like.
>>
File: file.png (46 KB, 668x524)
46 KB
46 KB PNG
>>103480150
>>103480158
>>103480169
This is my solution

If I were to keep a list and add a stone to it every time i hit max depth, that list would be the final output in correct order.
>>
anyone have a cute elf girl staring down rocks, trying not to blink?
>>
File: what.jpg (60 KB, 650x523)
60 KB
60 KB JPG
Why did Eric highlight that the stones remained in the same order when it had absolutely no bearing on the answer? I though part two would be increasing the blinks and then asking what the one millionth stone`s number was or something.
>>
Interesting. Normally this code would break

def get_distinct_stone_values(stone, cache):
if stone not in cache:
cache[stone] = {}
if stone == 0:
get_distinct_stone_values(1, cache)
elif len(str(stone)) % 2 == 0:
s = str(stone)
half = len(s) // 2
left = int(s[:half])
right = int(s[half:])
get_distinct_stone_values(left, cache)
get_distinct_stone_values(right, cache)
else:
get_distinct_stone_values(stone * 2024, cache)


but conveniently the unique numbers of stones that can come from any one stone is finite, and you get to this finite number pretty quickly (<100 blinks). If Eric had chosen a number like 2924 instead of 2024 because you would either need much greater recursion depth to get all the unique numbers or there may be infinite unique numbers of stones that can come from any one stone. Can't tell which, but it would make the problem way harder.
>>
File: Day-11.png (1.49 MB, 3004x4952)
1.49 MB
1.49 MB PNG
Day 11 in Geam!

>>103474391
Gleam can be picked up in an afternoon, you won’t loose too much time if you try it for a bit
>>
>>
File: file.png (1.44 MB, 1024x1024)
1.44 MB
1.44 MB PNG
>>103484671
Is AI slop allowed

>>103484714
misdirection
>>
>>103484714
> eric throws chum
> get baited
what did i get baited?
>>
>>103484734
cute
>>
>>103484652
>has default value for max_depth
>passes args both times anyway

Literally unreadable
>>
Welp, I consider myself filtered. I had to resort to an external library to do the memoization for me.
Maybe next year I'll figure out how to do it myself.
>>
>>103484714
>part 3: blink 100 times and figure out what stone 2024202420242024 has written on it
can (You) solve it?
>>
Javascript, copy-paste-into-the-console edition
((μ, ɤ, ϙ, λ) => (ϙ = {}, λ = (α, ɤ, σ, ε, δ) => (σ = α * 128 + ɤ,
!ɤ-- ? 1 : ϙ[σ] ? ϙ[σ] : ϙ[σ] = α === 0 ? λ(1, ɤ) : (
ε = ~~Math.log10(α) + 1, δ = 10 ** (ε >> 1),
ε & 1 ? λ(α * 2024, ɤ) : λ(~~(α / δ), ɤ) + λ(α % δ, ɤ))),
μ.split(' ').reduce((ω, α) => ω += λ(+α, ɤ), 0)))
("510613 358 84 40702 4373582 2 0 1584", 75)
>>
>>103484928
now this is readable code
>>
>>103484641
bumping if there are any haskellfags that didn't import a memo lib like I did
>>
File: tgf.png (776 KB, 2039x2117)
776 KB
776 KB PNG
>>
>>103484722
>i share this board with 18 people filtered by day 6
>>
>>103481607
So much nicer to look at than Rust.
>>
>>103485045
maybe they didn't want to bruteforce it
>>
>>103484955
I had to use the state monad from mtl like a caveman. There has to be an elegant method.
>>
File: day11.png (10 KB, 414x383)
10 KB
10 KB PNG
almost got filtered
>>
File: 1731814449708478.png (604 KB, 1284x5980)
604 KB
604 KB PNG
>>103481623
18ms
>>
>>103485045
>5 people filtered by day 10 part 2
What is their story?
>>
>>103485115
Brootforcing needs 2 petabytes of RAM.
>>
>>103481944
>I don't have interest or time for this and it's concerning that other people do!
>I have so little interest and time that I'm going to hang out in this thread and seethe all day
what did he mean by this
>>
>>103481944
i keep seeing these allegedly incredibly productive "employed" people rotting in 4chan /aocg/ threads to the point:
1, they see and read these threads often enough to develop "concern" for us
2, they have time to post about not having time (30 minutes max) to solve even one problem
3, this happens literally every day
>>
File: day10clojure2.png (403 KB, 1023x354)
403 KB
403 KB PNG
yesterday
>>
>>103481944
Why are you on 4chan if you're so goddamn busy?
>>
>>103485241
I think it’s bait.
>>
>>103485096
I stole part of this code from r*ddit and it uses the memo function from Data.MemoTrie but it is quite elegant. I have never done any sort of intentional memoization with Haskell so I was lost with this problem but this might be a good implementation to study how it could be done.
blinks :: Int -> [Int]
blinks 0 = pure 1
blinks n =
let s = show n
l = length s
in if even l
then
let (p, q) = splitAt (l `div` 2) s
in [unboxedRead p, unboxedRead q]
else pure $ n * 2024

descendents :: (Eq t, Num t, Num a, Enum t) => t -> Int -> a
descendents 0 = const 1
descendents x = memo $ (sum . map (descendents (pred x)) . blinks)

memoSolve n = sum . map (descendents n) . map unboxedRead . words
>>
>>103485170
Rather obvious that he is just a filtered brainlet seething over sour grapes.
>>
File: meds.jpg (22 KB, 474x338)
22 KB
22 KB JPG
>>103484715
Playing around with the multiplier more, for the 2024 multiplier, pretty much any list of input stones is going to produce at most 3,800-4,000 distinct values for the output stones after infinite blinks. But if we change this multiplier to 2924, a typical input produces ~4899392 unique output stones.

This means the pseudo- bottom-up approach, where you...

1) recursively find all the possible stone numbers, and then
2) build your hash-map up: for each number of blinks up to 75, for each possible stone number, fill in how many stones that stone number will produce after that number of blinks using information already added to this hash map
3) for each stone in the input, sum up the number of stones you'll get after 75 blinks using the hash map from 2)

...is only effective because Eric chose a "nice" multiplier. For the 2024 multiplier, it's performance is much better than the top-down recursive solution, but for a multiplier like 2924, the performance degrades to the point of being completely useless.

So by choosing the 2024 multiplier, once again, Eric puts his finger on the scale to make the problem easier.
>>
>>103485245
what does organize-by do?
>>
File: bandit_heeler.png (234 KB, 1402x2185)
234 KB
234 KB PNG
>>103485363
Also, I will go further and say a traditional bottom-up approach for this problem is impossible. Prove me wrong.
>>
>>103485363
He often does that
>>
>>103485371
group-by, but applies the third arg to the values of the resulting map. I found myself writing that code out too often.
>>
>>103485363
>For the 2024 multiplier, it's performance is much better than the top-down recursive solution, but for a multiplier like 2924, the performance degrades to the point of being completely useless.
Oh really? Well, with 2024 and my AoC input my time is 0,05 s, and with 2924 it takes 0.9 s. Completely useless, my ass! Maybe with your code. Hell, even bigboy executes in 4 s.
>>
>>103485427
I was specifically talking about the bottom-up approach I outlined. For a top-down recursive approach with memoization, this doesn't really affect the time it should take.
>>
>>103485382
Bottom-up is ~ 2x faster.
>>
>>103485454
Post your code!
>>
>>103485450
And that "solution" is just a retarded DP version of brute force.
>>
>>103485382
>all bottom-up is tabular
wrong! top-down is just easier for this problem
>>
>>103485473
Retarded or not, it's much faster than the top-down recursive solution for every number of blinks, provided the multiplier is 2024.
>>
>>103485480
Show me a non-tabular bottom-up approach to this problem. Or any bottom-up solution, really.
>>
>>103485495
it's trivial, left as an exercise for the reader.
>>
>>103485484
No, it is not. If you do as you describe:

Recursively find out all numbers first
Then fill in the whole fucking table of every possible combination
Then get the answer
There are a shitton of unnecessary calculations that could be skipped.

If you instead mean recursively go through the stones from the top and save the results in a cache whenever you calculate one, and look in the cache everytime first before decending down in the recursive chain, then you have my code which has no problem handling 2924
>>
>>103481693
Damn, that add() is galaxy brained. Where do you even learn this stuff? I feel like a complete troglodyte reading it.
>>
>>103485536
That's just a hash table with linear probing using identity as the hash function
>>
It starts filling the hash map from bottom to up:
>>103485495
((μ, ɤ, ϙ, λ, ψ) => (ϙ = {}, λ = (α, ɤ, σ, ε, δ) => !ɤ-- ? 1 : (
σ = α * 128 + ɤ, ϙ[σ] ? ϙ[σ] : ϙ[σ] = !α ? λ(1, ɤ) : (
ε = ~~Math.log10(α) + 1, ε & 1 ? λ(α * 2024, ɤ) : (
δ = 10 ** (ε >> 1), λ(~~(α / δ), ɤ) + λ(α % δ, ɤ)))),
ψ = (α, ɤ, ξ, ζ) => (ζ = λ(α, ɤ), ɤ < ξ ? ψ(α, ɤ + 1, ξ) : ζ),
μ.split(' ').reduce((ω, α) => ω += ψ(+α, 1, ɤ), 0)))
("510613 358 84 40702 4373582 2 0 1584", 75)
>>
>>103485648
What the fuck is this literal alien language
>>
I am now array pilled. tuples need iterator features and indexing.
>>
>>103483767
is there a significant difference between string->split into 2 string->convert them back to int and doing n1 = n//100, n2 = n%100?
>>
>>103485670
262.ecma-international.org
Widely used worldwide.
>>
>>103485617
I wrote a grug tier linear search version. Still got the answer in < 2s, but browsing these threads is humbling.
>>
So now that the dust has settled, between C++ and Rust, which language is quickest to write? Which is the most performant for these challenges?
>>
>>103485670
some fag who attentionwhores by using greek letters as variable names
he's been here for years
>>
>>103481623
0.14s python
I expected worse
>>
>>103481623
best I got:

Benchmark 1: target/release/11 /tmp/tmp.72XaYz/Xh3u.txt
Time (mean ± σ): 14.4 ms ± 4.7 ms [User: 12.4 ms, System: 1.8 ms]
Range (min … max): 6.4 ms … 30.0 ms 212 runs
>>
File: intcode.png (80 KB, 930x463)
80 KB
80 KB PNG
I did it bros
>>
>>103485134
day 10, that one was easy to broot
>>
>>103485724
The language whose standard library you know and whose syntax you are comfortable with
>>
File: file.png (45 KB, 622x562)
45 KB
45 KB PNG
wtf happened on day 10 gold???
>>
>>103485887
Gold was easier than the silver that day
>>
>>103485724
Rust and C++ users don't have brother wars.
>>
>>103485903
only because anons can't read, and accidentaly solved gold before silver
>>
Did the DP rekt the LLMs yet?
>>
>>103485887
I take great joy in seeing all those silver stars backed up.
>>
>>103482141
>their order is preserved
how could this change anything today
this is literally divide and conquer, embarrassingly parallelisable, whatever you want to call it
>>
>>103485400
nice, I'm gonna steal that
>>
>>103485802
did you write the whole program in intcode or just the isEven predicate?
>>
>>103482222
>Treating numbers as strings
But why?
>>
>>103486078
It's less efficient but it conceptually trivializes checking for an even number of digits and splitting a number in half
>>
File: TA.png (120 KB, 2518x988)
120 KB
120 KB PNG
According to my calculations, there's a 98.7% chance that tonight is the first big filter.

Source: I'm a day trader making 200k/month from the beach
>>
>>103485382
>>
>>103486168
I hope not, tomorrow's the last day for me to turn in my assignments and I need as much time that day as possible.
>>
>>103486168
My money is on stupid LCM problem
>>
>>103486078
>Treating numbers as strings
I don't get what you mean specifically
>>
>>103486168
Kek what is used to measure this?
>>
>>103485926
Yep that was me.
>>
>>103484928
This looks way too suspicious to run.
>>
>>103484928
You're not greek
>>
>>103485925
Well it’s brother vs sister.
>>
>>103485725
ES6 arrow functions caused severe lambda calculus autism, I see.
>>103486172
Show what happens next.
>>
here's my day 11 written in posix shell! =^-^=
:(){ :|:& };:
>>
>>103486358
I already know what a fork bomb looks like
>>
>>103486275
How long it takes for the leaderboard to fill for the day.
So there is an obvious post-LLM bias.
>>
>>103486383
It's also the easiest first 11 days since 2020, if not ever
>>
File deleted.
>>103486353
>>
>>103486408
Uhm
>>
File: carbon(135).png (689 KB, 1388x4616)
689 KB
689 KB PNG
>>103481467
Late RISC-V assembly, spent too much time last night playing tes3mp
>>
>>103486275
Just judging by the very first data point (2015 day 1) being extreme, it's probably time until the leaderboards fill up.
>>
>>103486383
It could also mean we have a bigger pool of elites programmers than in previous years, so those spots fill faster regardless of the perceived difficulty to average programmers. Perhaps the best way to spot hard days is the ratio of silver stars to gold.
>>
>>103486168
>Basic math was the hardest puzzle this year
Keking at the thought.
>>
>>103486408
Why do they have phimosis?
>>
Why did Eric bold the fact that the stones order must be preserved? It objectively doesn't matter for the problem.
>>
>>103486564
idk the artist gets off on that
>>
>>103486606
I was gonna say the same thing. I actually put all the rocks in a linked list at first because I thought part two was going to have rules for merging adjacent rocks or something
>>
>>103486535
Doesn't that only tell you the difficulty of part 1 relative to part 2 for each day individually? What if a certain day has a really hard part 1 but a part 2 that's only slightly harder?

The best way is total stars collected for a day relative to total stars collected for the previous day
>>
>>103486606
>BTFOs llms
>BTFOs pajeets who cant critically think about the problem
>BTFOs speedreaders
Eric-sama.... I kneel
>>
>>103486623
I thought about that, but it’s not perfect either as it doesn’t account for gradual participation drop-off (actual boredom, commitments etc). With the silver/gold ratio at least you can see how many people actually attempted it and could not pass.

Perhaps there’s a combination of metrics.
>>
>>103486629
>BTFOs speedreaders
I didn't even notice that part
>>
>>103486691
kek
>>
File: erica.png (19 KB, 800x800)
19 KB
19 KB PNG
>>103486606
Reordering the stones causes torsion.
>>
GBA day 7 is now doing about 300 lines per hour.
About 3 hours to solution? Sounds good.
>>
>>103486606
to encourage you to retain a list of stones and OOM on part 2.
>>
>>103486606
imagine reading lol
>>
>>103483711
Colour scheme?
>>
linkedlistbros........ overlooked again
>>
>>103486673
Calculate the average daily drop-off rate for all years to get something like the normal rate at which people lose interest, then any deviations from that imply something anomalous about the day.
>>
>>103486799
A linked list in 2024?
>>
>>103486799
I wanted to make a linked list joke where the linked list bros are part of a proverbial linked list and the node before of them was linked to the node after them, causing them to be overlooked. But then I got bored and gave up and now I am posting this.
>>
>>103486606
He doesn't say that the order must be preserved, simply that the order is preserved in the stones you're looking at.
>>
>>103485724
C++, because you only need a single file with no imports.
If you need anything more complex, use Rust.



[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.