[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

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


[Advertise on 4chan]


File: phew_non_anime_trash.png (2.22 MB, 1886x752)
2.22 MB PNG
>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

Bread first, butter later edition.

previous >>110511746
>>
File: dee-dee-button.gif (87 KB, 220x166)
87 KB GIF
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
>>
Cry-me-a-river-boy.txt
[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
>>
File: solve.png (345 KB, 2216x2174)
345 KB PNG
idiomatic Rust solution
>>
>>110521575
what's you CF rating?
>>
File: 250ravulx3j91.png (583 KB, 939x1163)
583 KB PNG
>>
File: 1545213_p0.png (179 KB, 640x480)
179 KB PNG
>>
>>110521585
Do you mean codeforces.com rating? I don't do competitive programming. I only program recreationally.
>>
>>110521612
Yes, that's what I meant. But you do try to do AoC fast at midnight EST, no?
>>
File: yeah.png (427 KB, 1584x535)
427 KB PNG
>>110521564
>>
>>110521564
~72s
>>110521572
invalid input
>>
File: im-1796489111-751.png (38 KB, 627x840)
38 KB PNG
when me solve me problem me solve me gold stars
>>
>>110521737
Very clean and nice!
>>
>>110521720
I see the issue now, your implementation sucks. If it didn't suck, you'd be invited to the bigboy club but you'll have to settle with smolboy for now.
>>
import re

with open("input","r") as f:
buttons = f.read().strip()
bs = []
bs.extend(
(lambda v,a=a: v + a if v != "0" else a) for a in re.findall(r"\[(\d+)\]", buttons)
)
bs.extend(
(lambda v,a=a: str(int(v) * int(a))) for a in re.findall(r"\[\*(\d+)\]", buttons)
)
bs.extend(
(lambda v,a=a: str(int(v) // int(a))) for a in re.findall(r"\[/(\d+)\]", buttons)
)
bs.extend(
(lambda v,a=a,b=b: v.replace(a, b)) for a, b in re.findall(r"\[(\d+)->(\d+)\]", buttons)
)
bs.extend(
(lambda v: f"{int(v):o}") for _ in re.findall(r"\[oct\]", buttons)
)
bs.extend(
(lambda v: v[:-1] if len(v) > 1 else "0") for _ in re.findall(r"\[bksp\]", buttons)
)

def findns(maxd=None):
level, stack, d, nums = [], ["0"], 0, set()
while stack and (maxd is None or d < maxd):
level, stack = stack, []
while level:
if len(stack) > 10_000:
raise Exception()
n = level.pop()
for b in bs:
v = b(n)
if len(v) <= 4 and v not in nums:
nums.add(v)
stack.append(v)
d += 1
return sum(map(int,nums))

print(findns(3))
print(findns())


ass
>>
>>110521749
thx anon
>>110521753
2 minutes trying to run big boi and RAM shot up to 13G, so I killed it.
idk maybe there's something smarter i missed, finishes instantly for the regular inputs.
>>
Fun day today! Worked well with AWK's conventional coding style.
>>
>>110521830
And of course golfed for epeen purposes.
>>
>>110521830
based
>>
wait, so do we prompt our clanker and then post the code itt?
what's the point?
>>
File: matt godbolt.png (867 KB, 1280x720)
867 KB PNG
Matt Godbolt is doing Advent of μarchitecture this year.
https://www.youtube.com/playlist?list=PLN7owJBX-Fcc

Also check out his Advent of Compiler Optimisations he did last year.
https://www.youtube.com/watch?v=j-BwR-Cw0Gk
>>
>>110521830
>if(d<=3) p1+=t
Filtered.
It's not guaranteed that numbers reachable in less than 3 steps are also reachable in exactly 3 steps. Maybe for your specific input, but that's not really a solution, is it?
>>
>>110521855
literally who
>>
File: 1583220441084.jpg (23 KB, 480x370)
23 KB JPG
>>110521838
bro i don't want to alarm you, but there's something wrong with your monitor I think.
>>110521849
your mom prompted my dick last night and i gave her back the output
>>
>>110521858
is not that what the <= is for or am I dumb
>>
>>110521892
it is
>is not that
*is that not
>>
>>110521858
The example contains 99: [9][9] and 9: [9], though. And it says "AT MOST 3", right?
>>
>>110521892
No, I am wrong, sorry. I read the problem wrong, I solved it for exactly 3, but I took another look at the statement and it was at most 3.
>>
>>110521858
>reading comprehension
every time bro. any presses up to 3 is fine for p1.
>>
>>110521916
not the original zsh-anon but I think I assumed ==3 at first too but it accidentally ended up working because I either implemented it wrong or by luck
and then I was gaslit and confused thinking I broke it while working on part 2 when I noticed that
>oh wait it has to be <=3 for p1
>>
>>110521720
>invalid input
how? i get the right result for my input and both the above bigboys, but it takes over 4 minutes for the bigboys
>>
>>110521939
>[13]
>[13]
>[12->345]
>>
>>110521685
This is peak autism.
>>
>>110521950
okay? explain why you think [13] is wrong lmao
>>
>>110521962
it's not in original inputs
>>
File: aoc-2026-05.png (950 KB, 540x1799)
950 KB PNG
Today will be the half way point! How ya all liking AOC this year?
>>
>>110521996
the original input has numbers, this input has numbers, i don't see the issue? this large input does not add new instructions like [^3], that would be invalid.
>>
>>110522032
Just ignore that anon, she's an idiot troll.
>>
>>110522032
the original inputs, every one of them, contain single digit numbers only, and so do example inputs
>>
>>110522061
>everyone that disagrees with me is the same anon
>>
>>110521858
kek retard
>>
>>110522061
>she
>>
>>110522065
>every one of them
how do you know that? and it does show [*11] on the problem page which is why i didn't assume single digit for any of the instructions, i even handle multiplication by negative numbers just in case but that didn't even show up in the bigboy(s)
>>
>>110521858
>It's not guaranteed that numbers reachable in less than 3 steps are also reachable in exactly 3 steps
If there are any bksp, *, or / it is
>>
I used a single set and applied all buttons to all numbers until none add a new value, like a brainlet but still I get the solution instantly. At which day do you have to go for more optimization to not get filtered?
>>
I AM FILTERED AGAIN?!?!?!
my part 1 aces all tests.
yet I am overguessing, but I have 0 duplicates
>>
>>110522119
>how do you know that?
I have friends
>i didn't assume single digit
good for you, no one said anything against solutions that cover potential edge cases
>>
File: d5.png (471 KB, 1036x2174)
471 KB PNG
>>110522073
Yes, I am.
>>110522123
It's irrelevant, read the replies, I've admitted I was wrong about the problem statement.

Here's the updated version that actually solves both parts correctly.
>>
>>110522143
last year there was only one day like that and most people solved it using z3
>>
>>110522169
ah so because your 2 friends have similar input to you that means all the thousands of users have that as well. i should've listened, you really are an idiot.
>>
>>110522197
there are 5 different inputs and they all have single digit numbers only anon
>>
still working on that filter graph i promised yesterday
fast solvers get a gold line
slow solvers (>24h) get a silver line
dead solvers get a dull line
does this seem fair?
>>
>>110522211
https://adventofcode.com/2026/day/5
>ctrl+f [*11]
as long as this exists on that page, multiple digits is valid
>>
>>110522232
>slow solvers (>24h)
that's filtered. slow is >1h.
>>
>>110522235
stretch all you want
>>
>>110522119
nta but eric confirmed on r*ddit that all real inputs only use single digits
>>
>>110522211
i thought someone posted a real input with 2 digit number in it in first thread
but maybe it was fake
>>
>>110522241
this
I wonder if filteranon is still alive
he did post his scripts once iirc
>>
>>110522258
that was fake
>>
>>110522168
OMG, I had to filter out the output results aswell
>>
>[2026 Day 5] Did anyone get a 2-digit button like in the example?
>The example for the multiplication button is *11 but in my input I found only digits so I saved myself the trouble. But now I wonder... Did anyone actually get more than one digit on a button?
>[–]topaz2078(AoC creator) 33 points 8 hours ago
>https://pbs.twimg.com/media/Fo9DC19WcAEwxnO?format=jpg&name=large
>>
>>110522255
sounds like bull to me but either way [*11] is part of the problem description which immediately removes the constraint on single digit. you can maybe stretch it to only allowing double digits though if you're insanely autistic about it
>>
>>110522293
how did you solve 2017 day 23 part 2?
>>
I guess tomorrow elves are going to invent a computer and we'll implement an instruction set.
I enjoy these kinds of days.
>>
File: day5.png (778 KB, 1396x3650)
778 KB PNG
python
>>
>>110522394
same
I love this year's puzzles so far
>>
>>110522293
>[*11] is part of the problem description which immediately removes the constraint on single digit
for single-operand operations? sure

for replace?
lmao no way
>>
File: 5a.png (32 KB, 1200x1200)
32 KB PNG
>>
File: 5b.png (35 KB, 1200x1200)
35 KB PNG
>>110522524
I gotta try this eventually
>>
File: faggot.png (32 KB, 499x550)
32 KB PNG
>>110522304
NTA but you asked me this in the previous thread and I wasn't going to humor you but here's how I solved part 1. When you fix your shitty solution and do my bigboy I will show you how I did part 2.
>>
dumb retard, that is not 2017 day 23.
>>
>>110522588
are you sure?
>>
File: eat shit.png (128 KB, 1366x523)
128 KB PNG
>>110522588
It literally is
>>
>>110522607
>>110522612
how fucking retarded are you? intcode was 2019, dumb retard.
>>
>>110522624
Yes, and I am using my Intcode VM to solve 2017/23, what is it you don't understand? Is it the timeline that confuses you? My first year was 2021 and I have subsequently worked my way through old puzzles in no particular order.
>>
File: carbon.png (1.15 MB, 1834x6208)
1.15 MB PNG
it was a mistake to store the display contents as strings, probably made it a lot slower but it made the parsing/pressing code easier - was kinda fun, reminded me of writing a chip 8 emulator
>>
File: 1733801519961953.png (59 KB, 478x360)
59 KB PNG
>>110522534
tiddy
>>
>>110522534
>>
File: 2026-05.png (1.55 MB, 906x1634)
1.55 MB PNG
My C# solution
>>
File: carbon(6).png (563 KB, 1280x4034)
563 KB PNG
>>110522539
Full solution for 2017 day 23, part 1.
>>
>>110522534
glutton sexo
>>
File: aoc-2026-05.png (3.85 MB, 1750x2248)
3.85 MB PNG
today was pretty straight forward, but fun
>>
man, im not parsing that input
>inb4 filtered
how can that be when i got both stars?
>>
aren't we running out of space on the page for puzzles? is the page gonna scroll?
>>
File deleted.
>>110522241
let's compromise at >12h
happy to change it depending on what other anons think
>>
>>110522534
>tfw no fat elf gf
>>
>>110522927
ignore that retard, 24h has always been the cutoff
>>
>>110522921
It's just 12 days, eric gave up on this shit several years ago
>>
>>110522743
sauce on this cute elf?
>>
>>110522927
It should be 24h
I always start like 10-14 hours late
How many here actually start when the puzzle comes out?
>>
File: the-great-filter.png (328 KB, 1024x768)
328 KB PNG
>>110522948
>>110523013
this one uses the 24h cutoff
changed the dimensions to display better on 4chan
unfortunately, names are compressed
>>
>>110523013
I work shift and last week I started 14:00 and there's just no way in hell I'm up at 06:00. The coming week I'll start 05:30 and I don't think coming late just to beat you bastards is acceptable.
>>
>>110523016
I always thought it would be cool to base position for each day on current leaderboard ranking
So when you generate day 5 whoever is #1 appears at the top
>>
>>110521838
Type of shit Claude asks to run in your terminal without explaining why.
>>
>>110521830
This stupid board is why I learned AWK and I hate that I reach for it so much now.
>>
>>110523039
i would need to calculate my own ranking for each day
i can try tomorrow, but no promises
>>
>>110523033
Fellow euroGOD I see. I go to sleep at like 4 AM and when I wake up there's other stuff to do first. Last year I was top 3 on /g/ though, I just don't really care this year because LLMs are far superior to me so I gave up on the competition aspect of it.
>>
File: day5.png (1.53 MB, 1666x2606)
1.53 MB PNG
I sure do love functions that generate other functions.
>>
File: 9axq2a.png (420 KB, 1992x2072)
420 KB PNG
>>110523004
timestamp on file says 2024-12-10 but idk how trusty that is
>>
>>110523103
SEGGSSS
I NEED FAT ELF SEGGSSS
>>
>>110522241
>aoc goes up when I'm asleep
unlucky
>>
File: 1671750171967264.png (26 KB, 222x190)
26 KB PNG
I wonder what the frogposters like juliafrog anon are up to nowadays
>>
>>110522792
wtf do you have other solutions in intcode?
>>
>>110523103
Yeah, no that was it. I remember we were making drawings of test-chan and input-chan insta-losing to brootchads but bigboy-chan needing to be brought to solution by a precise algorithm instead of brootshitters.
>>
>>110522869
just noticed that i can remove the condition in the default instruction (append number / [A]).

dunno why i initially thought that was necessary. probably because of the wording
>>
in haskell it's just

btn :: String -> Int -> Int
btn "oct" = read . (`showOct` "")
btn "bksp" = (`div` 10)
btn ('*':xs) = (* read xs)
btn ('/':xs) = (`div` read xs)
btn [a, '-', '>', b] = read . map (\c -> if c == a then b else c) . show
btn xs = \n -> read (show n ++ xs)

solve :: String -> [Int]
solve input = go S.empty (S.singleton 0)
where
fs = map btn . words $ filter (`notElem` "[]") input
go _ s | S.null s = []
go seen s = sum s : go seen' (S.fromList (filter (<= 9999) (fs <*> S.toList s)) S.\\ seen')
where seen' = seen <> s

main :: IO ()
main = do
let sums = solve "[1->9] [oct] [*9] [3] [0->9] [bksp] [/2] [*8] [7]"
print . sum $ take 4 sums -- part 1
print $ sum sums -- part 2
>>
>>110523204
well >>110481261 I bet you think that Haskell isn't a "real language" either?
>>
File: 2024.png (36 KB, 770x399)
36 KB PNG
>>110523174
I should get around to finishing them
my broot is a mess and I got hardfiltered
but if I kept it running I bet it would have found a solution eventually (after several days or weeks)
>>
>>110523143
Yeah, a couple.
>>
I have to wait hours for Part 2 solution. I hope it's worth it and didn't make a mistake
>>
>>110523286
You did make a mistake, a very simple mistake which causes your program to loop forever. Just terminate it and work on the solution.
>>
>>110523286
Definitively there is something wrong with your code.
My solution is simple recursion stopping when the display state was already visited, no optimization, parses the strings over and over again, and only takes 8 ms for both parts.
>>
>>110523204
damn that's nice

Simple AWK solution
#!/usr/bin/awk -f

function oct(v, s) {
if (v == 0) return 0
s = ""
while (v > 0) { s = (v % 8) s; v = int(v / 8) }
return s + 0
}

function press(v, i, s) {
if (op[i] == "app") return v == 0 ? a[i] : (v "" a[i]) + 0
if (op[i] == "mul") return v * a[i]
if (op[i] == "div") return int(v / a[i])
if (op[i] == "rep") { s = v ""; gsub(a[i], b[i], s); return s + 0 }
if (op[i] == "oct") return oct(v)
if (op[i] == "bksp") return int(v / 10)
}

{
for (f = 1; f <= NF; f++) {
t = $f; gsub(/[][]/, "", t)
n++
if (t ~ /^[0-9]+->[0-9]+$/) { op[n] = "rep"; split(t, p, "->"); a[n] = p[1]; b[n] = p[2] }
else if (t ~ /^\*[0-9]+$/) { op[n] = "mul"; a[n] = substr(t, 2) + 0 }
else if (t ~ /^\/[0-9]+$/) { op[n] = "div"; a[n] = substr(t, 2) + 0 }
else if (t ~ /^[0-9]+$/) { op[n] = "app"; a[n] = t + 0 }
else if (t == "oct" || t == "bksp") op[n] = t
else { print "error: " $f > "/dev/stderr"; exit 1 }
}
}

END {
if (PRESSES == "") PRESSES = 3
seen[0] = 1; front[0] = 1; live = 1
for (step = 0; live && (PRESSES == 0 || step < PRESSES); step++) {
split("", next_); live = 0
for (v in front)
for (i = 1; i <= n; i++) {
w = press(v + 0, i)
if (MAXV != "" && w > MAXV + 0) continue
w = sprintf("%d", w)
if (!(w in seen)) { seen[w] = 1; next_[w] = 1; live = 1 }
}
split("", front)
for (w in next_) front[w] = 1
}
for (v in seen) { sum += v; cnt++ }
printf "%d\n", sum
}
>>
>>110523430
>awk
unfathomably based
>>
File: carbon(40).png (173 KB, 681x1975)
173 KB PNG
basic solution. Not feeling it yet this year...
last two years I had ambitions... Did C and rust now it's back to python...
>>
>>110523592
Doing octal transformation felt easier in C than going through string manipulation for some reason
>>
>>110522786
I was thinking of using Cshart this year. after seeing this, I'm glad I didn't.
>>
>>110522792
LMAO I KNEEL
>>110522304
historic btfo happening ITT
>>
multi-digit string replacement is technically ambiguous. honestly the instructions for how the buttons work weren't very good. big boys for this is dumb though. there is nothing really deep you can do to get performance wins here.
>>
File: 1701414402030344.jpg (110 KB, 640x728)
110 KB JPG
ok I should sleep now rather htan an hour so I get 7 hours instead of 6
>>
I liked today's part 2 for going with infinity and a terminating condition instead of "now do it 6 million times"
it must be the switch to Hanukkah timing that ended that insensitive part-2 joke from Eric
>>
>>110523430
>>110521830
I love that there's a club of AWK users here. It's like a Christmas tradition.
>>
>>110523911
what is the termination condition? i am running every possibility rn
>>
>>110524025
It's called base case FYI. And it's the 4-digit limit.
>>
>>110524025
terminate when there are no more reachable values
>>
>>110524040
the base case is zero fyi
>>
>>110524025
>what is the termination condition

no additional number aka possible values before iteration = possible values after iteration
>>
>>110523708
There is probably a better way to code this than what i did.
>>
>>110524068
What? Are you doing BFS? Or brute-forcing every 4-digit number in reverse?
>>
>>110524025
if you hit a value you've already hit before you can terminate. eventually you will have attempted to press every button on every value you've accumulated and the result will be an existing value, at which point you're done
>>
>>110524025
when you have no more numbers to test out
press a button and get a number. have you already seen this number? discard it. no? press all the buttons and see what numbers you get
>>
how can you harmonize the search between p1&2 so you only need to do it once? they're kind of incompatible because p2 wants to terminate early but p1 wants to explore everything. maybe just allow maximum expansion at depth < 3 and then enable early terminate logic at greater depths?
>>
>write solution, first thing that comes to mind
>it works
>don't really feel like optimizing it
anybody else. i feel like 80% of the challenge of aoc is optimizing your solution but i never do it in any of the years
>>
>>110524106
s = set(0) # base case
while True:
flag = True
for i in range(n):
if i not in s: continue

'''apply every operation to i, if 0 <= result < 10^4,
then add result to s, and disable flag...'''

if flag:
break
>>
>>110524178
yes but only because I spent too much time constructing data structures for the various button types and functions to operate on them cleanly. in hindsight I should have stored the buttons as strings and parsed them each time I permutated to simplify the code and give myself more time to spend on optimizing after
>>
>>110524188
oh, and n is also 10^4
>>
File: file.png (432 KB, 1084x1810)
432 KB PNG
>>110521564
6.4083s
>>
>>110524173
What do you mean? I just have the search in a big loop so i could output the part 1 result after 3 iterations and then part 2 when the loop exits.
>>
File: gcc_honey.jpg (105 KB, 960x964)
105 KB JPG
>>110524178
if it can be brooted it will be brooted
>>
>>110524217
>brooted
What does this even mean
>>
>>110524216
oh are you max depthing without early termination? I guess if you do that then yeah they both work fine. I assumed that would blow time to unreasonable values and short circuited my search. because of that optimization if I discover a value that can appear at say, depth 3, at depth 97, then I am unable to search the space that would have let me discover it at 3 and it would never get included in my p1 count
>>
>>110524025
you don't need to apply (button n) if you've already done that, for a given button and n.
>>
File: code.png (453 KB, 2050x1584)
453 KB PNG
>>110523708
dont blame C#
>>
>>110524173
>>110524278
>>
>>110524278
cool. basically looks like my Rust solution.
>>
I feel like there is a way to take the list of numbers [0,9999], press every button on every value, and then deduce what is reachable based on the results...
>>
>>110524330
You feel? YOU FEEL? Disqualified.
>>
>>110524330
see: >>110524188
>>
>>110524317
>never touches shift
>only chooses to capitalize rust
fuck you
>>
File: day5.png (159 KB, 1054x1361)
159 KB PNG
Javashitscript. First day it doesn't fit on one page.
>>110524173
You just need to add an if i == 3 like I did.
>>110521564
Runs out of memory, kek.
Firefox won't add the 44739242nd element to the set, just says
Error: allocation size overflow
.
>>
File: carbon(14).png (905 KB, 1732x3872)
905 KB PNG
Another fun puzzle.
>>
>>110522524
>>110522534
i wish i could draw half as good as you can.
>>
>>110524188
This is called BFS FYI. And the term base case is undefined for BFS. I thought you were doing DFS, hence my past terminology recommendation.
>>
why the fuck does part 2 complete instantly and bigboy is taking more than 10 mins, i don't think there's much optimize in this solution (will try bullshit obviously)
>>
>>110525005
it's bottom-up, tabular dynamic programming fyi
hence my terminology recommendation
>>
>>110525039
Yes, the exact code you provided can indeed be viewed as DP.
However, it is unfortunately incorrect, as it should be a BFS instead and you should maintain a separate seen set which you sum at the end.
>>
>>110525039
>>110525093
I should correct myself, it is not actually incorrect, but inefficient, as you're doing the same computation over and over again.
>>
>>110525039
And you asked for the termination condition, but since the DP transition is only dependant on the previous row, it should be obvious that if a row reproduces itself, the same pattern will repeat itself forever thereinafter, leaving you with no reason to fill further rows.
>>
>>110525018
sub 1 minute on my machine and can probably shave off a lot more by reorganizing and getting rid of long dependency chains, using a bitset perhaps.
>>
>>110525112
real    0m0.062s
user 0m0.060s
sys 0m0.002s

note this is on eric's input, not a bigboy
indeed, if every operation has been tried, then you should skip
the snippet omits other details too

>>110525149
it was another anon who asked for the termination condition
being reasonable, it is both bfs and dp, but i approached it as dp
with the skip, you would terminate if both sets match
>>
File: aoc_4_fft.png (13 KB, 652x916)
13 KB PNG
>>110511849
>>110516612
Here's (the FFT part of) an FFT solution for yesterday
Partitioning the colours we can construct two indicator arrays, and at a lag k where their cross correlation is positive there are some contradictory non-? entries in the input when we do a jump of k
Although doing the full FFT is slow (600ms bigboy), so this does partial cross-correlations and ends up about 100ms
>>
File: aoc4_fft.png (16 KB, 652x1044)
16 KB PNG
>>110525221
shit wrong image, that's just the full-fft
>>
>>110525166
oh, i didn't think about using a bitset, thnx
>>
File: day5-2.png (169 KB, 1264x1071)
169 KB PNG
>>110524675
What a shit language. This is how much you have to torture it to get even mediocre performance.
>>110521564
63 seconds.
>>
is the other haskell anon here? i don't think i saw his solution
>>
anyone doing their solutions in D?
>>
>>110525615
This one? (nta)
>>110523204
>>
File: 165745624.jpg (52 KB, 600x600)
52 KB JPG
Can anyone give me some tips? I know I'm overcomplicating things. I'm trying to do a depth-first search through recursion by using a loop to choose microwave buttons and stopping to execute once the depth reaches 0, but I don't recall how to then execute operations at higher depths.
>>
File: carbon(7).png (1.48 MB, 1526x1414)
1.48 MB PNG
this is my day 4 which i was catching up with.
>>
>>110525832
You normally call your dfs function with the max depth like
dfs(depth=3)

and then decrement that parameter with each recursive call.
function dfs(depth) {
...
for (...) {
dfs(depth-1);
}
}

That help?
>>
>>110525832
lil bro, every search algorithm follows the same structure.

frontier = data structure of next nodes to check
seen = set of already seen points

you then start the frontier with the initial value.

you pop a value off the frontier.
1. check if it matches satisfies the solution, if it does, return it.
2. otherwise add it to the set of seen and put the children values not in seen in the frontier.
3. iterate again until frontier is empty

For bfs the frontier data structure is a queue
For dfs the frontier data structure is a stack.
>>
File: 1792285543327120.png (41 KB, 1222x460)
41 KB PNG
>>110525832
I like the iterative approach better for DFS
>>
File: 1784857151496263.png (260 KB, 656x679)
260 KB PNG
For bfs the frontier data structure is a deque
For dfs the frontier data structure is a deque.
>>
can you give me a rundown of all the acronyms.
dfs = depth first search (no idea what that is)
bfs = breadth first search (no idea what that is)
queue, no idea what that is
stack = sized data
>>
File: 25.gif (37 KB, 84x84)
37 KB GIF
>>110526040
That's what I thought too, but I can't seem to get it to work. I'll have to rewrite this another day because I have other stuff to do and I don't want to accrue tech debt. Thanks for the tips, anons.

int buttonCombos(int sum, std::vector<button>& buttonList, int depth)
{
if (depth == 0)
return sum;

int total = 0;

for (int x = 0; x < buttonList.size(); ++x) //Iterate through all possible operations
{
int nextSum = sum;

if (buttonList[x].operation == "Append")
{
if (sum == 0)
sum = buttonList[x].val;
else
{
std::string temp = std::to_string(nextSum);
temp += std::to_string(buttonList[x].val);
nextSum = std::stoi(temp);
}
}

if (buttonList[x].operation == "Replace")
{
std::string temp = std::to_string(nextSum);
for (int y = 0; y < temp.size(); ++y)
{
if ((temp[y] - '0') == buttonList[x].val)
temp[y] = buttonList[x].val2 + '0';
}
nextSum = std::stoi(temp);
}

if (buttonList[x].operation == "Multiply")
nextSum *= buttonList[x].val;

if (buttonList[x].operation == "Divide" && buttonList[x].val != 0)
nextSum /= buttonList[x].val;

if (buttonList[x].operation == "Octate" && sum != 0)
{
std::vector<int>octal;
while (sum > 0)
{
octal.push_back(sum % 8);
sum /= 8;
}
std::string temp;
for (int y = octal.size()-1; y >= 0; --y)
temp += (octal[y] + '0');
sum = stoi(temp);
}

if (buttonList[x].operation == "Backspace")
{
std::string temp = std::to_string(sum);
if (temp.size() <= 1)
temp = "0";
else
temp = temp.substr(0, temp.size()-1);
sum = std::stoi(temp);
}

sum = buttonCombos(sum, buttonList, depth-1);
}

return sum;
}
>>
>>110526375
You are a bit off here. You need to do what was said >>110526040 and create a vector for sum that are in the frontier and a set for sum already seen. Then you just iterate through each sum, get all the next states from apply buttonList, add to the frontier and then putting sum in the seen set.
>>
elf 9/11 in an hour
>>
>>110526373
Queue: first in, first out
stack: last in, first out
>>
>>110526428
I think I just overcomplicated things to the point where I'm too confused to visualize what my code is doing. I think I'll try rewriting it later with a vector of stacks, with each button pushed to a stack. But thanks, I appreciate the advice.
>>
>>110525832
>dfs
never ever
>>
>>110526475
that sounds like me. but that's really bad. you are cooked for life
>>
>>110526524
Why is it really bad?
>>
>>110526530
ok it's not bad. but a Darwin recessive property
>>
>>110526564
>but a Darwin recessive property
Can you explain what you mean by this?
>>
>airport on the map
flight path-finding?
luggage conveyor [obscure math shit] theorem?
scheduling flights?
>>
>>110526573
imagine the ground swallows you up and there is nothing you could do about that
>>
>>110526587
packing problem to store all the clothes in one bag
>>
>>110526588
That sounds rather unfortunate but I don't understand what it has to do with programming.
>>
>>110526587
Colors don't have have phones.
Then Red, Orange, Yellow, Green, Blue, Violet call
>>
File: thewallcometh.jpg (104 KB, 675x1000)
104 KB JPG
TONIGHT'S THE NIGHT!
>>
>>110526628
we've already passed the wall
tonight we sum a list
>>
I just got word that Eric will be giving each participant who completed both stars in <24 hours on all days a big tittied, slightly overweight, north pole elf as thanks. make sure you don't get filtered anons!
>>
>>110526635
which day was the wall? barcodes?
>>
puzzle waiting room
https://adventofpuzzles.io/2026/day/6
>>
I NEED TO SHIT
>>
>>110526639
don't say that or i'll just have claude finish this shit for me to cash in on my elf gf
>>
>>110526643
this shit sucks ass stop posting
>>
File: WALL.jpg (189 KB, 260x385)
189 KB JPG
will he filter you?
>>
>>110526643
it's mildly entertaining, keep posting, I keep forgetting about it
>>
>>110526639
Eric, I've completed every puzzle since 2023 Day 1 in under 24 hours. Where are my three elf girls?
>>
>>110526648
eric knows if you've been naughty
>>
FIVE MINUTES
DIJKSTRA AT THE READY
>>
>>110526679
FUCK THAT, WE A* IN THIS THREAD
>>
File: 1671512180040318.jpg (243 KB, 1277x957)
243 KB JPG
https://www.youtube.com/watch?v=IMF1HRiBC7Q
>>
File: 1777175722523437.jpg (82 KB, 650x580)
82 KB JPG
tonight is import solution
>>
>>110526688
cancer music
>>
>>110526689
I've solved every z3 day without z3 and I'll do it again
>>
>>110526700
I've imported z3/networkx for the leaderboard but I go back and do it without after
>>
FUCK
>>
advent of parsing
>>
this sounds really really annoying to implement but really really easy if you just create a visualizer
>>
bruh
>>
>>
File: file.png (1.12 MB, 1804x1086)
1.12 MB PNG
>>110526730
I managed to guess which one was in the middle correctly first try
>>
FUYCKKKK
>>
I cannot picture how to "orient" a graph such that you can locate physical locations inside of it.. I can find the side lengths easy enough because we're told it's a square to just min traverse to another corner, but after that...
>>
>>110526806
min traverse to opposite corner and center is the halfway point?
>>
how the fuck do you "unfold" the adjacencies into that shape? couldn't it take any arbitrary shape since the connections aren't directional?
>>
isn't it just craete a graph and then use bfs to find the point which has even distance in every direction?
>>
>>110526831
perform min path from 1 corner to the other 3, the smallest value is the side length. now you know your square size. from there you can determine the taxi cab distance to the center. now pick a corner and calculate distance to all other nodes. look at your distance graph and exactly 1 node will have the taxi cab distance you determined earlier (the center)
>>
in python this is just networkx.center
>>
consider me filtered
>>
Part 1 was easy.
I don't really know how to actually build out the grid for Part 2. Hmm, I will think on it some more.
>>
would be nice if he'd given a larger example, harder to visualize what edge cases come up with a real input when the example is so simple
>just make your own
nah fuck that
>>
>>110526831
>>110526838
I just did a bfs out from every node and kept track of its max distance needed to reach every other point. The center point is the one where this value is minimized.
>>
I love building graphs in C...
>>
>>110526911
neat, i will try that thnaks
>>
>>110526911
>from every node
you only need to pick 3
>>
>>110526914
hash maps in C are a bitch.
>>
solved p2 visually after reconstructing the grid, not too difficult
my solution is to find one corner (2 connections, then dfs down one of the edges (3 connections) to find a corresponding corner
then I lay that line out along the first row of a matrix
I move down one row in the matrix and, starting from the left side, start filling in the cells based on what node is above
there is only one possible answer here because can exclude the nodes that are already in the grid
repeat by going down rows until the grid is filled in and then you just need to look at where 1,2,3 fall and work out which direction is positive and negative
shouldn't be too hard to implement this part in code
>>
Is building the actual graph necessary or can you derive the coordinates using some relative scheme? I am trying the latter because I don't see an intuitive way to do the former. Seems tricky to actually find where they all slot together. I know what the corners are but not which corners they are, or which direction the two edges coming out from them are going, and so on along the edges and into the middle.
>>
>>110527031
You can actually do it by hand. First part is finding the relative positions of the corners (i.e. top left, top right, etc).
>>
>>110527045
It's basically a jigsaw puzzle.
>>
this seems like a pain, can't be fucked to write another pathfinding function for this, especially knowing i'll probably have to throw it out and do another one for part 2. consider me filtered
>>
>>110527047
sure you can do it like that but there's a formula to find the x and y for any node if you have the distances to the corners, you don't actually have to build out the grid.
>>
wtf he phoned it in with this p2 and did not even bother to make it work for the example
>>
unwashed webshit

let rows = input.split('\r\n');

// create map
let map = {};
rows.forEach(row => {
let id = row.split('-')[0];
let conn = row.split('-')[1].split(',');
addLight(map, id, conn);
});
let n = Object.keys(map).length;
let size = Math.sqrt(n);

// create grid
let grid = new Array(n).fill(0);
let lights = Object.values(map);
let light = null;
let exclude = {};
for (let y=0; y<size; y++) {
for (let x=0; x<size; x++) {
let idx = y * size + x;
let n = 4 - (x == 0 ? 1 : 0) - (y == 0 ? 1 : 0) - (x == size-1 ? 1 : 0) - (y == size-1 ? 1 : 0);
if (x == 0 && y == 0) {
light = lights.find(l => l.conn.length == 2);
} else if (y == 0) {
light = findWhere(lights, [light.id], exclude, n);
} else if (x == 0) {
light = findWhere(lights, [grid[idx-size].id], exclude, n);
} else {
light = findWhere(lights, [light.id, grid[idx-size].id], exclude, n);
}
grid[idx] = { id: light.id, x, y };
exclude[light.id] = true;
}
}
let p1 = grid[(Math.floor(size/2)) * size + Math.floor(size/2)].id;
console.log( p1 );

// p2
let light1 = grid.find(obj => obj.id == 1);
let dx = 47 - light1.x;
let dy = 30 - light1.y;
grid.forEach(obj => { obj.x += dx; obj.y += dy; });
let p2 = grid.find(obj => obj.id == 2026);
console.log( `${p2.x},${p2.y}` );
>>
I don't get part 2. IDs 1,2,3 are not in the actual input?
>>
>>110527078
post input
>>
I'm going to say it: part 2 is GAY
>>
>>110527087
input
>>
>>110527087
nvm I made a mistake
>>
File: carbon(2).png (597 KB, 2048x2978)
597 KB PNG
disgustingly unwashed
fun problem though

its a little rng though so i had to run it 5 or 6 times before it found the answer
>>
fuck i'm gonna have to build the graph aren't i
>>
File: Capture.png (231 KB, 2162x1699)
231 KB PNG
Got lucky and got it on the second solution I tried before I actually figured out how to solve it for real
>>
File: dogshit.png (82 KB, 986x1022)
82 KB PNG
some of the most disgusting python code i've ever written, this is only a subset of the monstrosity
>>
>>110527131
yeah I wouldn't do this in C
>>
>>110527218
c++ but i'm not fairing much better
>>
File: 1765920865802405.png (25 KB, 436x270)
25 KB PNG
Well at least I solved it eventually
>>
You can solve part 1 by constructing the grid with an arbitrary corner node at (0,0), and an arbitrary node adjacent to that corner at (1,0).

For part 2, I brute-forced all 8 possible orientations and looked for the one which resulted in a pair of the given IDs (1,2,3) being at the right positions relative to each other within the grid. Apparently the light grid isn't positioned with a corner at the origin, so you then need to translate the position of 2026 within the grid according to the given positions of 1,2,3 to get its absolute position.

Fun problem.
>>
>>110527218
too late

#define graph_max 2000

struct node {
int id;
int adj[4];
int adj_count;
};
struct node graph[graph_max] = {0};
int graph_length = 0;

void add_node(struct node node) {
struct node *pnode;
//check if id already exists
bool found = false;
for(int i = 0; i < graph_length; ++i) {
if(graph[i].id == node.id) {
found = true;
pnode = &graph[i];
break;
}
}

//if it doesn't, add it
if(!found) {
graph[graph_length++].id = node.id;
pnode = &graph[graph_length - 1];
}

//for each incoming connection, append them to the adj list and create any nodes with this node as an adj
for(int a = 0; a < node.adj_count; ++a) {
bool exists = false;
for(int b = 0; b < pnode->adj_count; ++b) {
if(node.adj[a] == pnode->adj[b])
exists = true;
}

if(!exists) {
pnode->adj[pnode->adj_count++] = node.adj[a];
//add the pair
struct node pair;
pair.id = node.adj[a];
pair.adj[0] = pnode->id;
pair.adj_count = 1;
add_node(pair);
}
}
}
>>
>>110527240
You're rekting me on days 1 thru 5 at least
>>
I don't have anything to login with but shouldn't it be easy if there are no gaps?
eg
Keep a record of IDs and their connections (could use bit field if sufficiently small and ids arent sparse)
Find any corner (connections=2)
Of its two connections, travel the edge nodes (connections=3) until you find another corner, which gives you `m` and `n`.
from the edges take the nodes at m/2 and n/2 and travel horizontally/vertically respectively (by finding a connecting node which itself has a connection to a node in the row/column parallel to it) until arriving at (n/2, m/2).

You wouldn't need to construct the entire grid in that case, only two edges, the center row and the center column.
>>
File: carbon (4).png (328 KB, 969x1779)
328 KB PNG
Behold my glorious mess
>>
>>110527290
oh you don't even need both, just the center row or column and one parallel considering you already know how far you need to go in
>>
>>110527290
>>110527311
part 2 requires you to know the exact locations of ids 1, 2, and 3
>>
File: fortranaoc06.png (404 KB, 1280x3893)
404 KB PNG
not cleaning this one fuck you eric
>>
>>110527366
lord jeezus,
I couldn't think of a solution in linear time but at least it could be done in linear memory
>>
okay, what is the mathfag answer to 2, I know I did this shit in HS but I don't remember it
>>
>>110526911
>>110526838
I did not do taxicrab stuff but rather
>filled the outer rim of the square
>started from top edge
>filled in the next row based on unvisited connections
it works because the only unvisited nodes from the top row is the inner rows of the second row

and repeat
>>
I seriously overcomplicated it
I got the entire outside edge of the graph by picking a corner and following the edge
Then I removed all of those nodes and repeated
Which left me with a bunch of square paths that were rotated different ways and some went clockwise while others went counter-clockwise
I rotated a bunch of squares to reassemble the graph
>>
how are you supposed to submit the imput? literally as x,y?
>>
>>110527527
yes
>>
>>110527527
I really hate these quirky hardcoded input format problems
>>
File: 6.png (485 KB, 2156x2558)
485 KB PNG
idiomatic Rust solution
>>
>part 2 works for example
>gives me 18 solutions for real input
hmmmmmm, yes I see. so that's how it's going to be
>>
File: d06.png (260 KB, 958x3783)
260 KB PNG
Oh jesus fuck I hated this.
I will NOT be taking questions. Yes, I got the correct result on the first submission.
>>
wish I could see the leaderboard for today
how long did it take top 100 to fill? 10 minutes?
>>
how does the input rate limiting work? I've tested 4 of my possible solutions and have another 10 to go
>>
File: 07_11.png (18 KB, 626x158)
18 KB PNG
>>110527662
this is from like 07:11 so after 70 minutes
I imagine top 100 filled up fast with people who did import solution
but legit solvers is probably up there
>>
>>110527670
>he doesn't know about the input hard-lock after 12 failed attempts
Anon.. I hope you get lucky
>>
File: 06.png (927 KB, 2048x7012)
927 KB PNG
Absolute unwashed shit. Basically me working it out one step at a time in my code for part 2.

>Find the corners
>Determine their relative relationships
>Arbitrarily set one as the top left
>Use distances to each corner to find the single point that satisfies those distances
>Try every rotation/flip until translating points 1,2,3 to their targets results in the same translation vector
>Hardcode that vector onto point 2026
>Get my star

It is fucking ugly and took me forever to work it out, but felt good to get it eventually.
>>
>>110527645
For part 1, I built up all my connections and then picked a corner (one node that had two connections) and flood filled until I hit two corners, or the number of next spots was less than the current (occurred at the same place as hitting two corners).
Then I picked one of those found corners and did the same thing. That gave me two lists of essentially the two diagonal nodes that crossed the grid, with the single value shared between the two being the center node.

Then for part 2 I had to build the actual grid, and I settled on picking a corner again, assigning it as 0,0 then hard coding it's two connections as 1,0 and 0,1 and gave them those vectors to propagate only through nodes that have 3 connections to build the outside of the grid, and when they hit other corner nodes the vectors reversed.
Then I went from y 0 and for each node in the row worked out the neighbors and then checked what connection wasn't a neighbor yet and stuffed that into y+1 to build out the entire grid.
>>
did anyone actually have to flip their grid for p2?
>>
>>110527718
> Then for part 2 I had to build the actual grid, and I settled on picking a corner again, assigning it as 0,0 then hard coding it's two connections as 1,0 and 0,1 and gave them those vectors to propagate only through nodes that have 3 connections to build the outside of the grid, and when they hit other corner nodes the vectors reversed.
Then I went from y 0 and for each node in the row worked out the neighbors and then checked what connection wasn't a neighbor yet and stuffed that into y+1 to build out the entire grid.
Went with this at first too. Then realized you can just pick 2 adjacent corners to be the top row (8 possible ordered pairs for this) and fill in the rows much more easily
>>
>>110527754
yes
>>
File: carbon2.png (3.42 MB, 1838x2694)
3.42 MB PNG
turns out I way overcomplicated this at the start. I wrote autistic pathfinding and even dfs for building the grid when it's easy as piss
oh well
>>
>>110527758
>Went with this at first too. Then realized you can just pick 2 adjacent corners to be the top row (8 possible ordered pairs for this) and fill in the rows much more easily
I tried this but for some fucking reason it was fucking up.
Anyway, I got there in the end.

>>110527754
My X was inverted.
>>
>>110527764
>>110527775
can either of you share your input? mine only needed rotations and I don't handle flipping
>>
This would have been much more interesting if some of the input lines were missing.
>>
every AoC I have to keep enabling more features from unsafe
>>
>>110527781
https://bpa.st/raw/N7NEC
>>
>>110527781
You had a rotation? Jesus christ, I don't know what I would have done if I had that.
>>
File: rototo.png (22 KB, 563x445)
22 KB PNG
>>110527830
>walks into the bar and rotates your drink
>>
>>110527830
>>110527781
any rotation can be achieved with flips

even the way I built my example grid required a flip to map to the example coords properly
>>
>>110527818
Be careful out there. Eric's brewing a 20 year plan to gain trust, then plant malicious code in an input.
>>
>>110527856
>any rotation can be achieved with flips
can it?
1 2
3 4

to

2 4
1 3


how do you flip to that
>>
>>110527875
maybe transposes and flips can work instead of rotations and flips
sec
>>
>>110527875
horizontal flip, then vertical flip
>>
>>110527843
>>110527856
I am aware, but fuck my grid I don't know what I'm doing.
I worked out the answer with a calculator once I got my grid sorted.
>>
>>110527884
yeah transposes work as a replacement for rotations if you also do all the flip combinations

makes sense because with rotate+flip you get 2 duplicate solutions since rotate 90 + rotate 270 are the same with opposite flips
>>
>>110527897
>horizontal flip, then vertical flip
am I being retarded I dont get it
1 2
3 4

# hor
2 1
4 3

# ver
4 3
2 1

# neq
2 4
1 3
>>
>>110527821
hmmm I expected this to cause my solution to go into an infinite loop but it exits with
1*45
*9,40
>>
File: code.png (760 KB, 2080x2686)
760 KB PNG
not filtered after all
that was aids though
>>
>>110527875
you can't. Each symmetry can be achieved by 0,1,2,3 clockwise 90-degreee rotations and then 0,1 vertical flip. Easy to check that the parity of the 0,1,2,3 is not changed by either flip
>>
if your code can't solve both the input and the example you were filtered btw
>b-but eric said-
check the size of the graph and use that to determine the locations of 1 2 and 3 and the final light being 7 or 2026
>>
File: 1781214571491625.png (53 KB, 240x240)
53 KB PNG
>>110527943
>>
>>110527943
you have to hardcode a shitty switch to specify which coordinates to use as well

I hate these puzzles that depend on other info than the input file
>>
File: goldstar.jpg (400 KB, 1200x1500)
400 KB JPG
>>
>>110527943
My code was enough to get me my stars, so not filtered.
>>
>>110527943
My 12 stars say otherwise
>>
>>110527875
Diagonal flip
>>
>>110526628
Tonight was the night. Everything's easy from here.
>>
>>110528027
you are going to have to be more specific about which operations are involved in that
>>
File: 2026aoc.png (42 KB, 724x576)
42 KB PNG
What do you think?
>>
>>110528071
>mfw realizing we are already halfway
>>
>>110528071
Yeah I'm pretty sure we're going back up, especially because the distance between 6 and 7 is shorter
>>
>>110528042
x,y=y,x
>>
>>110528096
yeah you can use transposes in place of rotations
but I would not call it a flip
>>
>>110528109
you will never be a square
>>
If I generate a nodelist, notice it contains "x" amount of elements where sqrt(x) is a natural number, am I cheating if I immediately assume it's going to be a square?
>>
>>110528185 (Me)
oh okay the LORE explains it's going to be a square, not filtered
>>
>>110528185
It says in the day 6 puzzle description that it's going to be a square.
>>
The first part sounds much harder than the second, but I just can't do the second, wtf.
>>
I made the 1st part too complicated. I thought I had to reconstruct the grid to be able to find the center, so I did just that. It wasn't necessary for part 1 after all, but having the code then made part 2 trivial.
>>
>>110528259
I MADE IT
Fuck it, I am not rewriting it properly, I found the right answer by console.log everything, it is enough.
>>
>>110527754
In >>110527292 I tried commenting out line 33 where I explicitly sort my corners and found that the default case of rot=0, flip=False is then the right one, oddly.
>>
>>110528071
>running it back
if eg day 11 is a harder part 3 and 4 of day 2/3 (or both) then it's absolute KINO
>>
>>110526831
I just rebuilt the whole grid and checked what is in the center
>>
File: intcode.png (450 KB, 1280x3700)
450 KB PNG
Idiomatic intcode solution with an idiomatic beef host.
>>
hmm, what if I...
or maybe if...
hmm
yeah I'll just build a graph and then figure it out
>>
>>110528391
It's a puzzle. How do you solve jigsaw puzzles? You start at the corners, then do the sides, then fill out the inside. Corners are connected to 2 other ids, sides to 3, inside ids to 4.
>>
>tfw the Indian github profiles are mogging the tranny ones on the leaderboards
is it over?
>>
I just regenerated all 8 possible grid orientations from scratch because I could not be fucked to write a rotation/mirror function. Suck my dick eric
>>
File: screenshot.jpg (64 KB, 829x686)
64 KB JPG
>>110528451
to expand on this, see picrel
>>
File: d06.png (289 KB, 960x4432)
289 KB PNG
>>110527645
Ok, I modified this code so it now outputs the answer.
Does it work on inputs with rotation? No. Go away.
>>
can't be bothered to bruteforce the 8 rot/flip states
>>
File: day6.jpg (2.59 MB, 2545x6852)
2.59 MB JPG
I just won't do it in C, ok

>>110519336
>>
>>110528353
now do part 2, or filtered



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