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


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


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

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

barcodes edition

previous >>110501961
>>
File: solve.png (120 KB, 2135x926)
120 KB PNG
idiomatic Rust solution
>>
File: images.jpg (18 KB, 554x554)
18 KB JPG
bigboy #4
url: https://files.catbox.moe/06foyq.txt
silver: 529318
gold: 3341637
>>
Unwashed ass.
>>
File: 1581813101504.jpg (10 KB, 200x200)
10 KB JPG
>>110511864
>cycles
>i=99999999
>L variable is not a list
>>
File: four.png (43 KB, 1039x650)
43 KB PNG
day four, four dot snus edition
>>
File: solve_fast.png (301 KB, 2237x2030)
301 KB PNG
>>110511849
1.29s with >>110511771
318ms with optimized version
>>
I still 'member during elephant valves or whatever when we were like 40mins in and there was nobody on the global leaderboards and then some anon is like "oh, I solved it" and proceeded to be the only person on the leaderboards for the next 30 mins
>>
3s compiled with ghc -O3, probably could have done better
>>
>>110512019
I haven't done this for a long time, I think the AoC got my attention first in 2023. I remember for the harder problems the first people had solved them in 25 - 30 minutes or so, having previously written their own libraries for grid or graph problems. AI ruined all that. Suddenly there were people who had solved the hard problems in 1 minute 30. As if!
>>
>>110512019
that never happened
>>
>>110512068
no I remember this but not whether it was that exact puzzle
>>
>>110512092
no, it did not happen. you are making shit up.
>>
>>110512100
it might have been beacons
>>
>>110512019
>checking threads before you solved it yourself
filtered, i'm afraid
>>
Idiotic Ocaml solution (just werks saar). Would optimize it but it's 5 AM. I am listening to Mongolian throat singing on YouTube at the moment trying to find this specific song.
>>
Much easier when I stop overthinking.
>>
>>110511849
0.3s
>>
File: nodes.webm (2 MB, 944x990)
2 MB
2 MB WEBM
>>110512068
Maybe you have PTSD and you refuse to remember that day. It was a problem with caves, valves, elephants, and a graph structure: 2022/day/16
>>
>>110512250
is this some kind of simulated annealing or just timelapse of a solution search
>>
File: carbon(2).png (110 KB, 1280x869)
110 KB PNG
can /g/ figure out which year / day from this code? i think not.
>>
File: day4.webm (1.09 MB, 800x600)
1.09 MB
1.09 MB WEBM
here's my visualization
>>
>>110512307
2022 day 3?
>>
>>110512019
the leaderboard added a lot of sovl, despite aijeets ruining it in later years
i wish eric had done some more to try to think of an alternative rather than just giving up
>>
>too low
boohoo?
>>
>>110512342
damn, i'm impressed.
>>
>>110512310
looks cool
ai?
>>
>>110512415
he asked claude
>>
>>110512419
no, bespoke
>>
File: im-1796396730-638.png (23 KB, 648x486)
23 KB PNG
semi-brainlet solve, 0.1s.
>>
File: im-1796402852-790.png (22 KB, 691x444)
22 KB PNG
>>110512307
here's mine
>>
File: hah.png (673 KB, 874x656)
673 KB PNG
>>110512429
I did not actually and I take offense to that
I remembered some a-z character code stuff from 2021-2022 and started at 2022 and opened days 1-10 and guessed the first one that looked abouts right

but I WILL admit I was doing a shot in the dark and I was like 5-10% sure at best
>>
>>110512464
ah, sorry then
was that the year with the monkeys ragebaiting you puzzle? I remember being filtered by that
>>
>>110512559
monkeys and elephants and the volcano pretty sure
>>
from itertools import chain, product

with open("input","r") as f:
lines = f.read().strip().split()

def check(s,p):
p = (list(p) * (len(s) // len(p) + 1))[: len(s)]
return all(a == b for a, b in zip(s, p) if a != "?")

cs = list("roygbv")
ps = sorted(
list(chain(*[list(product(cs, repeat=k)) for k in range(1, 9)])),
key=len,
)

def best(s):
for p in ps:
if check(s, p):
return len(p)
raise Exception()

s1 = sum(best(s) for s in lines)

def check_segment(s,p):
for i in range(len(s)):
if p[i] != s[i] and s[i] != "?":
if p[i] != "?":
return False
p[i] = s[i]
return p

line = list("".join(lines))
s2 = 0
for n in range(1, len(line)):
p = line[:n]
for i in range(n, len(line)+n, n):
s = line[i - n : i]
if not check_segment(s, p):
break
if check(line, p):
s2 = len(p)
break

print(s1)
print(s2)


ass
>>
File: day4.png (177 KB, 990x1912)
177 KB PNG
Somewhat optimized solution for part 1
>>
File: file.png (58 KB, 973x814)
58 KB PNG
>>110512689
I realized just now that that i put quite a lot of redundant operations inside the scan function.
This should be much better.
>>
>>110511771
Why does this attention seeking tranny spam his code on every thread and try to be first?
>>
>>110512944
it's been a meme for years now but the original faggot at least made a calendar with solutions, this newfag just prooooompts
>>
>>110512944
his shit code doesn't even work
>>
>>110512944
I'm also trying to be a attention seeker, but i can't do part 1
>>
>>110513011
You can just bruteforce part 1.
>>
File: d4.png (314 KB, 1294x1622)
314 KB PNG
well here's my shitcode for the day.
i just solve for each instruction count incrementally until i find one that works.
how did smart anons solve it?
>>
>>110513104
that's how everyone did it
>>
File: 4a.png (30 KB, 1200x1200)
30 KB PNG
Ahoy
>>
>>110513104
same general idea but written differently
>>
>>110512821
looks like it'd be slow
>>
File: 4b.png (36 KB, 1200x1200)
36 KB PNG
>>110513137
>>
File: adv_2026_04o.png (83 KB, 858x949)
83 KB PNG
>>110511849
124.37s
It could be worse...
>>
>>110513001
what do you mean? it looks similar to mine, have you actually run it?

    (1..barcode.len())
.find(|&i| {
successors(barcode.split_at_checked(i), |(_, rest)| {
rest.split_at_checked(i)
})
.all(|(sub, rest)| {
sub.bytes()
.cycle()
.zip(rest.bytes())
.all(|(a, b)| a == b || a == b'?' || b == b'?')
})
})
.unwrap_or(barcode.len())
>>
File: carbon (2).png (1.26 MB, 1466x1196)
1.26 MB PNG
Today's solution, many ways to golf it but they all make the execution time longer

>>110512046
Do you use haskell for things other than AOC ? those <$> and <*> don't come naturally to me
>>
>>110513137
blessed
>>
>>110513232
>red and green syntax highlighting

Very festive. 10/10
>>
>>110513137
>>110513149
based
>>
File: file.png (8 KB, 163x94)
8 KB PNG
>>110512307
it's from today, you think I'm stupid or something?
>>
File: d4.png (744 KB, 1930x3736)
744 KB PNG
>>110511849
60ms simd
Silver: 529318
Gold: 3341637

Performance counter stats for './4 ../../../inputs/4/bigboy.txt' (100 runs):

229,212,020 cycles:u ( +- 0.12% )
381,376,943 instructions:u ( +- 0.00% )

0.058994876 +- 0.000095275 seconds time elapsed ( +- 0.16% )
>>
>>110513350
fuckin based
>>
pub fn min_program_len(barcode: &str) -> usize {
let barcode = barcode.chars().collect::<Vec<_>>();
let mut program_buffer = vec!['?'; barcode.len()];
let max_program_length = barcode.len();
for program_length in 1..max_program_length {
let program = &mut program_buffer[0..program_length];
program.iter_mut().for_each(|e| *e = '.');
let mut valid_program = true;
for (barcode_idx, barcode_color) in barcode.iter().copied().enumerate() {
let col_idx = barcode_idx % program_length;
if barcode_color != '?' && program[col_idx] == '.' {
program[col_idx] = barcode_color;
} else if barcode_color != '?' && program[col_idx] != barcode_color {
valid_program = false;
break;
}
}
if valid_program {
return program_length;
}
}
max_program_length
}


I can't believe this shit actually works. Had to ask AI for hints. Ive done a ton of leedcode problems but this question is a bit different from all of them. Filtered i guess but yknow what i don't care, i learned something.
>>
my program is not deterministic. sometimes it aces all tests and sometimes it doesn't . HOW
>>
>>110513532
uninitialized variables
>>
>>110513143
It processes the bigboy in 0.35 seconds, but I don't know how good that is for C.
Aside from exceptions for empty/undivideable lines and determining a floor for the sequence lenght, what else i could do to make it faster?
>>
i never fucking learn
wasted tons of time trying to be clever with my prefix checker
i should just accept i'm retarded and go for the grug approach straight away
>>
>>110513569
huh, much faster than I thought it'd be
>>
>>110513342
>think
i know you are but that's beside the point
>>
File: Day04.png (166 KB, 929x1752)
166 KB PNG
shouldn't have gone with a recursive method for part 1, it just meant I had to redo everything for part 2.
>>
>>110513532
>forgetting to cast the holy writes before machination
ngmi
>>
File: carbon(13).png (489 KB, 1598x2756)
489 KB PNG
oops I brooted again
>>
File: d4.png (433 KB, 1352x1578)
433 KB PNG
idio(ma)tic guile scheme
Part 1: 7934
Part 2: 1684

real 0m0,066s
user 0m0,159s
sys 0m0,007s

quadratic seems fine here
>>
part 2 makes me go hmmmmm
>>
>>110514037
I would calc a LSP (longest suffix that is a prefix) for every prefix then for each number see if I always get increasing multiples by jumping that multiple and report the first number for which this pattern goes until the end
Unfortunately I'm too retarded to implement this fast enough for the time I consider it would worth
>>
File: hannukah.png (557 KB, 1109x1018)
557 KB PNG
>Stops counting down until Christmas, the birth of Jesus.
>Sprinkles rainbow propaganda in the puzzles.
>Calls us goy in the input
When did Eric convert to Judaism?
>>
File: carbon(3).png (122 KB, 1280x906)
122 KB PNG
Ok we try another one /g/, bet you can't figure out which year / day this is from.
>>
>>110514138
2025.05?
>>
>>110514138
I recognize this one from last year, something about plants. pretty early on, day 3?
>>
>>110514200
>>110514207
Incorrect!
>>
>>110514138
25 day 4, I remember that shit filtering me
>>
>>110514297
oops it's actually day 2 (I checked) but yeah I hated that one
>>
>>110514297
I can assure you, you remember wrong. It's not 2025.
[Inline]
static bool Contains(((int lower, int upper) lhs, (int lower, int upper) rhs) ranges)
{
return (ranges.lhs.lower <= ranges.rhs.lower &&
ranges.lhs.upper >= ranges.rhs.upper)||
(ranges.rhs.lower <= ranges.lhs.lower &&
ranges.rhs.upper >= ranges.lhs.upper);
}

[Inline]
static bool Overlaps(((int lower, int upper) lhs, (int lower, int upper) rhs) ranges)
{
return ranges.lhs.lower <= ranges.rhs.upper &&
ranges.rhs.lower <= ranges.lhs.upper;
}
>>
>>110514330
only other range one i remember is 2023.05 but this doesnt seem like it could solve it
>>
>>110514330
well eric probably reuses tasks so we are both right
brofist
>>
oh its 2022.04
i dont remember shit from back then just looked around at my old code
>>
>>110514419
Yes, you win a blowjob from that idiomatic rust fella.
>>
>>110513232
>Do you use haskell for things other than AOC ?
no, i learned haskell last year for aoc but didn't use it for anything else
>those <$> and <*> don't come naturally to me
here ive used them for functions and its pretty confusing to reason about the monadic properties of functions, so i think about them as combinators. for example <$> is another name for fmap and its hard to think about fmapping one function to another, but it actually is just the . operator, similarly if f and g are functions,
(<*>) f g x = f x (g x)
, which is very much not obvious if you just read about what <*> is. A good thing is that it is really easy to find the applicative and monadic implementations of anything in haskell as haskell code and see what they do for functions, lists, tuples. I just try to make my code point free and see if it becomes prettier, but sometimes it doesn't work out
My favorite part of the day 4 code is the use of sequenceA which turns [Just '?', Just 'a', Just 'b'] into Just "?ab", but if there is a Nothing in the list, the whole thing becomes Nothing. Also if you do sequenceA on a list of functions, it gives you a function that applies each function to the argument and gives all return values in list.
>>
>>110514436
I want an aella organized reverse gangbang
>>
>>110513429
What did you learn?
>>
File: carbon(4).png (76 KB, 1280x571)
76 KB PNG
>>110514529
And you might get it if you crack this next one.
What year / day, /g/?
>>
>>110514758
2017 day 1
>>
>>110513137
>>110513149
blessed
>>
>>110513532
sets et al are often unsorted btw
>>
File: 1766464104126080.jpg (285 KB, 1800x1800)
285 KB JPG
>>110513556
this has gotten me so many times
also other weird behaviour where the program works if I have debug prints
and breaks without the prints
probably because the prints forced the compiler to not optimize away the UB?

it drove me fucky-wucky up the wall about as much as when I keep making edits to a script trying to fix a bug but nothing happens and after like 5-10 edits and frantic print statements I realize
>oh I am in the wrong directory executing the wrong script and not the one I edited
>>
>>110514816
How'd you do it, huh? Of course it's correct.
>>
File: js slop.png (193 KB, 1514x808)
193 KB PNG
>>110511849
bretty gud for js iterator slop(?)
>>
>>110514498
Yeah, I get the grouping part now (the priority of the composition operators was messing with my brain for a while).
The valid function still looks like dark magic, but I'm getting there I guess.
>>
File: ss.png (71 KB, 1280x1413)
71 KB PNG
5 sec for bigboy is pretty good for python right?
not sure if positions is too much data dependent. there are a lot of ? so that's why it cuts exec time in half.

I had len(s) in while loop and when I removed it exec time dropped 2 seconds. python lol...
>>
Can someone upload a text file of the completed part 1? I'm trying to figure out where I'm going wrong in mine.
>>
>>110515299
F-F-FILTERED
>>
Yeah, it's in O(n^2) time instead of whatever hypothetical quadratic nlogn math chad solution probably exists but whatever.
>>
>>110515313
?
I'd be filtered if I was giving up. Or even give me half, or a quarter of the file. I'm just trying to understand what I'm doing wrong.
>>
>>110515299
advent of code inputs are intellectual property of one Eric Wastl. you are NOT permitted to redistribute or share them with others
>>
>>110515299
files.catbox.moe/c61wcq
1 ????b
1 v??
1 ?????
3 ybv?
3 bgo???b
1 ?g
5 ?b???r?y
1 ????r
7 ry??o?b?
...
>>
>>110515299
show code
>>
>>110515299
https://bpa.st/raw/POHO4
>>
>>110515356
This helps a lot, thank you anon.
>>
>>110515330
Human-readable version :)

BEGIN { FS = "" }

{
s = s $0
p1 += f()
}

function f(){
size = 1
for(i=1; i<=size; i++) {
if(size == length($0)) break
c = ""
for(j=i; j<=NF; j+=size) {
if($j ~ /\?/) continue
if($j != c && c != "") {
size++
i = 0
break
}
else c = $j
}
}
return size
}

END {
print "Part 1: " p1
$0 = s
print "Part 2: " f()
}
>>
>>110515380
no problem anon, millions must be jolly
>>
i'm also still struggling on Part 1. there are specific codes that aren't solved in mine.
for example
'vbvy???b'
2 or more duplicate concrete colors are my kryptonite
>>
>>110515416
Thank you again for that anon, I was able to identify the edge cases my program wasn't working on through your input, and got part 1 completed. Now to see for part 2.
>>
>>110515597
you can broot part one with backtracking
part two, if you didn't notice yet, cannot be brooted thus
see my input and part one answers: >>110515356

>>110515643
good job anon, and good luck
>>
>>110515597
6 vbvy???b btw
>>
>>110515597
>vbvy???b
The b could be aligned so the solution would be vbvy??
Hope this helps.
>>
>>110515643
>Run out of memory trying part 2
Hoo boy here we go. Hmm.
>>
>>110515947
I suggest you do some napkin math on the number of permutations you'd need to broot without optimizations. will save you a lot of time
>>
>>110515947
See this comment: >>110515313
Tick tock, tick tock, your 24 hours are almost up
>>
>>110516114
You know the puzzle doesn't end after the 24 hour period, right? If I don't get done in time I will pause and do tonight's, then go back and finish yesterday's part 2.
>>
File: window.png (9 KB, 644x852)
9 KB PNG
Seems you can pre-sieve potential program lengths by differences of distinct non-? entries
>>110511849
~84ms but ~620ms without pre-sieve so was already a bit slow
>>
>>110516131
It means you were filtered.
>>
>>110516131
The /g/ house rules state that you are indeed filtered if you take that long. We used to have an anon who would graphically depict those who didn't make it.
>>
>>110516174
would need to derive the nsieve parameter from the sparsity of non-?s to be a proper solution though
>>
>>110516259
But that's not what filtered means. If it gets past the filter, then it is by definition not filtered.
And I never claimed to be good at programming.
>>
>>110516271
You have 5 hours.
>>
>>110516259
yeaah i remember those images, i kinda miss him
>>
File: 1774246455376250.webm (189 KB, 800x600)
189 KB
189 KB WEBM
>>110515597
does this help?
>>
>>110516271
the great filter is an extinction event. think of it as if you finally managed to have sex but it was past the viable breeding age so failed to continue your bloodline
>>
>>110516306
That's a weird sentiment. I shall continue to do as I please.
>>
>>110516174
>Seems you can pre-sieve potential program lengths by differences of distinct non-? entries
makes this >>110512240 more than 2x faster
cool
>>
>>110515299
>Part1
Just broot the pattern. wtf?
>>
>>110516259
Though, if you solved it later and continued solving the days you would become unfiltered on his graph.
>>
>>110516319
like so
>>
>>110516459
I suggested that he turn such zombies into a dashed line, so they can still play, but stay filtered forever.
>>
File: 1772871569358811.png (2.4 MB, 1920x1080)
2.4 MB PNG
getting comfy with sinking star while I wait for aoc
>>
>>110516460
Turkish user detected
>>
any FFTchads? my clanker says n log n is possible but I don't want to prooompt
>>
>>110516612
>prompts
>"I don't want to prompt"
>>
>>110516612
kys
>>
File: snailcat.jpg (52 KB, 736x736)
52 KB JPG
>>110516639
>t.
>>
>>110516657
kek
>>110516612
see >>110514097
>>
man part 2 took me so much thinking... and then it was like ....oh right.

func g(data []rune) int {
for p := 2; p < len(data); p++ {
pattern := make([]rune, p)
for i := 0; i < len(data); i++ {
index := i % p
if data[i] == '?' {
} else if pattern[index] == 0 {
pattern[index] = data[i]
} else if pattern[index] != data[i] {
break
}
if i == len(data)-1 {
return p
}
}
}
return -1
}
>>
File: file.png (41 KB, 607x683)
41 KB PNG
Javashitscript once again.
>>110511849
1057ms. My initial part 2 checked the pattern in order of the input instead of skipping forward and it wasn't finishing at all on bigboy.
>>
File: carbon(5).png (194 KB, 1414x1588)
194 KB PNG
$ mix aoc.solve -r input/real -y 2026 -d 4 -p b --bench 1
7936
1532

Ran in 8.185ms


Pretty happy with this one. Fun problems this year.

>>110511849
Ran in 24448.303ms


Better than I expected honestly.
>>
File: bored.png (196 KB, 554x350)
196 KB PNG
tonight's the night for sure... the great filter is definitely almost here...
>>
>>110516982
it's just going to be dijkstra
>>
File: maze.jpg (2.63 MB, 3024x4032)
2.63 MB JPG
>>110516995
day 5 calendar image
>>
>>110516280
im not that anon but i can vibecode a filter graph tomorrow if you all would like that
the data is available from the leaderboard api
i should complete the year, so i'll be here every day
>>
>>110517127 (Me)
fucking bittersweet to fill the boots of anons who were here when i started aoc
>>
File: cannotsendlink.png (178 KB, 706x647)
178 KB PNG
>>110517149 (Me)
also, anyone bored, there is a *slow* lainchan aoc thread
>>
>>110517127
>>110517149
nah, i think it would be nice to have that on the threads
>>
>>110517127
>leaderboard api
link?
>>
>>110517233
i will do that tomorrow, then

>>110517298
add .json to any leaderboard link
>>
what's the consensus on last night's puzzle? i thought it was surprisingly good
>>
>>110517313
>add .json to any leaderboard link
neat
>>
is it too late to start?

pleas
>>
>>110517127
Can you do it without vibecoding?
>>
File: carbon(6).png (239 KB, 1544x1700)
239 KB PNG
>>110516950
>>110516774
$ mix aoc.solve -r input/big -y 2026 -d 4 -p b --bench 1
529318
3341637

Ran in 6618.587ms

Switched to your algorithm and improved my time significantly.
>>
>>110517351
if i have time, then yes
>>
I am conceding on day 4. this isn't the first time i have been filtered by life. it doesn't feel bad.
i got close but i am yet so far.
reply if you want to see what i got written down.
>>
>>110517486
reply
>>
File: day4.png (84 KB, 1772x968)
84 KB PNG
>>110517496
>>
>>110517486
don't worry anon, keep completing the following days and try to come back more fresh to this one
>>
>>110517507
>rust
just use a normal language nigger lmao
>>
File: baka.jpg (109 KB, 1000x561)
109 KB JPG
>>110517507
you're doing too much shit. you got hashmaps and seen and permutations and shit. who cares about that. all youre looking for is a pattern length thats it. you're thinking of the ? as wild cards. they're not. the ? are the FIRST thing that pops into that index mod pattern spot. after it that you just have to keep checking the rest of the pattern. i % len(pattern) ext
>>
I hope you saved your Intcode compilers for today's challenge!
>>
File: 1771148331070637.png (713 KB, 1919x1080)
713 KB PNG
WEEEEEEEEEEE
>>
>>110517661
oh fudge them boys are dropping like flies. this is much harder than last year eh? I remember last year being a cake walk
>>
File: file.png (152 KB, 1148x1159)
152 KB PNG
>>110516774
Now we're cooking with GNU gas.
>>110511849
71ms.
 Performance counter stats for './a.out':

0 context-switches:u # 0.0 cs/sec cs_per_second
0 cpu-migrations:u # 0.0 migrations/sec migrations_per_second
60 page-faults:u # 840.8 faults/sec page_faults_per_second
71.36 msec task-clock:u # nan CPUs CPUs_utilized
5,606,184 branch-misses:u # 6.7 % branch_miss_rate (49.56%)
80,845,067 branches:u # 1132.9 M/sec branch_frequency (49.61%)
302,848,764 cpu-cycles:u # 4.2 GHz cycles_frequency (49.53%)
503,479,078 instructions:u # 1.6 instructions insn_per_cycle (50.44%)

0.071611044 seconds time elapsed
>>
>>110517507
holy fucking KEK.
>>
>>110517507
some men are meant to be filtered
>>
File: 1557068171604.jpg (45 KB, 474x474)
45 KB JPG
>>110516174
wtf omg another fortran anon
>>
>>110517345
its never too late to start but you'll be at the bottom of the leaderboard until everyone bails. Personally, im just using this as technical interview prep. just fucking tired of leetcode. I came in late and solved the first two days in an afternoon.
>>
puzzle waiting room
https://adventofpuzzles.io/2026/day/5
>>
Are we ready to poop?
>>
File: thewallcometh.jpg (104 KB, 675x1000)
104 KB JPG
TONIGHT'S THE NIGHT
>>
5 MINUTES
>>
>>110517507
idiomatic rust-fags BTFO
>>
AoC++ leak:
>navigating a path through a factory
>p1: need to go from the entrance to a box, then bring it back to the entrance. repeat for all boxes
>p2: can carry up to three boxes at the same time
Get out your dijkstras
>>
File: 1671512180040318.jpg (243 KB, 1277x957)
243 KB JPG
https://www.youtube.com/watch?v=IMF1HRiBC7Q
>>
>>110517940
cancer music
>>
>>110517886
Shit, I didn't even know what I was doing and I solved it in a minute.
>>
>>110517937
see >>110511771
>>
I NEED TO SHIT
>>
>>110517149
Same. I felt like I was joining a fraternity back in 2020.
>>
>>110517689
Because we are reusing the board from last year, there are a lot of people who aren't even taking part in it.
>>
FUCK
>>
FUCK
>>
FUCK
>>
ah, a parsing day. I see how it is
>>
doesn't seem so bad - i'm guessing it'll be within like 10000 presses in part b, so i'm gonna try to memoize this first
>>
half an A-press is half an A-press
>>
>>110517993
I'm not warning you again, "Henry"
>>
how do I convert to microwave time?
>>
what the fuck am i reading
>>
>trivial to hardcode your input into your code
>feels like cheating to do though
>trying to automate it makes things a huge pain in the ass
>>
only 9 buttons in the input. Eric is making this too EZ
>>
File: 1772567073538639.png (7 KB, 439x76)
7 KB PNG
another actually interesting one today
I'm surprised, these puzzles are pretty unique this year
>>
>>110518070
I'm still parsing
>>
fuck I missed the release entirely
AI is ruining my life with these compromises
>>
>magic smoke
>microwave
no forks in the input
>fancy microwave
>unusual buttons
I really feel Eric Wastls age in this puzzle
>>
File: d05.png (161 KB, 960x2291)
161 KB PNG
Another fun problem.
What is it with this year?
>>
>>110517938
>You exit the mountain pass and turn the corner to arrive at some kind of large manufacturing facility. Although the facility produces a vast assortment of useful components, what you're here for today is multiple large tanks of magic smoke.
Actually had me going to start with.
>>
>>110518108
Tomorrow we visit an airport btw.
>>
>>110518111
True, but the planes aren't flying so what are we gonna do there? Load up the cargo and then go back to the starting position?
>>
File: file.png (85 KB, 668x1055)
85 KB PNG
light work
>>
>>110518098
You spent 27 minutes debugging a gay parser, looking up gay python commands on stackoverflow, and re-re-reading the spec. You call that fun?
>>
>>110518149
>list of lambdas, hardcoded
Wish I'd thought of that desu
>>
>>110518155
>looking up gay python commands on stackoverflow
I did not.
>>
what are you supposed to do for replace instructions if you have a value like 111 and a replace of [11->21]?
>it can only be 1 digit
the A in multiply is allowed to be more than 1 digit, no reason the A elsewhere can't be too
>>
>>110518192
I know the explanation shows [*11] but was that in anybody's input?
>>
>>110518192
considering there aren't explicit instructions on how to handle this edge case, it must not exist in anybody's input
>>
I solved it but I feel like a brainlet.
>>
File: carbon (2).png (430 KB, 544x3101)
430 KB PNG
I did the needful.

I thought part 2 might be some DP shit but I was wrong, and since this is unwashed ass I've left it in.
>>
File: 1766545503933011.png (2 KB, 425x48)
2 KB PNG
>>110518208
I have one
>>
File: 1770199083222928.png (215 KB, 368x294)
215 KB PNG
>tfw started writing an inverse button pressing function to work backwards from 9999->0
>>
Bigboy should allow numbers up to ten digits long
>>
>>110518234
Interesting.
It was something I thought about when writing my solution, but I looked at my input and the replace didn't have more than one digit so I didn't worry about it.
>>
bigboy should allow multiple simultaneous button presses i.e. [*6] [/2] [9] becomes [*39]
>>
>>110518243
Only if part 2 is also changed.
>>
File: 1794809990570532.png (22 KB, 654x288)
22 KB PNG
>>
> tfw looking at the puzzle input got me exited
> tfw the most obvious approach just worked
I feel kinda dissapointed
>>
you got me Eric, I thought part 2 was going to be memoization so I had to change my part 1 code
>>
>>110518252
>big boy changes the rules
more like big gay
>>
if you hard-coded instead of writing a parser you were filtered btw
>>
File: 5.png (421 KB, 2195x2510)
421 KB PNG
>>
what's the point of that part 2? doesn't require any optimization, just two very straightforward changes you make exactly as written to your part 1. where's the "puzzle"?
>>
>Spent 30 minutes staring at pt 1 because I misread [A] as add A instead of append.

AHHHHHHH
>>
File: code.png (873 KB, 1366x4242)
873 KB PNG
>>110518276
>>
>>110518325
I guess if you used three nested for loops for part 1, you had to rethink your solution for part 2
>>
soooo, do the buttons allow for multiple digits? how would that work for [11->2] when the display if 1111?
>>
File: 1774235982315139.png (1.71 MB, 1248x832)
1.71 MB PNG
>>
>>110518380
I'd be confused too if those were how the buttons on my microwave looked
>>
File: carbon(8).png (386 KB, 2462x2110)
386 KB PNG
$ mix aoc.solve -r input/real -y 2026 -d 5 -p b --bench 1
14771
43203833

Ran in 14.697ms


Parsing is my passion.
>>
File: carbon (3).png (210 KB, 750x1350)
210 KB PNG
>>110518319
I >>110518222 wrote a parser after getting my stars. Does that count?
>>
>>110518325
There is one simple trap that can turn it into an infinite loop.
>>
>>110518319
If you got the correct answer you weren't filtered.
>>
File: slop.png (1.55 MB, 1248x832)
1.55 MB PNG
>>110518380
Why is every fucking AI image like this?
>>
>>110518243
I tried that and my crap solution still returned <.1s
I won't be posting a bigboy today hope others do
cheers mates
>>
>>110518464
I don't know. I thought it was the inclusion of the word rainbow before causing it to put these, but it must be some connection of christmas and elf with hallmark style signs or something. The prompt for this was just the intro paragraphs of the puzzle
>>
tapping out for tonight. can't figure out how to permutate all my buttons as the ones that are arrays can't both descend on a previous iteration and skip to a later iteration before descending...
>>
Remember that one problem with the robot arms?
     [ ^ ]
[ < ][ v ][ > ]
>>
>>110518505
I was having flashbacks when I read today's prompt yes
>>
File: ocaml5.png (104 KB, 864x1056)
104 KB PNG
I tried again to use logical programming, then tried a non-terminating DFS.
it was helpful to work with one-button microwave.
>>
>>110518325
part 2 gave me trouble because I imported solution to get all the three button presses for part 1
>>
>>110518505
You mean the robot controlled by a control pad which turned into recursively controlling robots?
>>
i was able to get part 1 to work but part 2 isn't happening - my brain is too soupy to figure out how to revise it, i'll do it later
>>
File: ocaml5b.png (54 KB, 864x480)
54 KB PNG
>>110518580
using floating point just for a p2 infinity
>>
File: carbon(5).png (2.43 MB, 1430x3090)
2.43 MB PNG
This one was quite straight forward and fun to do.
>>
hardest part was comprehending erics godawful instructions
>>
>>110518763
esl
>>
>>110518679
Is just recursion stopping when the display state was already visited.
>>
Oh my fucking god that was horrible. The dudes who finished this shit in 20 mins are cracked af. took me 2 fucking hours.

holy moly.
>>
File: carbon1.png (1.41 MB, 1710x2546)
1.41 MB PNG
finished couple hours ago but spent time washing my ass
barely washed p1 ass honestly, I rewrote to pathfinding after solving with brooting
>>
>>110518736
I don't understand this puzzle Eric, there's no programming involved
>>
>>110518757
based rubyist chad
>>
>>110518851
there used to be a lot more rubyists in aoc, but they all disappeared for some reason. nobody even tries to code golf anymore. such a sad state of affairs.
>>
File: day5.png (2.99 MB, 3173x9000)
2.99 MB PNG
>>110518819
heres my code. bloated af compared to others.
>>
did anyone solve it some way other than queue/stack with seen numbers set?
>>
Fun problem. The infinite depth edit didn't end up being much trickier.
>>
File: 1794283822924028.jpg (125 KB, 1079x1182)
125 KB JPG
wtf how am I getting recursion limits with just <10 ops and checking for cycles
>>
>>110518976
did you forget to add the stopping condition
>>
>>110518976
Good question. I put a counter in my gold solution >>110518098 and it only runs through the outer loop 13 times.
>>
File: day2.mp4 (2.91 MB, 800x752)
2.91 MB
2.91 MB MP4
Day 2 in Factorio
>>
Yes, I do too much
>>
File: carbon(6).png (2.57 MB, 1666x2830)
2.57 MB PNG
washed clojure asss
>>
>>110518933
I was going to build a tree with display values as the nodes and possible additional button presses branching off from them, but then I thought I'm going to traverse this breadth first anyway for early pruning, so a simple queue and a hash set to keep track of display values should do. And it did.
>>
>>110518234
what is your p1? I'd like to test my parser
>>
>>110519072
its definitely the obvious solution i just wonder if theres anything nicer
>>
File: carbon.png (454 KB, 1360x2672)
454 KB PNG
fun day
not sure if I combined the two parts very well but it works
>>
>>110519080
14104
41726662
>>
File: 1776217107635759.png (99 KB, 691x1685)
99 KB PNG
>>110519110
thanks, seems to work
>>
File: solution.py(2).png (1.25 MB, 1306x9336)
1.25 MB PNG
A Python Object Oriented approach, using the Command pattern.

It could be better, but all the real python guys know you just
import advent
advent.2026.day5.solve(API_TOKEN)
>>
>>110519146
ngl, this looks like slop. a better approach is just using dynamic dispatch for each button type, since that is what oop is about
>>
>>110519006
Lol, awesome.
>>
File: IMG_4696.jpg (63 KB, 512x512)
63 KB JPG
>>110519146
>class
>>
>>110519146
what font and color scheme is that?
>>
File: file.png (28 KB, 1312x208)
28 KB PNG
thoughts on formatting like this to line everything up?
>>
File: carbon(5).png (292 KB, 1280x2414)
292 KB PNG
Beef
>>
File: file (2).png (39 KB, 1312x208)
39 KB PNG
>>110519200
behold
>>
>>110519200
this pisses me off in diffs. when you go back and expand one of the things on the left side so that it moves all the things on the right side over, the whole block needs to be realigned and your +/-1 change turns into +/-6
>>
>>110519153
The choice between composition and inheritance is always difficult. I tend to be biased towards composition, and sometimes that blinds me from a better way.

>>110519190
Font: Red Hat Mono
Color Scheme: night-owl

>>110519181
Something about this problem urged me to use classes instead of other data structures. It was a very "tactile" problem compared to the others.
>>
>>110519215
devilish
>>110519216
good point i'll stop being retarded
>>
>>110519146
why did you add __str__ to classes?
>>
>>110519224
__str__ gets called when you encapsulate it with str() or it is passed to a format string, f"{foobar}".

I mostly did it so that I could get the debug information that looked like the problem.
>>
File: parser.png (36 KB, 804x105)
36 KB PNG
>>110515334
Today was an easy but fun puzzle and I will not listen to anyone who tells me that caching wasn't necessary. Not that I don't believe you, but rather that I don't want this puzzle to be brootable.

Also lol at people struggling with parsing.
>>
>works on example but not on input

FUCK
>>
>>110519240
>and I will not listen to anyone who tells me that caching wasn't necessary.
Caching absolutely wasn't necessary. You just needed to not keep any duplicate values.
>>
>>110519006
I don't get it, where's the output?
>>
>>110519243
>works on input but not on example
If you don't get the reference you are forever filtered
>>
>>110511977
Too slow !

got 0.56 with assembly!

x)
>>
>>110519249
I said I'm not listening! If you keep harassing me like this I'll call my Scrum Master to give you a one on one session!
>>
>>110519252
yeah, forgot to turn on [bksp] case like a retard
>>
no pressure, bigboy fella, we know you'll pull it off and keep it interesting
>>
>>110519200
I let a formatter decide how my code is formatted, I am not formatting it myself.
>>
>>110519276
psychopath warning
>>
>>110519274
think! the display can only display 4 digits.
>>
>>110519282
maybe the bigboy is an infinitely wide screen? ever thought of that? we'll have to wait until the bigboy drops.
>>
File: carbon (3).png (1.72 MB, 1702x2054)
1.72 MB PNG
Unwashed ass, pretty sure this can be golfed further.
>>
>>110519282
no limit on number of buttons though is there?
>>
>>110519285
oh, good idea! maybe the bigboy also add a couple more buttons. exciting!
>>
>>110519274
>>110519285
>>110519291
see >>110518467
>>
>>110519250
The numbers in the center; when the center lights go white it's done. I guess the loop kinda makes it unclear.
>>
File: 4687498103213.png (4 KB, 150x64)
4 KB PNG
>>110519146
58ms, that's not terrible for my shenanigans
>>
>>110519302
relevance?
>>
>>110519304
But it stops on 30.
>>
>>110519306
guy said he's not posting bigboy
>>
>>110519317
yeah, because the small display makes a bigboy impossible.
>>
>>110519291
Just have to add a [-A] button.
>>
>>110519312
30 is the answer for vbgyor
>>
File: day5x2.jpg (2.2 MB, 1615x7682)
2.2 MB JPG
>>110508746

0,02s user 0,00s system 93% cpu 0,031 total


Kinda straightforward problem
>>
>>110519333
Just for the video? If it works for the full input, how long does it take? I'm guessing you haven't tried since the output is just 2 digits.
>>
File: cat approve.jpg (16 KB, 180x192)
16 KB JPG
>reach recursion limit in part 2
>fuck guess that's the wrong approach
>wait
>sys.setrecursionlimit(9999999)
>it works

never let your ambitions be constrained by limits imposed by others!!!
>>
File: 26_D05_C#.png (192 KB, 683x1513)
192 KB PNG
Thought I could work backwards but just couldn't figure it out. Well, a star's a star I guess
>>
>>110519243
If you have a 0->something, make sure that you aren't discarding your number if it is empty before doing a transfo
>>
>>110519343
Yeah, I only ran it with the sample inputs. To do a real input I'd have to come up with a more sophisticated way of encoding the input; currently each color has a 64-bit integer where the bits represent which steps of the program they're active on, so 64 instructions is as high as it goes. I'd also have to go figure out how to programmatically generate a blueprint.

Plus it'd take a while. The solution for my part 1 input was around 3700, which I think would take ~5 minutes on this setup. It could be made a lot faster by just using combinator logic for the "ticks" instead of an item on a belt, but that loses all the novelty IMO. I guess I could speed it up once I unlock express belts.
>>
Bigboy
[2] [*6] [0->9] [/2] [5] [1->9] [oct] [bksp] [*7] [7] [13] [*3] [*9] [4->0] [8->3] [2->7] [/3] [/5] [9] [*2] [3->6] [57->21] [6->1] [/4] [0->5] [41] [*5] [9->2] [5->8] [12->345]

Display width: 8 digits
Silver: 5891672
Gold: 4997151135350982
>>
>>110519451
>[13]
>[57->21]
>Display width: 8 digits
invalid input
>>
what do you guys get for this with a display of 7 digits?
[bksp] [*3] [2] [5] [oct] [*9] [1->5] [/1] [3] [*7] [8] [/4] [/7]

I get 63374, 38207297469387
not sure if correct
>>
>>110519457
No it's not. If you constrained your solution to whatever input you received rather than the problem description then that's a you problem.
>>
>>110519476
fuck off unc
>>
>>110519470
63374
38207297469387
>>
I was scared of part 2, but just checking if you already have the number (so some other iteration found it) and if it's under 10k, helps cut down the work.
>>
>>110519470
63374
-731595829
>>
>>110519470
>7 digits
incorrect input

>>110519476
wrong
>>
>>110519470
63374
StackOverflowException: The requested operation caused a stack overflow.
System.String.Equals (System.String a, System.String b) (at <c5ae8a4eeb824526b5df2932bc2395e0>:0)
>>
File: slow.png (60 KB, 1160x520)
60 KB PNG
>>110519451
>>
File: aoc05.png (380 KB, 1280x3485)
380 KB PNG
>>110518980
>>110518986
idk what was wrong with my previous version but this one works
but the recursion limit is messed up though
like if I do less than 10k deep it gives the wrong number
but I cant see how you would make a chain of ops 10k deep and not hit a previous (number, operation) pair at least once

the old version with ulimit -s unlimited are still running

at one point I tried swathing out ranges of already visited numbers
(like everything greater for multiply or the range xxx0-9 for truncation)

oh well a star is a star it counts ok
>>
>>110519533
are you checking if you already found that given number and then skipping?
>>
>>110518319
hard-coded what? the ops?
there are degrees of hardcoding depending on how many assumptions you make
>>
>>110518380
>>110518464
it is a tiny bit cute even if it is slop but like I can see the vision here
>>
Finally completed day4 part 2. I originally wrote to try permutations and my computer does not have enough memory to even remotely bruteforce passwords that long. Rewrote it to compare substrings and it worked instantly. Yay.
>>
>>110519200
>>110519215
are you allowed to do
case: "a case haha yes" \
return lambda x: ...

case: "b-case" \
return lambda x: ...

case: "some case" \
return lambda x: ...
>>
>>110519457
>>[13]
A valid input probably.
>>[57->21]
Not sure if it ever comes up, but could be valid under the game rules.
>>Display width: 8 digits
Actually not valid.
>>
File: 1726618318952009.png (21 KB, 450x500)
21 KB PNG
question for hardcore anti-hardcoders

did you make a generic parser for THE CUBE or did you forego having code that works on the demo example
>>
>>110519451
I don't know if you purposefully avoided it, but I wonder what would happen if you did something like [11->5] as a replacement.
Because if you had a value of 111 then either 15 or 51 would be the output, depending on the order the operations were done, or 55 if they are instantaneous.
It could be why the replacements are a single digit in the real inputs.
>>
>>110519561
>are you checking if you already found that given number and then skipping?

ye I have an array[0:9999] initialized to 0
and then OR it with the operator-bitmask (1, 2, 4, 8, ...) whenever I arrive at a number using that operator
>>
>>110519646
I hardcoded the example and the input, so I could switch between the two easily.
>>
>>110519659
>and then OR it with the operator-bitmask
uhh, why? you only need to care if that number was reached once already, since any further iterations would result in the same thing (in part 2 at least)
>>
>>110519659
>whenever I arrive at a number using that operator
why? isn't it enough to know if a number is reached at all? that's how I solved
>>
File: 1776717965897528.png (193 KB, 431x412)
193 KB PNG
>>110519674
>>110519676
o-ohh I might be retarded and overthought it
>>
>>110519646
Which one was the cube again? 2022 Day 22? If so, yep, I made a generic parser.
>>
I can't stop laughing at my ridiculously badly written solution for day 4, will rewrite cleanly later in more idiomatic rust and not some goto level of shit.
>>
>>110519697
that is pretty respectable
>>
Do you think this year there will be an actually hard puzzle? (no, implementing dijkstra for 1543523 time doesn't count as hard)
Last two days look kinda promising I guess, maybe he cooked something good for later days.
>>
File: 2022-22.png (645 KB, 2177x4382)
645 KB PNG
>>110519646
unidiomatic Rust solution
>>
File: Day05.png (139 KB, 934x950)
139 KB PNG
Surprisingly easy for a weekend problem.
>>
>>110519701
I mean, it's just a cube. You know what shape it has and that it is made up of five squares. So all you need to do then is to check the length of each line and the amount of lines, and divide it properly to get all the information you need.
>>
>>110519470
>>110519336

Had to crank the stack to the system limit

63374

38207297469387
./a.out 17,70s user 0,30s system 97% cpu 18,496 total
>>
File: aoc22.png (1.32 MB, 1280x10000)
1.32 MB PNG
>>110519743
>So all you need to do then is to check the length of each line and the amount of lines, and divide it properly
haha yeah
>>
File: stats.png (105 KB, 663x288)
105 KB PNG
>>110519658
Didn't think about it, I did this button analysis to figure out how frequently each button actually changes the microwaves displayed value across all reachable states. I ran this for the normal input then I manually inserted buttons into the input and ran it again, changing things if too many staples came out yellow or red, my rationale being if they look about the same it's probably a sane enough input, as long as you have not built a solution around your own input but the actual problem description.
>>
>>110519757
oh no
>>
>>110519749
>17,70s
that's not normal for c++
mine >>110519106 is in C and completes in 2s with the same answers
>>
File: img-2026-12-05-12-23-34.png (371 KB, 2216x2174)
371 KB PNG
>>110519470
5.82s
>>
6ms for >>110519470
100+ seconds for >>110519451
i get expected results.
>>
>>110519641
changing the display width is the only way to increase the challenge size thoughever
>>
>>110519829
in bigboy lore the microwave got the widescreen upgrade for part 3
>>
theres clearly some edge case or small logic failure in my code but everything looks correct and it's driving me nuts. getting only about a third of what i should for the test case. i even just tested running from 1-10k transforming it forwards then backwards and it all works correct so thats not the issue. gonna be a late night
>>
>>110519798
using an array instead of a map makes sense
>>
Part 1
from itertools import product
data = open("Day 05 input.txt", "r").read().strip().replace("[","").replace("]","").split()
seen = set([0])
for permsize in range(4):
for ops in product(data, repeat=permsize):
disp = 0
for op in ops:
if len(op) == 1:
disp *= 10
disp += int(op[0])
elif op[0] == "*":
disp *= int(op[1])
elif op[0] == "/":
disp /= int(op[1])
elif op[1] == "-": #->
disp = int(str(disp).replace(op[0], op[3]))
elif op == "oct":
disp = int(oct(disp))
elif op == "bksp":
disp /= 10
seen.add(disp)
print sum(seen)

Part 2
import sys
sys.setrecursionlimit(9999)
data = open("Day 05 input.txt", "r").read().strip().replace("[","").replace("]","").split()
seen = set()
def search(num):
if num in seen: return
seen.add(num)
for op in data:
disp = num
if len(op) == 1:
disp *= 10
disp += int(op[0])
elif op[0] == "*":
disp *= int(op[1])
elif op[0] == "/":
disp /= int(op[1])
elif op[1] == "-": #->
disp = int(str(disp).replace(op[0], op[3]))
elif op == "oct":
disp = int(oct(disp))
elif op == "bksp":
disp /= 10
if not disp >= 10000:
search(disp)
search(0)
print sum(seen)

Janky, but I got my stars. Assumes single digit inputs, which I had.
>>
>>110519844
show code
>>
>>110519886
https://pastebin.com/Z9DnRujP
my non-idiomatic rust monstrosity
>>
>>110519905
switch to a proper language
>>
File: stats2.png (311 KB, 629x635)
311 KB PNG
>>110519451
>>110519773
For the bigboy
>>
>>110519929
there's no bigboy faggot
>>
>>110519936
Sure there is.
>>
>>110519915
I tried to parse the buttons into a list of lambda pointers in C++. It's doable, but it looks baroque. Very much typing for just 6 different lambdas plus captured closure.
>>
Uh Eric just spoiled day 6 on xitter, it's going to be a recursive part 1 that you need to memoize for part 2
>>
>>110519943
wrong
>>
>>110519949
Your shitty solution is wrong, yes, we have already established that.
>>
>>110519962
no, we have established that the inputs are wrong for multiple reasons.
since the inputs are wrong, any output is valid.
here is my O(1) solution:
print("Part 1: 0")
print("Part 2: 0")
>>
>>110519962
nta but all original inputs use single digits
increasing the display width is borderline but changing input form that much isn't acceptable
>>
>>110519981
But nowhere in the problem description is it stated that there have to be single digits, so there's that. You did not write a solution based on the description, you looked at your input. There is no explicit constraint on single digits mentioned anywhere. The only constraint, in fact, is the number of digits on the display but that is also the only thing you can reasonably change in order to have a bigboy that would be remotely interesting to optimize for.

>>110519972
The only thing that we have established is that you cannot read simple descriptions and that your solution is wrong because of it.
>>
>>110519981
>all original inputs use single digits
see >>110518234
>>
>>110520006
>But nowhere in the problem description is it stated
How did you solve 2017 day 23?

>>110520053
it's fake
>>
>>110520060
I bitched and whined on /g/ rather than sitting down and solving it. It proved to be a very inefficient strategy.
>>
controversial boy
[0->111] [11->9] [91->1]

you should get 203
>>
>>110520104
twoned
>>
>>110519905
god im retarded should have done bfs from the start
>>
>>110519981
the example has [*11] lol, this is just proof most niggers in here paste into chad gaypete

>>110519451
i got the correct answers but i thought it was going to go on forever, went for a piss and when i came back it was done.
>>
>>110520174
this is the example: [9] [*9] [/2] [1->9] [oct] [bksp]
also, chad gaypete didn't exist before 2022
dumb retard
>>
>>110520174
I would argue multiplication is different from substitution
multiplication etc can have any number of digits as there is no ambiguity
there is ambiguity with substitution
>b-but my bigboy multi-digit substitutions dont have ambiguity on purpose
but in that case you are hardcoding for not having ambiguities?
is not this the exact same argument as hardcoding for 1-digit substitutions?
>>
File: brown_anon.png (19 KB, 846x91)
19 KB PNG
>>110520272
This counts as part of the example, mr. java operator saar. The only potential issue is overlapping replacement ambiguity mentioned by another anon, which the provided bigboy does not have.
>>
>basic bitch dfs
I'm kind of baffled. I honestly thought yesterday's problem was much harder.
>>
>no microwave time
Missed opportunity for memes.
>>
>>110520327
wait for the completion easter eggs
>this is a subtle reference to the fact niggers don't know how time works
>>
>>110520104
How?
>>
>>110520284
I'm just using ordinary string replacement semantics. A match is replaced left-to-right, and matched characters aren't considered again. That's how standard string replacement works. I don't see a reason to interpret replacement as simultaneous matching of overlapping substrings. The puzzle says to replace all instances, and ordinary string replacement is a perfectly reasonable interpretation of that. I had to change nothing in my solution to run the bigboy and I maintain that if you have to do that, you got filtered.
>>
>>110520345
I have two gold stars that say otherwise
>>
>>110520355
Lots of people using AI have gold stars, anon. But Santa knows.
>>
Literally Saturday.
Have all fucking day and he gives me literal babby problem.
>>
File: carbon (1).png (3.07 MB, 1872x3970)
3.07 MB PNG
rust
first solution big enough I had to use carbon
>>
if you don't do bigboy you functionally have 1.5 stars that's the rules
>>
>>110520376
but there is no bigboy, faggot
>>
File: 18962465_p0.jpg (1.11 MB, 1500x1062)
1.11 MB JPG
>>
>>110520376
this is a coup
unofficial bigboy #5
display width: 8
buttons:
[/8] [2] [/9] [6->9] [/5] [2->1] [*8] [2->4] [8] [1->2] [/3] [*7] [/7] [7->9] [4] [bksp] [/6] [*4] [oct] [6->1] [9->8] [/4] [*5]
silver: 34939
gold: 4658506108051351
>>
>>110502189
big girl
>>
>>110520294
>hurr durr
did you solve the halting problem? if not you don't have all stars.
nigga, looking at the input has always been part of aoc.
>>
>>110520385
wtf what did you do to my computer
>>
>>110520384
>display width: 8
invalid
>>
>>110520335
well his solution would go 0 111 91 1 so 203
but the wording is kinda clear
>[A->B]: When pressed, replaces all instances of A in the displayed value with B
all instances
there are two instances of 11 in 111
so that anon is just coping
>>
File: stats2.png (256 KB, 842x539)
256 KB PNG
>>110520384
>>
here's the bigboy you've been asking for:
[0] [1] [2] [3] [4] [5] [6] [7] [8] [9]

silver 499500
gold 49995000
>>
>>110520437
babbyboy.txt, other anon will complain that some instructions are missing and his javashit gpt solution only works if all instructions are present
>>
>>110520437
with pen and paper this is just
>>
File: day_5.png (297 KB, 1146x1676)
297 KB PNG
washed nim ass
I went crazy with recursion and memoization for part 1, solved part 2 and then I realized it all amounted to doing a flood fill in the most retarded way possible, so went back and cleaned
>>
File: 71772350_p0.png (171 KB, 749x562)
171 KB PNG
I will nap for an hour because I have been living on like 6 hours a night the past 2-3 days
t. baked the last 4 threads
>>
>>110520718
>6 hours a night
i don't see the issue?
>>
File: adv_2026_05.png (146 KB, 834x1591)
146 KB PNG
Pretty breezy
>>
File: ohno.png (25 KB, 761x327)
25 KB PNG
>>
File: file.png (12 KB, 821x213)
12 KB PNG
>>110519636
of course and you don't need the \, thats the standard way to write it
>>
>>110519844
check your individual button functions do what you expect they should
>>
File: d5.png (471 KB, 1036x2174)
471 KB PNG
idio(ma)tic guile scheme
$ time guile main.scm 
Part 1: 19411
Part 2: 40602650

real 0m0,251s
user 0m0,669s
sys 0m0,062s
>>
>>110519345
Same.
>>
File: stats.webm (2.35 MB, 1612x708)
2.35 MB
2.35 MB WEBM
>>110519451
Moar data, I am having way too fun with this.
>>
>>110521311
>way too fun
ESL award
>>
>>110521329
Statistically you are more likely to be a shitskin javatard than I am, amerifat. Post hands.
>>
>>110521347
I'm not from the US. I'm ESL myself, but I'm at least trying not to make grammatical mistakes.
>>
>>110521404
>I
>I
>I
you sure your're no american?
>>
>>110521404
So you're underage then, you'll eventually grow out of this phase. Meanwhile, visit Reddit or some other website that allows children.
>>
>>110521416
*Are you sure you're not American?
Yes, sadly.
>>110521441
Wrong.
>>
>>110521545
>>110521545
>>110521545



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