Beep Boop Bip
[Return] [Entire Thread] [Last 50 posts] [First 100 posts]
Posting mode: Reply
Name
Email
Subject   (reply to 3044)
Message
BB Code
File
File URL
Embed   Help
Password  (for post and file deletion)
  • Supported file types are: BMP, C, CPP, CSS, EPUB, FLAC, FLV, GIF, JPG, OGG, PDF, PNG, PSD, RAR, TORRENT, TXT, WEBM, ZIP
  • Maximum file size allowed is 10000 KB.
  • Images greater than 260x260 pixels will be thumbnailed.
  • Currently 1077 unique user posts.
  • board catalog

File 16698735903.png - (1.55MB , 1920x1080 , SUPPA HAKKA.png )
3044 No. 3044 [Edit]
Hello gentlemen, and welcome to the Advent of Code: TOHNO-CHAN Edition.

Post your solutions!
Ask questions!
Have fun!

Leaderboard: 1795791-8781b07c
Expand all images
>> No. 3045 [Edit]
And my sincerest apologies for belatedly making this thread!
>> No. 3047 [Edit]
File 166987638571.png - (77.84KB , 864x682 , event1-1.png )
3047
Allocations for days!
>> No. 3048 [Edit]
File 166987654219.png - (81.38KB , 830x756 , event1-2.png )
3048
Performs slightly worse, probably due to allocating an array for sorting.
>> No. 3049 [Edit]
>>3048
Disregard that, after increasing the N, this solution performs about as well as the initial one that I didn't post.
>> No. 3050 [Edit]
File 166992394650.png - (257.62KB , 1636x1198 , carbon.png )
3050
I completely forgot about advent of code...
Last year was my first time participating, I ended up lasting until day 18.

This year the goal's to finish it... but in common lisp!!

I got interested in it some time ago but never ended up using it for any projects, so this is a nice excuse.

It's really hard to get used to the lisp way of thinking again though, it's been a while since I wrote any lisp code and it was never much to begin with.
>> No. 3051 [Edit]
>>3050
Thank you for your participation and enthusiasm! Your solution is aesthetically pleasing, and it's composed well too.
>> No. 3052 [Edit]
File dayoneptone.c - (898B )

3052
I tried this but got absolutely crushed on the very first challenge. I'm pretty sure not only does my program not work, it is also a monstrosity judging but how succinct most programs of the kind seem to be.
>> No. 3053 [Edit]
>>3052
You're doing it in C, it's terrible for doing any sort of string processing. Your error handling is also not idiomatic, would recommend looking at established codebases, but that shouldn't impact correctness. Could you also please indent or format your code? There's no need to separate declaration and assignment unless you're using some ancient C spec (and if you're using C, why make things harder on yourself)?

You're also reinventing the wheel a bit, you don't need to read 1 char at a time, you can read the entire word and do atoi. Or use scanf. Just generally, I'd recommend looking at the "boilerplate" code for icpc type problems which will show you how to read from stdin/stdout in C.

So the short answer is that you're doing this at a much lower level than you need to be, even if you stick with C.

As for why the solution is incorrect, I think fgetc already increments the file offset, so you don't need to do it manually?

Post edited on 2nd Dec 2022, 11:51am
>> No. 3054 [Edit]
File 167001027871.png - (837.60KB , 1868x3386 , carbon.png )
3054
I'm ashamed of how ugly my solution is...
It took me quite a bit of time too, but I'll keep going. Just hope I improve in the next few days, otherwise I'll be getting filtered even sooner than last year.
>> No. 3055 [Edit]
I feel like a pleb since I just used an associative array to map the hands to a result. There's probably an elegant solution via math, but I didn't have much time for research.

>>3054
I feel you, friend.
>> No. 3056 [Edit]
File 167004732234.png - (141.34KB , 1532x2474 , carbon.png )
3056
The unga bunga continues.
>> No. 3057 [Edit]
File 167007493491.png - (517.76KB , 1852x2158 , carbon.png )
3057
Oh yeah, it's going much smoother than before


>>3056
I've been meaning to ask, what language is this? It looks really nice.
>> No. 3058 [Edit]
>>3053
Yeah, you're right. The reason I tried it in C is because it is the only language I know something about. As for the reason the program did not work, I don't really know. The fseek served as an way to check if there would be 2 '\n', I used it forwards and backwards so it wouldn't mess with fgetc. For some reason this program refuses to do anything. I tried printing some values, or just anything and random points in the code, and nothing comes out. It seems after the program tries to open the file it refuses to do anything and ends. The compiler accused something on the feof condition. But yeah, I should probably redo it from scratch again.
>> No. 3059 [Edit]
>>3058
Possibly how you specify the path is wrong, I don't know anything about windows or how libc functions work with whatever wacky stuff windows does. Also printf is buffered, so if you don't immediately flush you won't see any output until program ends.
>> No. 3060 [Edit]
File 16701555787.png - (333.33KB , 1716x1488 , carbon.png )
3060
My code is getting shorter!!
Or maybe today's problem was just easier... It did feel like that
>> No. 3061 [Edit]
File 167018984199.png - (182.56KB , 2148x1352 , carbon.png )
3061
Pretty easy, but my brain decided to shut off near the end for some reason.

>>3057
>I've been meaning to ask, what language is this? It looks really nice.
D, part of the Island of (Programming Language) Misfits.
>> No. 3063 [Edit]
File 16702707812.png - (628.21KB , 1552x2872 , carbon.png )
3063
Today's one was a huge pain to parse for me...
>> No. 3064 [Edit]
>>3063
It was a fun time for sure. Among the three of us on the leaderboard, there's a guy who easily knocked it out. So congrats to him! [Unless that's you, in which case, congrats to you!]
>> No. 3065 [Edit]
File 167032597892.png - (297.44KB , 1130x1570 , carbon.png )
3065
Pretty easy today, I guess you were supposed to get fucked over in part 2 if you settled for a bruteforce solution first.

>>3064
>Unless that's you
Heh, that's definitely not me... I only ever get to do the problems at least 5 hours after they're released, and even then it takes me a while.
>> No. 3066 [Edit]
File 167032916090.png - (195.37KB , 2414x1538 , carbon.png )
3066
I was hoping for something more interesting than this, but I'll take it over the last one, but to be fair, I was running into some linker issues.
Also, where the hell are the other two people? I'm heartbroken.
>> No. 3067 [Edit]
>>3066
I'm busier than expected. I'll try and play this weekend.
>> No. 3069 [Edit]
>>3065
Man, I didn't think of using a hash table at all. This is why I like seeing other solutions.
>> No. 3070 [Edit]
>>3069
I'm not well-versed in either D or lisp, is the

buf.canFind!(ch => buf.count(ch) > 1) ? 0 : i


just checking if buf is comprised of all unique characters (i.e. no char appears twice?)
>> No. 3071 [Edit]
>>3070
It is indeed. Another way to do it would be this:
signal[i..min(i+k, $)] .staticArray!k[] .sort() .uniq() .walkLength == k ? i : 0

>> No. 3072 [Edit]
File 167038124237.jpg - (90.47KB , 559x421 , aocd1p1.jpg )
3072
late starter here. Day 1 first challenge.
>> No. 3073 [Edit]
File 167038330682.jpg - (101.16KB , 588x407 , aoc_d1p2.jpg )
3073
>>3072
day 1, 2nd puzzle
>> No. 3074 [Edit]
My kludgy day 6 solution in Python with minimal cleanup:
with open('input6.txt') as f: data = f.read().rstrip() print([j for j, s in enumerate([set(data[i:i+4]) for i, c in enumerate(data)][:-3]) if len(s) == 4][0]+4) print([j for j, s in enumerate([set(data[i:i+14]) for i, c in enumerate(data)][:-13]) if len(s) == 14][0]+14)

>>3064
>easily knocked it out.
I wouldn't say so. It took me a while too. And unlike you guys, I took the easy way out and used regexes for day 5. I even lost a lot of time failing to notice that I messed up one of them...
>So congrats to him!
Thanks.
>> No. 3075 [Edit]
File 167039114918.jpg - (68.78KB , 516x502 , aoc_d2.jpg )
3075
>>3073
day 2, 2nd puzzle.
First puzzle is the exact same, except that the map is different.
>> No. 3076 [Edit]
File
Removed
After two attempts that didn't go anywhere, a solution is begotten. Biggest thing that bothers me is the vestigial 'name' method, but I'm too lazy to remove it.

>>3072
Welcome aboard, anon! Seems we have two lispers now. >>3075 is concise as hell.

>>3074
I need to get back into python (and ruby). That looks slick.
>> No. 3077 [Edit]
File 167041287537.png - (433.88KB , 1692x4740 , carbon.png )
3077
Guess I wasn't that lazy after all! [Could a mod delete my previous image? Might as well not have it take any space.]
>> No. 3078 [Edit]
File 167043820480.jpg - (210.35KB , 1080x805 , aoc3-1.jpg )
3078
>>3075
>> No. 3079 [Edit]
File 167044965350.png - (13.85KB , 859x95 , screenshot.png )
3079
Finally getting it right felt so good...
>> No. 3080 [Edit]
File 167044972498.png - (933.44KB , 1770x4212 , carbon.png )
3080
>>3079
Forgot the code
>> No. 3081 [Edit]
File 167045273836.jpg - (147.82KB , 964x618 , aoc_d3p2.jpg )
3081
>>3076
>concise as hell
yeah, I've been doing these on my phone so far, so I have a strong incentive to keep keystrokes per puzzle to a minimum.
If time permits, I'll re-implement a few of these in assembly, just to see how I solve them when I don't have all these fancy standard library functions and data structures at my fingertips.
>> No. 3082 [Edit]
>>3081
I didn't like how I hard-coded the entire alphabet, but using bitwise manipulations made it even worse:
(defn priority [c] (+ (bit-and 2r11111 (int c)) (* 26 (bit-and-not 1 (bit-shift-right (int c ) 5)))))

>> No. 3083 [Edit]
File 167048020883.jpg - (160.05KB , 846x632 , aoc4_2.jpg )
3083
>>3081
day 4
>> No. 3084 [Edit]
File 167050104617.png - (290.73KB , 1540x3250 , carbon.png )
3084
I make hamsters seem intelligent.

>>3081
>yeah, I've been doing these on my phone so far, so I have a strong incentive to keep keystrokes per puzzle to a minimum
>I'll re-implement a few of these in assembly
Wow! T-C truly has all kinds.

>>3082
>I didn't like how I hard-coded the entire alphabet
Why is that?
>> No. 3085 [Edit]
File 167053148822.png - (695.48KB , 1620x3804 , carbon.png )
3085
I just sort of wrote what first came to mind for part 1 and thought I'd have to rewrite it into something more efficient, but turns out it's fine even for the large input.

I guess it wasn't that hard, but it still took me a while...
>> No. 3086 [Edit]
File 167054078417.png - (82.09KB , 610x878 , aoc5-1.png )
3086
>>3084
>T-C truly has all kinds.
oh don't worry, I'll get filtered by some math-heavy puzzle soon enough.

>Why is that?
Iterating through a long hard-coded sequence of characters is much less efficient than doing a small number of arithmetic operations.
On the flip-side, it would always work even if Eric decided to change the priority values of the symbols around, and not just in the special case where the priority symbols are in alphabetic order.
>> No. 3087 [Edit]
File 16705532136.png - (23.93KB , 517x228 , aoc6-2.png )
3087
>>3065
>Pretty easy today
yeah day 6 was definitely easier than the crane thingy
>> No. 3088 [Edit]
File 167063220313.png - (245.13KB , 1080x1920 , aoc2-1_asm.png )
3088
>> No. 3089 [Edit]
File 167065814672.png - (81.15KB , 576x534 , aoc10-1.png )
3089
feeling right at home with day 10
>> No. 3090 [Edit]
File 167098431680.jpg - (285.59KB , 939x976 , aoc13-2clojure.jpg )
3090
not quite filtered yet, just usually too busy to do these
>> No. 3091 [Edit]
File 167115550617.png - (97.21KB , 688x652 , aoc15-1.png )
3091
I have an idea how to tackle part two, but I'm off to bed for now.

Did you all lose interest or why did you stop posting anything in here?

btw, I started doing AoC this year to familiarize myself with Clojure a bit more, and I really like this language. Dead simple syntax that nevertheless manages to be very concise, good standard library, can be used in the browser, on the JVM or as an interpreted scripting language, is open source, can use most of the libraries of JavaScript and Java, and is reasonably fast. I'll be using it for any serious dev work from now on.
>> No. 3092 [Edit]
>>3091
I'm glad to see somebody still plugging away, bringing glory to T-C!

>Did you all lose interest or why did you stop posting anything in here?
Can't speak for the other of course, but I usually get to a certain point where I can't justify the amount of time I spend on an event instead of working on my actual projects. If I weren't a dumb-dumb, this wouldn't happen, but such is life. [I could read fewer manga, but that isn't happening.]

>can use most of the libraries of JavaScript
Are you referring to ClojureScript? Seems like a lot of functional/functional-esque languages can target JS in some way or another.
>> No. 3093 [Edit]
>>3092
>I can't justify the amount of time I spend on an event instead of working on my actual projects.
Yeah I get that, I myself didn't start until day 6 or so and have done only about half the puzzles. Today's problem in particular seems like something that would take me more time to solve than I'm willing to sacrifice, so I'm not even gonna try.

>Seems like a lot of functional/functional-esque languages can target JS in some way or another.
Yeah but most of them lack some key attribute that I'm after.
Haskell: syntax too complex, dev community doesn't care enough about backwards-compatibility
Elm: only usable for front-end web development, which is a very small part of the software I write
Scala: not functional enough, syntax too complex
Kotlin: not functional enough, I had difficulties trying to use it as an interpreted scripting language, designed by JetBrains to shill IntelliJ and you're screwed if you try to use anything else

There are also things I dislike about Clojure, of course, but on the whole I'm just angry that I didn't discover it sooner.
>> No. 3106 [Edit]
File 167366375333.jpg - (93.57KB , 599x377 , twosum_reduce.jpg )
3106
I've decided to try and make it a habit of mine to solve a programming puzzle from AoC or a similar site every Saturday.

I figure it's a good way to stop myself from forgetting programming languages that I haven't used in a while.
>> No. 3108 [Edit]
File 16737468612.png - (109.99KB , 789x885 , aoc7-2.png )
3108
>> No. 3266 [Edit]
File 169509943487.png - (92.89KB , 600x742 , aoc2022-8gold.png )
3266
>>3085
here's my solution for day 8
>> No. 3267 [Edit]
File 169524539133.png - (103.58KB , 548x942 , aoc2022_9-2.png )
3267
>>3266
day 9. The second puzzle was tricky because my initial solution worked fine for the extended example, but not for the actual input.
>> No. 3269 [Edit]
File 16957089193.png - (75.65KB , 534x875 , aoc2022-14-2.png )
3269
>> No. 3290 [Edit]
The Advent of Code approaches once more. Is anybody up for another round?
>> No. 3291 [Edit]
File 170062139441.png - (82.63KB , 596x957 , aoc12gold.png )
3291
>>3290
yeah I'll try to make time for the first week at least
>> No. 3294 [Edit]
File 170141869435.png - (90.04KB , 1748x512 , aoc2023day1.png )
3294
Part 1 was easy, but part 2 was probably the hardest day1 puzzle of any year.
I wonder if Eric was trying to trip up ChatGPT with this.

You can still use the leaderboard in the OP for this year's calendar, by the way.
>> No. 3295 [Edit]
File 170152261647.png - (56.67KB , 1048x306 , AOC.png )
3295
Day 2
>> No. 3296 [Edit]
File 170189886355.webm - (944.09KB , aoc2023day12.webm )
3296
>>3291
animated
>> No. 3305 [Edit]
File 170257879120.png - (76.03KB , 800x786 , aocday14part2clojure.png )
3305
today's puzzle was pretty fun
>> No. 3357 [Edit]
File daythree2023.txt - (19.28KB )

3357
C dude here. Last year(2023) I tried Advent of Code again and surprisingly succeeded at first. I did the first day part 1 in around 2 days, then part 2 also around 2 days. I progressed this way doing all problems until day 3 pt1. When I finished it, it was already day 12 or something. I eventually got sidetracked and returned to this a few days ago to finish day 3 pt2. Well, I did the thing and my program apparently works flawlessly, I have it printing every individual value and manually checked for many numbers, but the fucking site gives me "wrong answer". How do I debug this? How to find the one fucking * that is causing me all this trouble? My program is still written in the same style as my 2022 attempt, pure C, parsing every single char at a time. It is too long and contrived and so I wouldn't want to force anybody to wade through the spaghetti swamp. I kindly ask any anon that have done this if they can check my input with their code at at some random lines(binary search recommended) so I can find the fucking line with the faulty exception.
>> No. 3358 [Edit]
>>3357
Just run my input and say something like:
Up until line 40: Total gear sum value is: XYZ
Up until line 100: Blah, blah, blah.
Just a few lines so I can compare with my results.
>> No. 3360 [Edit]
>>3357
>How to find the one fucking * that is causing me all this trouble? My program is still written in the same style as my 2022 attempt, pure C, parsing every single char at a time. It is too long and contrived and so I wouldn't want to force anybody to wade through the spaghetti swamp
Have you considered using a different language?
>> No. 3362 [Edit]
>>3360
Ah, I bet you're the guy on SO who responds to every JS question with "use lodash" (or if this were the 2010s, "use jquery").

>>3357
I looked at the file but it just seems to be the output, and I don't really want to read the AoC text to figure out what this is supposed to be and how to parse that. Probably you're failing on some edge-case, can you just get a solution off the internet, run it on that, and diff the results compared to yours?
>> No. 3374 [Edit]
The spam filter has claimed yet another innocent victim. I apologize for the inconvenience and removed your ban.
>> No. 3375 [Edit]
>>3362
Yes, the problem was caused by reading the schematic and writing it without the \n character. This was useful for part 1 and I was building on part 1 to do part 2, but I did part 1 months ago and didn't suspect anything about that.
Here's a link that will help you debug your programs(using a URL shortener because i suspect something in the url triggered the spam filter.)
https://shorturl.at/tRZ56
>>3374
Thanks. First time seeing that ban video, very fun.
>> No. 3394 [Edit]
File 171245977282.png - (145.87KB , 1336x1015 , aocsolutions.png )
3394
>>3357
>> No. 3395 [Edit]
File 171246030411.gif - (189.94KB , 1023x1000 , つらら005a294e19aa4e7ab9315f0fd703aca2.gif )
3395
>>3394
oh, maybe I should've read the rest of the thread...
>> No. 3457 [Edit]
File 172643848254.jpg - (737.69KB , 1080x2052 , intcode computer.jpg )
3457
if you're wondering which year is the most fun to do, it's 2019
>> No. 3514 [Edit]
>>3457
Not really, I'd just embarrass myself and that doesn't feel either fun or fulfilling.
>> No. 3515 [Edit]
>>3514
Sorry I replied to the wrong post. I meant that one in /ot/ mentioning Advent of Code 2024.
>> No. 3516 [Edit]
File 173093561225.png - (742.41KB , 2752x4342 , interviewQuestionsFizzbuzz.png )
3516
>>3514
Fair enough, but I will say that writing bad code should only be embarrassing if you're a professional programmer.
>> No. 3526 [Edit]
File 17330440192.png - (30.31KB , 1199x232 , aoc2024day1gold.png )
3526
>> No. 3527 [Edit]
File 173308135671.png - (110.03KB , 1176x1008 , event1-1.png )
3527
How are we feeling, boys?
>> No. 3528 [Edit]
File 173309115170.jpg - (88.31KB , 1010x340 , aoc2024day1.jpg )
3528
>>3527
I'm having fun

is that D?
>> No. 3529 [Edit]
File 173310141584.png - (892.15KB , 955x955 , 1733090889539438.png )
3529
>> No. 3530 [Edit]
If anybody else would like to participate, please check the OP for our leaderboard ID.

>>3528
>I'm having fun
Good!

>is that D?
It is. In the interest of time I chose the language I'm most familiar with.
I see you're still rocking Clojure. Your solutions are always enviously succinct.
>> No. 3531 [Edit]
File 173312292457.png - (53.88KB , 731x598 , day1.png )
3531
This took embarrassingly long for me, but it works now and I'm glad it does. At some point was contemplating just doing it in Excel really quick, but I'm glad I solved it now.
>> No. 3533 [Edit]
File aocd1.c - (2.40KB )

3533
Very easy to double check with
awk '{sum += $2 - $1} END{print sum}'

Can't post images
>> No. 3534 [Edit]
File 173313775226.png - (80.51KB , 833x755 , aoc2024day2goldClojure.png )
3534
>>3530
>In the interest of time I chose the language I'm most familiar with.
yah, same here with clojure at this point
>Your solutions are always enviously succinct
thank you
I also wrote a solution in Dart yesterday, it's obviously a lot less succinct:
http://tohno-chan.com/ot/res/33536.html#43198
I'd like to turn the whole event into a Flutter app and also add animations etc. if I can make the time for it

>>3531
>contemplating just doing it in Excel
I mean, whatever works
>> No. 3535 [Edit]
File aocd2.c - (3.58KB )

3535
You must be really angry with me to forbid posting images, heehee
>> No. 3536 [Edit]
File 17331544245.png - (117.86KB , 1920x1023 , aoc2024day2ClojureDart.png )
3536
>>3534
>I'd like to turn the whole event into a Flutter app
I just integrated the clojuredart compiler so I can use my clj solutions for the app instead of solving everything a second time in a worse language
>> No. 3541 [Edit]
File 173320472887.png - (91.34KB , 746x540 , aoc2024day3python3.png )
3541
Playing on easy mode again as per the suggestion by >>/ot/43099
>> No. 3543 [Edit]
File 173321662970.png - (52.93KB , 1469x410 , aoc2024day3Clojure.png )
3543
>>3541
yeah today was a regex day
>> No. 3546 [Edit]
File 173334022749.jpg - (382.41KB , 999x1108 , aoc2024day4clojure.jpg )
3546
day 4 seemed more tedious than anything.
>> No. 3547 [Edit]
File 173334218865.png - (1.37MB , 1024x1024 , elf aoc crossword.png )
3547
>> No. 3548 [Edit]
File 173337978090.png - (180.38KB , 1396x1678 , event3-2.png )
3548
I've been occupied elsewhere, sorry! Glad to see you guys are still trucking along.

The full solution is almost 100LOC, so I left out my basic parser implementation.

>>3536
>I just integrated the clojuredart compiler so I can use my clj solutions for the app
Neat!

>>3546
Day 4 looks familiar to a past event.
>> No. 3549 [Edit]
And evidently I'm tired because the sum is mislabeled as a product. Oh goodness.
>> No. 3550 [Edit]
File 173342494052.png - (112.82KB , 5874x1608 , calendar elves.png )
3550
I was busy today with preparing my 3-day trip to my aunt, but the train just left the station without me (from a different platform than it said on my ticket as well as on the schedule when I checked 5 minutes before it arrived) so... I guess I'll have time do some more puzzles this week...
>> No. 3551 [Edit]
>>3550
You are fated to do AoC.
>> No. 3552 [Edit]
File 173344787833.jpg - (390.42KB , 989x1235 , aoc2024day5Goldclojure.jpg )
3552
>>3551
なら、運命に乗るしかない
>> No. 3553 [Edit]
File 173348488757.png - (168.54KB , 993x967 , aoc2024day6goldClojure.png )
3553
brute force, but it works
>> No. 3554 [Edit]
File 173349078719.webm - (205.79KB , day6.webm )
3554
>>3553
>> No. 3555 [Edit]
File 173355165427.png - (97.68KB , 847x614 , aoc2024day7python3.png )
3555
Painfully slow, but it works

>>3552
その意気だ

>>3553
Clojure looks like a nice Lisp to use.

>>3554
Nice.
>> No. 3556 [Edit]
File 173355882725.png - (40.01KB , 658x419 , aoc2024day7gold.png )
3556
>>3555
>Painfully slow
How slow are we talking?
Picrelated takes 3.65 seconds for my input
>> No. 3557 [Edit]
File 173357204926.jpg - (179.21KB , 770x754 , aoc2024day7gold40msClojure.jpg )
3557
>>3556
here's a smarter algorithm I stole from someon on 4chan. This finishes in 40ms on my phone.
>> No. 3558 [Edit]
File 173364127867.png - (178.63KB , 746x987 , aoc2024day8python3.png )
3558
>>3556
>How slow are we talking?
My dumb solution runs embarrassingly slow at over half a minute. But my leaderboard clear times for that day are relatively good compared to other days, including today.
>> No. 3559 [Edit]
File 173375096020.png - (76.12KB , 754x524 , aoc2024day8goldClojure.png )
3559
>> No. 3560 [Edit]
File 173380230842.png - (2.81KB , 594x326 , defrag_working-1.png )
3560
today's puzzle was fun because it made me feel nostalgic for the Windows 95 days
>> No. 3561 [Edit]
File 173392682036.png - (80.32KB , 680x604 , aoc2024Day11Clojure.png )
3561
if you want a hint for today's puzzle, it's basically a slightly harder version of Lanternfish from the 2021 edition:
https://adventofcode.com/2021/day/6

Eric even put this hint into the example input
>> No. 3562 [Edit]
File 17339650933.gif - (357.27KB , 1000x707 , aoc11.gif )
3562
>> No. 3563 [Edit]
File 173406462714.png - (183.21KB , 938x1033 , aoc2024day12Clojure_.png )
3563
And here's my last one for this year. It's starting to get tedious.
>> No. 3564 [Edit]
File 173407446139.png - (116.99KB , 671x652 , aoc2024day13python3.png )
3564
>>3563
寂しくなるね
I might not continue this year either, because it looks like there isn't anyone else here who's still participating.
>> No. 3565 [Edit]
>>3564
This solution is incorrect in the general case. It happens to work for my input but it doesn't work for all valid inputs. For example, it fails on this input:
Button A: X+2, Y+2 Button B: X+1, Y+1 Prize: X=2, Y=2
The correct answer for this should be 2. Press Button B 2 times, spending 2 tokens in total. Pressing Button A 1 time is suboptimal because it costs 1*3 tokens.

View catalog

Delete post []
Password  
Report post
Reason  


[Home] [Manage]



[ Rules ] [ an / foe / ma / mp3 / vg / vn ] [ cr / fig / navi ] [ mai / ot / so / tat ] [ arc / ddl / irc / lol / ns / pic ] [ home ]