#advent-of-code
1 messages Β· Page 20 of 1
That's why I have a loadfile and a loadlines
π
jeeze man, and part 1 took me 5 minutes. I think 4 minutes of that was reading, 1 minute was typing and ~0 minutes thinking.
I'm just here cause I enjoy hanging out with you all.
My p1 solve was 5 min too
Hey i wrote this regex (\w+)([=-])(\d+)? to match these strings rn=1,cm-,qp=3,cm=2,qp-,pc=4,ot=9,ab=5,pc-,pc=6,ot=7 for today's aoc, but I dont match them correctly? What am I doing wrong?
I wrote a Lens class and implemented __hash__ method, hoping that when I will insert the objects in a dict, it will use that function. But surprisingly, it doesn't.
dicts use __eq__ to compare items too
to compare the keys? I don't think so
yes it does
then how come when I insert Lens("cm", None) and Lens("cm", 3), it puts them in different keys? I have implemented __eq__ to compare the labels
Hey where should I send my code @covert arrow ?
Ah I see what happened
#aoc-solution-hints maybe, but I'm not sure if you'll be able to get decent help if it's in Go
I just want help with the regex
the regex is fine, as demonstrated before
which regex ?
||\d*|| not \d+
oh
what newline character are they talking about?
doesn't actually exist
The input downloaded straight from AOC's website includes a \n at the end
>>> with open('input.txt') as f:
... txt = f.read()
...
>>> '\n' in txt
True
@lime fulcrum
ah yeah i just copied into a file. apparently i lost the \n
the what
copy pasting directly from the thing doesn't have it
Yeah, it's only if you directly download your puzzle input from Advent of Code's website
But a lot of people do that for automation purposes
The raw file has a new line character
doesn't the ? already take care of that?
It should
Though it's extra and unneeded
I like (\w+)(?:-|=(\d+)) more
It might make a difference depending on what they're doing with it.
print(re.match('(\w+)([=-])(\d+)?', 'xx-').groups())
# ('xx', '-', None)
print(re.match('(\w+)([=-])(\d*)', 'xx-').groups())
# ('xx', '-', '')
||re.split('(-|=)', step)||
raw file from the downloading process, yeah
anyway whether it exists or not the important thing is actually getting the solution
ah, that makes more sense
Downloading from curl doesn't magically add a new line character to the end of the file. The file itself has a newline character.
something in the html then?
idk
the input for 2015-01 doesn't have a newline for me but today's does
Mine doesn't, interesting
but I copy pasted the sample into my code editor manually
and vscode added a newline to that lmao
we're going back down now
solved for me, so yeah.
^
day 15 part 1 ||was the easiest for me so far, suuurely part 2 will not get too much harder right? π€ͺ ||
part2 is comfy as well
if you're not reading the HTML you're missing out
Day 14 was certainly a chatty day
interesting

today seems like a breather. upon first glance part 2 is also ||easy for a midgame day||. hopefully i didn't miss anything :P
Day 14 was a really fun puzzle with some different components that all fit together
||I was shocked at how relatively simple day 15 was compared to a typical late day aoc problem. It actually tripped me up. I was like βis that it???β||
It was more of a ||reading comprehension|| day tbh, but even that wasn't too bad.
(definitely did not suffer for 2 hours on p2 because APL really really doesn't like this style of problems
my biggest issue today was formatting
It was a clear example of the puzzle description being somewhat obfuscated to confuse the LLMs
Formatting for what?
i decided to do today as a single expression for fun
because p2 was kinda easy
so the formatting was annoying because indentations
You did 1line p2?
Nice! Did you end up posting your one liner?
Yeah definitely
The creator has already said the puzzle descriptions are not being changed at all for the existence of LLMs
There's always been days where you need to read extra carefully
but now people have a scapegoat to blame their reading comprehension skills on :^)
Lol
I admit there was one passage I read like 4 times
It was confusing how they said nee entries in the box go in the back, but if it's empty it goes in the front
The added clause has negative value
it goes behind any existing lenses
if no lenses exist, that lens is placed at the front
Yes, the second clause adds nothing
what if I add my lens at the back end of the empty box?
there is no room for lenses behind it now
serious, that's what I think they want to avoid in their box analogy
It's pretty clear that if a line is empty, the front and back of a line are the same place
but this is some physical box in their analogy
(the analogy is bad, don't get me wrong)
This doesn't confuse anyone, and what you're saying doesn't really make sense: lenses go at the back of the existing lenses, not at the back of the box
If there's no existing lenses then "behind existing lenses" is the same as the front
without the second clause it's not defined where you should put a lens in an empty box
you're thinking about a data structure, in their analogy you have this physical box
I understand that
I think it's perfectly well defined without that second clause
And clearer
I'm surprised that someone thinks otherwise but it makes sense that different people interpret it differently
so what if I place the lens at the back of the box?
and I want to add one more lens
behind the lens is the wall of the box
I can't move the existing lens per the other rules
The box doesn't have finite size so this doesn't even make sense
All I'm saying is that for me the second clause made it less clear, rather than more
You can clearly put the lens anywhere, and then perform tilt and rotate operations until the lens goes to the correct spot.
congrats
just be careful when you tilt to not crush the lens with a rolling rock
&aoc lb
You are not allowed to use that command here. Please use the #aoc-bot-commands, #sir-lancebot-playground, #bot-commands channel(s) instead.
now with more galaxies:
I'd rather rely on a flimsy implementation detail thanks
I just stuffed them in dicts
Sms forword code
dicts are flimsy ?
it's not an impl detail since 3.7 I believe (if I figured out what you mean correctly)
Yeah, 3.7 (just looked it up)
Flimsy in the sense most other languages wouldnt/dont support it
Aha but we're not in other languages! We're in python. :D
Go randomises iteration order for maps
Well language roulette peeps will just have to suffer.
Or they could do what I did, which was use an array/list.
.
Chances are some of those languages has their own way of emulating dictionary or can be compiled
It's a lot harder to emulate dictionary or utilize dictionary with languages that don't directly support something akin to dictionary
What's an example of a modern language that doesn't support a hashmap?
Can't think of any. You could probably make something akin to hashmap too. Even languages that use variables can be used to hash things. I just had to use variables to emulate dictionary, and looking at the source code, yes there is some hashing involved.
That's why I say that chances are other languages have their own ways.
Iβm not sure I follow! A python dictionaries, at its core, is a hash map.
Yes, that is a hashmap. What I mean is that there are other ways in other languages often. For example, and I'm using a obscure language (G'MIC) as this is the only one I know of that can replicate a different way of hashing: ```
({expr('int(u(0,6,1,0))*12345',123)}) # Create a image with random multiple (0 inclusive - 6 exclusive) of 12345.
repeat w#-1 { # Repeat amount of time corresponding to width of image
v={i[#-1,$>]} # Set v that corresponds to the value of pixel at index $>. $> just means repeat index.
Blah codes here.
H_$v=$> # You see that $v, that correspond with the v variable. Now you can see how this is similar to hashmap. I can access it with ${H_$v}.
}
I use similar technique to solve Advent of Code with this language via hashing like this.
The only hashmap in APL is the one you can get via C# interop, and that's dyalog APL specific.
other than that, you are stuck with arrays
though it does seem like you can use eval and objects
which is definitely sane
Hello is this the correct channel if I need help with an AOC problem?
#aoc-solution-hints is the better option
Thank you!
yep, didn't miss anything. that puzzle description though ... brought me back to https://adventofrealizingicantread.com
oh shoot that's not the domain
lol i can never remember the url of the joke site
something along those lines, that redirects to aoc
for some reason it's an http redirect http://www.adventofrealizingicantread.com/
I dont understand this joke
the redirect? Just a small joke that advent-of-code is also the advent-of-realizing-i-cant-read because so many people miss over some aspect of the puzzle text/instructions
Oh, i didnt think day5 was that difficult to understand tbh
but then again today was pretty in your face. i mean, ||HASHMAP|| ... seriously? :P
(this is why i love aoc lol)
i think i'm doing aoc 9, now i actually understood it
day9 part 1 was nice. day 9 part 2 was || 1 trap||
have previous years been out of order like this?
AoC 2020
It's a picture
GLHF everyone
glgl
you could still make the picture with the numbers in order tho
that would need a mirror i think
<@&518565788744024082> Good morning! Day 16 is ready to be attempted. View it online now at https://adventofcode.com/2023/day/16. Good luck!
Language Roulette: Day 16
The language is ... Kotlin
definitely don't have the time to do this rn
hopefully not too bad
I have stuff I'd like to do tonight
My birthday
Done 3/4
Maybe I'm dumb but I don't see how that would help?
LB full!
Wow wp
oh yeah that'd be nice
I didn't even think of it
π§
A picture of the culprit from a bit ago
omggg
Oh wait, better picture from today
Wow I didn't realise there even were edge cases like that today lol
Is it maybe that ||you're not handling the case where you spawn on a splitter properly||?
||not sure if this actually works, but I think mirrors can be represented as a multiplication by 1j/-1j and a conjugate||
||splitters are a real/imag check followed by a multiplication by 1j/-1j||
I can't visualise ||a conjugate|| in my head but ||multiplying by i is a rotation||
||yeah, your facing vector is one of (-1, 1j, 1, -1j), and you can change the orientation via multiplication to rotate it||
||that's how I typically implement rotation for these types of problems||
||haven't actually done the problem yet, so idk if what I'm thinking of actually works||
||we'll see||
now why's my part 2 not working
######....
.#...#....
.#...#####
.#...##...
.#...##...
.#...##...
.#..####..
########..
.#######..
.#...#.#..
Why is the pic in today's problem kinda sus
got it
single letter variable names are not advisable
are you talking about amoguses
bc i can't really see it
Maybe I just have brain rot
ΰΆ
today's chat is so inactive π§
it'll continue to drop off probably
Am i not seeing Day 16 spoilers discussion?
Discord on mobile so bad i cant go there
I kinda see it too
a lot of people have dropped off at this point i think
and some people haven't caught up with previous days yet
dang
I haven't done today yet since I've been out all day
πΏ i've caught up to day 10 finally doing day 11 rn on my way to catch up, i cannot help but think so far the only challenging question has been day 5 is it just me?
i mean the general difficulty at start was higher than usual but i'm talking more about needing to do find clever solutions instead of just bruteforcing
day 8 was challenging until you found the assumption
yeah if you haven't done alot of graph problems i can see it being tricky but it was still way easier than day 5
it may just be me being stupid tho as i did spend like half a day trying to do day 5 meanwhile no other problem so far has taken more than 30 mins so...
was trying to remember what day 5 was
it was the thing with reallly big ranges
that one is easy if you already have an interval library
day 5 was on the harder side but I really enjoyed it
!pypi mind_the_gaps
i am doing every day in a different language and without any imports (except for needed ones like io.File in java/clojure) so that's kinda hard
rip
but yeah every other day hasn't been too bad imo
i think day 12 was the hardest
but i'm sure we're gonna have some hard ones coming up
!pban 1182906123657957480 scams
:incoming_envelope: :ok_hand: applied ban to @stray temple permanently.
today sounds fun. interesting problem
might have to solve later. it sounds like it would take a while
day 1 solution in spasm https://raw.githubusercontent.com/P403n1x87/aoc/main/2023/1/code.pya
targets 3.11
shouldnt you spoiler this
I like how I stopped doing it daily just when it went from hard to medium
how is it a spoiler to say if its hard or not? does it help you solve it faster?
how is 15 medium? got it
ok i'm not reading my times correct
hold on
okay
justifiable
its a spoiler the same way it is a spoiler when i say what type of problem problem x is
knowing that a problem is easy, makes it obvious that "advanced" algorithms wont be the solution
making the coming up with a solution easier
imagine seeing a leetcode problem marked as easy
would you even consider using dp?
or does the difficulty tell you that the solution probably is some easy algo or just bruteforce
given that I don't know a lot of these complex algorithms it only tells me can I solve this before I am supposed to go to bed or am I going without sleep
which is a spoiler
fair. but rather small one
that's clearly different though. "difficulty" is totally subjective, while saying the type of problem actually gives away information about the problem
the difficulty chart being subjective doesnt make it not a spoiler
knowing that a lot of people are struggling with a specific problem gives away the information that the problem wont have an "easy" solution
Β―_(γ)_/Β―
It might if you think enough about it
All problems are easy if you're good enough B)
i dont care if ppl spoiler aoc
yall think it's plausible to catch up if i'm 4 days behind?
or nah
like are days 13, 14, 15, and 16 really hard or nah
16 was p easy
Yes
I think day12 was the last hard one
ima try and push through then
Just be mindful of the little things
Off by one errors and stuff
Conceptually theyre easy but i spent a lot more time than i should hunting down these things
yeah should be doable! you got this.
today is kind of getting long π
yo this is my first year doing aoc and today i found out i can still do past years challenges and get stars for it too
it seems i got things to do
yeah its quite fun but i got enough to do with today XD
xD
save the past years for January!
good idea
Today's not bad at all. Now tonight's new puzzle might be challenging. π
i'm just currently doing a lot of if statements. this is going to be very verbose
That's what most of coding is. ifs assignments and loops in some variation. π
since there is actually somebody here i will ask what day you find the hardest so far?
- haven't done that one yet. 10 was also tricky but in a fun way
yep 12 for me too π΅βπ«
Yup 10 and 12 a little harder, but not impossible. Ask for hints or at least hints on what to google, don't waste time spinning when you could be learning. π
thats exactly what im doing
||doing a check for every possible symbol and then nested if for every direction of movement. check if coordinates are valid and not already a checked state then chuck on tbd pile. probably works. we'll see||
thats p1 i belive
Part 12 wasn't ||a lot of code||, but it took ||some time figuring them out||.
||p2 is a bruteforce?||
thats what i did at least
that would be telling. π
so yes. thank you
but are you on p2
not yet. just means my p1 can't be too slow
ah if you wanna know p2 is just ||repeating p1 440 times|| π€«
yeah that I've stumbled upon
I think the first thing I tried for part1 was 15 seconds but worked, and then I optimized it to be instant.
not me ||taking code from day 10 and rewriting a bit||
||just not sure if its something one does: when there are splits in a path: throw everything in a list with moves yet to be checked and repeat until list is empty.||
assignments and loops
Haskell wants to have a chat
I mean you can disguise it. But you can do a lot with math, mov and jnz. π
Who needs jnz
Jeeze! /insert scientists not asking why meme π
im trying to do day8 part 2
im using lcm, but i get a pretty big output
I get too many steps the ghost should travel
good.
part1 ||19XXX||
part2 ||13663968XXXXXX ||
that seems right
74598175385569379060059
i get
lol
That does look too high
it is
||Did you write your own lcm, or use the one in math ?||
i just multiply all individual steps // gcd(steps)
||ok, try using math.lcm and see if you get a different answer||
all of this is too much for this channel.
we should move to hints or the the part 8 channel.
it is now correct
Hurray!
maybe the overflowed
and that made it not work
i didnt know there was a lcm in math
it's only been there a few years, it's a new addition.
v 3.9
Love all the batteries in python's standard library
I would say that they were getting progressively easier since 12
you miss 100% of the shots you don't take
only worry is how much time i have
i've been super low on time this year versus past years
Wayne Gretsky
Michael Scott
the one thing throwing me off about day 13 is j like
the fact that not all columns will have a reflection
but i'll find a way past that
attribution: Walter Gretzky (Wayne's dad)
recorded in interview in 1983 by Wayne recounting the advice.
(had to google the details, but knew it was from a while back)
They'll have a reflected row OR column. I'm not sure any have both, and none have neither.
To find the reflection in each pattern, you need to find a perfect reflection across either a horizontal line between two rows or across a vertical line between two columns.
lmao i'm tryna to do 2019 again
https://adventofcode.com/2019/day/16
how the hell is this actual fft again
https://people.eecs.berkeley.edu/~vazirani/algorithms/chap2.pdf
i mean my source is here
@rancid creek You weren't kidding, part 2 is a trap for Day 9
well, one thing to do is to debug of course
oof, good thing I've got an fft function in the standard library for my language LOL
same. but, i'm using G'MIC, which has built-in FFT command to process images
not sure if it'll be useful there though, but we'll see
probably not, I'm just justifying my decisions to throw everything-but-the-kitchen-sink into my stdlib
yeah, i tested it, it's not useful for this case
I didn't say a trap, I said ||1 trap||
super spoiler, my solution was posted in the spoiler channel: ||#1182911467717144616 message||
i mean the real question for me is how do i link this to fft
i got the matrix multiplication, but it just isn't working out
Let me know when you finish which way you did it, there were multiple options. Some cooler than others. I did the boring one. =/
So any predictions? I'm guessing tonight might be a harder one.
n dimensional maze pathfinding while avoiding moving objects.
god please no
part 1 is pac man, part 2 is pac man in 4d
https://adventofcode.com/2019/day/18 comes to mind.
the back 1/2 of 2019 was no jokes.
wehred u get this list from
made it.
oh lol
using data from leaderboards
also why is day 16 put as easy it's literally the one i'm malding on rn
it's based on when the top 100 finished part 2.
totally forgot this was happening this year damn
holy 80 mins for top 100 and they're quick guys
So it's a relative scale. If it takes you an hour for an easy, you can expect the insanes to be several hours.
can we see the full chart? is it on your github
No, it's a WIP, but one sec, someone ran with the idea and made a cool web site.
https://aoc.xhyrom.dev/ similar concept
The only reason I made it was to track whether weekends really are harder. They're not, but the last couple of weeks do tend to be harder, regardless of day.
One really cool thing xhyrom did was automate it so it's always up to date. I was updating by hand. lol.
2019 day 18 and 22: 2h+ They were fun puzzels. But iirc I was traveling at the time, and was hoping for a 30 minute puzzle. Oops.
like i really don't like the ones that require examination of the input
i don't like the ones where u have to modify the input
How do you mean, modify?
like i remember there was one in 2021 that was a path finding problem that required expanding the map 5 times in each direction
i mean it wasn't that hard it was j annoying lowkey
Like how you can't keep your name for more than 24 hours
Gotta change it!!
and didn't really require much thinking
Gotta switch things up!
Gotcha. The point of those is (usually) to catch out people whoβve not coded the solutions in the best way initially
If you code the best in P1 you are sometimes rewarded in P2
When people actually start calling me βAdvent of Verbosityβ then itβs time to change lol
What's wrong with being Mr. Verbosity?
yeahh i feel like they're always "make the input super massive so a naive solution won't work"
i did the boring way meaning calculating the difference and storing the first/last value only
When you put it that way, nothing wrong at all!
Basically the only way to do it since Eric doesnβt want to run any solution code on the website
Look at it this way: https://i.imgflip.com/89me0z.jpg
he must be crazy good at competitive programming
to run thousands of peoples' solutions
That's the cool way.
π
Perfection π
speaking of day 18, this is gonna sound really weird but i remember you helping me with that day in a reddit thread for a long long time
This was my nightmare day
Needed lots of help just to even solve P1
P2 as yet unsolved
That day and Conway cubes basically are my most hated days
what was conway cubes
Trying to remember part 2, but I seem to recall some sort of modified bfs where I passed along game state. I'd have to go back and look again.
2020 day 17
Basically could not do that one without looking at a solution
I currently have a solution that is incredibly nicely written by myself to which I have no clue how it works
3D geometry combined with huge ranges is 100% the worst for me
My solution to that one included these 3 lines:
||
vecplus = lambda o,d: tuple(a+b for a,b in zip(o,d))
neighbors = lambda n,l: sum(n.get(vecplus(l,d),0) for d in deltas )
survive = lambda p,l,n: int(n in (2,3)) if p.get(l,0) else int(n==3)
||
I was more cryptic that year I think. =/
Yeah I have no idea what that code means π
Let me post my written code
Actually itβs not Conway Cubes, what am I saying
That one was fine
that's not the
switching cubes on and off one, is it?
Yeah itβs another one
shudders
That one
Reactor Reboot
2021 day 22
If someone can decipher my solution that would be very much appreciated
I wrote comments in order to gaslight myself into believing I understand how this works
lmaooo following this thread i was about to say, wasn't fiddle's nightmare reactor reboot?
then i saw your most recent message π
One of the ones that was harder for me was one I made leaderboard on -- by solving it by hand, and then took forever trying to figure out how to translate what I did by hand into code.
this looks absolutely insane
pathfinding with keys and locks - wtf
Day 11 map looks a lot like poisson noise
did you use negative cuboids?
looks like you did
for explanation, it's far easier imo to start with considering 1d intervals
the inclusion-exclusion principle describes why the method works
when you calculate all the intersections when adding a cube, you're essentially bumping up from inclusion exclusion on n sets (our intervals in this case) to n+1 sets, which you can do by (stuff including n intervals) + (new interval) - (stuff including n intervals intersectioned with the new interval)
makes a lot more sense seeing it that way imo
GLHF today everyone
Language Roulette: Day 17
The language is ... Lua
I can write code in any language--I can't right functional code though, and the roulette is just reminding me of all the ways I can't π
<@&518565788744024082> Good morning! Day 17 is ready to be attempted. View it online now at https://adventofcode.com/2023/day/17. Good luck!
finally the path finding day arrives
Fr lmfao
nice, congrats to the looking for internship guy, that's fun to see
that looks painful to do
Looks like ||Dijkstra||
||I haven't dug in, but I was thinking something similar, drawing from the WagnerβFischer algorithm family||
I forgot to bring my laptop though, so all I can do is sit and watch
Who (or what) is Dijkstra in this context? I believe Iβve seen that name coming by somewhere this month already, but since a itβs a fairly common last name in Dutch, I guess googling for it wonβt bring much related results.
Pen and paper are a great tool
It's an algorithm: ||https://en.m.wikipedia.org/wiki/Dijkstra's_algorithm||
Thank you.
ok done done
My pathfinding isn't working why am I stupid
yk i have no idea if this is relevant to you
but ||iterating through all directions not the current one|| doesn't work
20 on the dot today, that's nifty
i had to like ||make a dict for each direction to each other direction|| for crap to work
python language roulette?
oooo, pathfinding
time to visit my old friend ||dijks||
forgot how his ||algo|| works lmao
been some time
unfathomably based
Ahh I figured out what I did lmao
||I wasn't caching my x and y runs in my visited set||
606/460
Wow. Managed top 1000 for both problems, and took not much time for part2. I am very grateful to the author(s) of the ||pathfinding|| module for making part of the problem a lot easier than it would have been had I implemented the function itself.
what's that module?
Sorry, writing in rust, not python. If you're interested, link: ||https://docs.rs/pathfinding/latest/pathfinding/||
man, rust
I prefer python (easier input parsing, batteries included, can write recursive inner functions), but I'm trying to learn rust, and that crate is a godsend in AoC.
haha gl
i tried rust before and it was so bad i wrote a blog post about it
(golang, which i'm learning now, is worse though)
Could you link the blog post? I'm curious. Maybe in an off-topic channel though.
https://sanspapyrus683.github.io/content/other/rustrant/rustrant.html
this was like a year ago
You realise that's because char isn't a numeric type, right? Overflows do give RTEs, as well
And this is because a) strings are hard and b) other languages that do string handling properly are also linear-time lookup, they just shove it in the indexing operator and you don't notice because it really isn't a huge deal
(also &String is generally not a useful type, not sure why you mentioned it as well as String)
The one in parse isn't necessary, the one on the left (or alternatively as a turbofish of collect) is necessary to declare the type of container you want, it could also be a HashSet, for example
...they can't? All array indexing is usize
Right, a collect could produce many types of collections. You need to tell it which type you're intending to build in some way.
This is the good ternary operator btw - since blocks are expressions, why have two ways of writing the same thing
Btw what you want really is <integer_type>::from(ring % 2 == 0) and there's a clippy lint for that
This one does trip me up but there is a good technical reason for it: Inner functions can be monomorphised separately this way (or not at all if they're not generic), which leads to faster codegen and encourages the use of inner functions over private external functions
because your takes are bad /j
ironic comment given today's puzzle.
hint ||if you know your last dx,dy, then because one of them is guaranteed to be 0, you can get the reverse just by -dx,-dy.||
||dijkstra famously said that the reason his algorithm was so simple was he had no pen and paper handy and had to do it in his head||
I'd say 12 (hot springs matching)
same
day 12 was easier than day 14 imo
calc?
guess i'll be learning path finding then. kind of excited
- please send your code as text (use a pastebin if it's too long) so it's easier to read
- you're in the wrong channel, see #βο½how-to-get-help (and don't expect people to spoonfeed the answer either)
Today was hard for me... T_T
hello everyone, put an asterisk on the repository if it's not difficult for you https://github.com/Ttunay/game
I will be very grateful!!
This is the wrong channel, use offtopic channels
What are some other algorithms I should learn for the next few days. I never used dijkastra or a*, I learnt they will be usefull so I studied them a little before today. What are some other well known algorithms that occur frequently in the last few days?
I would look into the chinese remainder theorem
so more counting problems?
It's generally more related to N things happening in a cycle and starting to cycle at some step. Find some detail about that
It's a theorem that relates a bunch of equations (congruences) like this
x % m1 = a1
x % m2 = a2
x % m3 = a3
...
```To this "merged" equation:
x % (m1m2m3*...) = a
```And along with it you'll usually learn how to calculate a given the x % mk = aks
I understand what CRT is. Just wanted to understand more about the kind of problems
Oh, nvm then
Hey everybody, can someone tell me where I can learn Python and do practice lessons for free or cheap?
Ask over in #python-discussion , this channel is for https://adventofcode.com/
no calc, ||just throw a minus sign in||
||```py
a,b = -1,0
c,d = -a,-b
c,d == 1,0
you can get the reverse of any direction this way.
You could review the problems from last week of previous years, just to get an idea of what is being asked
when you're ready, you can look at the solution I posted #1185813850973540442 message to see where I used it to ||remove forward and backwrad moves||
havent looked at the problem, jsut saw the dx and dy
funny thing is, you remove the braces and ; and it starts to look like python. π
Someone introduce this guy to Python
this is still better than people who do following:
void func()
{
// code
}
writing code like this should affect your credit score
agreed 2 space indents are cursed
1TBS, 4-space indent is the only correct way to do braced languages
oh that was the discord indent
i meant the placement of the {}
i hate seeing it
yes
idk why not every app has it by default
pressing tab in text editor gives some weird indent
and word too i think
That would be the tab character, which is 'move the cursor up to the next multiple of 8 spaces'
Useful for tabular data, not an indent function
:V
believe me, there are worse ones
I bring to you: GNU style
Personally, I use 4 spaces/tabs on Python. On other languages: I use 4 spaces/tabs on C++.
that's terrible. they should be aligned so that that scope is easier to read
the function calls are also particularly terrible
They are aligned if you notice that it's actually 2-space indentation
you know that's not what i mean
Tab is configurable width, though itβs typically 8 chars
imagine deeply nested 8 chars tab if else statements
(no but actually it is 2-indent, look at the unbraced if)
Yeah all right s/8 spaces/the tab stop/
Tangent - Did you know discord actually supports s/search/replace
yo sup
Yes I did lol
in a very limited fashion
e.g. this doesn't do anything sensible s/(very)/\1 \1/
and e.g. s/foo/bar/g
bar/g test foo
(starting from foo test foo)
any semi colon using language should require the semicolon at the start of the line. π
I mean...you could write it like that
pulls out cartoonishly large mallet
does it support tr? let's try . qqq
for day 13 or wtv the reflection one was
i think my programs getting confused by head fakes
like it thinks there's a vertical reflection at the end
but in reality there's a horizontal reflection
problem wise, is it better to j use the reflection w more points reflected ig
Make sure to check that the reflection isn't empty
Or if this is part 2, ||make sure to check that there actually was a smudge in that reflected region||
does it work on the example data?
nvm i figured it out but part 2 kinda confuses me w the instructions
||in the second pattern, why can't the reflection still be on the 3rd/4th row?||
Because ||there is a smudge in the mirror causing a wrong reflection, if the new reflection doesn't contain the smudge it isn't new||
ohh i see
we escape the filter once more
Nice work! Keep it up!
i know i'm a bit late, but to add on to this, ||if you defined your directions as an array and going in clockwise or counterclockwise order, and your direction is some integer 0 thru 3, you can add two and take its value modulo 4 and that will also give you the "behind" (this is how I did it just because I was too lazy to multiply the translation vector by -1)||
is day 14 part 2 ||going to be too slow by j doing a naive solution?||
My whole reason for doing this was so I didn't need ||an array or dictionary of positions.|| π
Another thought is, if you use complex numbers than ||getting the rotations is easy as well.|| π
true
just multiply by i 
yes, ||look for cycles||
Slow yes. It should finish in about 27 hours though, so technically possible.
@woven sable assuming that the state of the grid after every single cycle was unique, the only valid solution would be to simulate all 10^9 cycles (and this would take a while for anyone)
so my hint is: ||assume that there aren't that many unique states, and that duplicates begin to occur after some number of cycles||
That comment reasonably applies to multiple puzzles
and yet it's something that's very commonly missed
feel like shayaan's question ab part 2 of 14 makes that evident
i would like to note that I was also in the same boat
still can't get used to aoc
i have a habit of operating under the assumption that i'm going to be tested against multiple inputs (most hidden)
Another med/heard one last night. Surely tonights will actually be a difficult one then? I keep getting ready. π
At least I was right that last night ended up being maze finding.
for problem 17, they don't give the size of the 2d array?
or do we assume that the max size is the example array they gave?
Yeah they usually don't give you a max size of the 2d array
the full input size is the same for everyone I believe, so I end up just looking at that
what is the max possible operations?
before we time out
I found a brute-forcey dynamic programming sol with 3084588 operations
there's no time out
you're not submitting the code, only the answer
as long as you're ok waiting for it lol
how long does 10^7 operations generally take?
like how many operations before I wait a day
that's what 10 million? shouldn't be that long. Depends on your definition of "operation" though
let's not discuss solutions here
like idk if i'm being dumb or not
what language is this
my own lang, it compiles to C
damn
I wish I can make my own lang, but that's too much time and effort
If I had $1500, I'd take Dave Beasley's Write A Compiler course https://www.dabeaz.com/compiler.html
In my case, I want my own interpretative language with JIT support
But, for now, I can get by current options
Language Roulette: Day 18
The language is ... Ruby
GLHF
GLHF
<@&518565788744024082> Good morning! Day 18 is ready to be attempted. View it online now at https://adventofcode.com/2023/day/18. Good luck!
pycharm is not working for some reason
another ||optimization|| puzzle today
I don't even know where to start with this one
Part 1 doesn't seem to be using the colors and I'm scared
Is P1 just regular|| floodfill||?
Yeah that's what I did
No idea what the optimisation for p2 is
what's p2 about?
||same thing with really big numbers|| basically
i just leaderboarded for the first time :)
well done.
how do you do p2
i used ||shapely||
||think about past puzzles||
||d10?||
omg. my code stalled on the 623rd line...
You achieved rank 80 on this star's leaderboard and gained 21 points!
heart stopping moment there when it paused on the last 2 lines.
leaderboard is full 
20:55 today, we're late in the month and still getting leaderboards filled up early on
I had it so fast man
but then I spent 8 minutes debugging correct code
LMAOOO
sobbing
spoilers ty
probably ||area β lattice points||
π§
I think I know why that happens
smth smth ||4 corners||
Yeah
If you imagine ||the coordinates to be the centre of each cell||, when you ||halve the walls|| you're effectively ||undercounting ΒΌ of each corner||
Wait no that would be ||overcounting|| why is the OBOE in the other direction
oh noooo
OBOE?
Off By One Error
no i'm pretty sure that's ||undercounting||
i took the ||shoelace area and added the distance traversed / 2||
I'm figuring it out in a text editor lol
okay but what's with the extra off by one?
Oh wait I have a better way to understand it
||if you treat the coordinates as the top left of each cell, the shoelace gives you the internal area + half the walls - 1 cell (the top right and bottom left corners are both omitted)||
||so when you add half the walls rounded down you need an additional cell to make up for the corner that wasn't counted||
||corners exist||
a simple input that makes the square should make it obvious
Why are the colors even provided? Is p2 horrendous?
they're not colors.
||p2 tells you that the colours and instructions are the wrong way round||
Is p2 basically using the hex value of colors as lengths?
thousand yard stare
Lol, I was right then lmao
||shapely|| ftw, i guess
it depends what the operation is, adding 1 to an integer 10^7 times will take a lot less time than sorting a list 10^7 times, for example
idk, but for competitive coding 10^8 is generally how many operations you can do
Can I see your solution? I tried that but got wrong answer so ended up just implementing it myself
if i had remembered how ||pick's|| and ||shoelace|| worked maybe i could've been in the leaderboard again π
wat is advent of code
Day 18 was trivial comparatively to yesterday. x)
meh, ||knowledge check like knowledge check, not much sense in talking difficulty IMO||
a coding Christmas challenge where every day you are given a coding problem to solve https://adventofcode.com/2023
I feel ashamed for forgetting about ||pick's theorem|| from ||day 10||
||https://github.com/TheSuperGamer20578/Advent-of-Code/blob/master/2023%2F18.py|| you need to ||add half the Trench plus one||
ahh that makes sense, thanks! ||I did end up doing that for my eventual solution without shapely but for some reason didn't think about doing it there π i only tried adding the whole path and none of the path||
Is it just me or is the puzzles this year much easier than they were in 2022? I had to stop around ~11 last year as it was just beyond my comprehension but this year I've stumbled my way to 18, with a couple of the later days such as 15 and 16 being quite easy to do on my own
yeah they are
or there was just more knowledge accumulated throughout the year
I must say that my decision to seek help this year instead of just trying to solve everything on my own has made my AoC experience waaay better. I still managed to solve half of the problems without any help at all which makes my non-CS heart happy. I do feel like the later days seem quite manageable, especially after seeing all sorts of approaches to problems from previous days. To me that is a sign of a well-made set of puzzles where earlier solutions help you with the rest.
||first we found the bits inside a 2D loop (day 10), then we traced a ray across mirrors where some mirrors has special behaviour based on direction of travel (day 16), then we had to solve day 10 in 3D with a much larger step size, except all motion only happened in a 2D plane (day 18, we were removing cubic metres). Are we about to do these steps in 3D? O.o||
the instrument oboe
||stop using spoilers pls i am going to jump offa brig π||
|||hi|||
just two |
||||||oh yeah ||||||
||lol||
i procrastinated learning ||shoelace and pick|| on day 10, looks like it's time to do it now :P
i have no idea what those two magic words entail
but it's time to Find Out β’οΈ
You dont need those two if youre giga brained
Apparently a friend ||computed all the corners and fed em to autocad to build the polygon shape and get its area||
you can do the same in python
Or yknow, ||sweepline||
I honestly find it surprising I still haven't seen anyone solve today with it
Well yes but you need to write code for that
there is a library that lets you do exactly the same thing autocad does
Which one
there are many geographical libraries in python and they use it as a baseline for calculations
||shapely||
Oh ok i've heard of that one
wonder how far i'm going to fall these days
my day 17 works for the test cases but not for my input 
ok changing a number worked
idk why
but it works
no, patrick, off by one error is not an instrumemt
considering adding a bunch of imports to my template
it makes a pretty even staircase lol```py
from collections import Counter, defaultdict, deque
from contextlib import suppress
from functools import cache, partial
from itertools import batched, chain, count, combinations, groupby, islice, pairwise, permutations, product, starmap, tee
from operator import eq, gt, lt, ge, le, add, sub, mul
from pathlib import Path
from bisect import bisect, bisect_left, insort, insort_left
from heapq import heappop, heappush
from math import ceil, dist, floor, gcd, inf, lcm, prod, sqrt
from sys import setrecursionlimit
from re import findall, finditer, search
What template is this for
advent of code
it's the file i start with on every day
currently it looks like this
https://github.com/cefqrn/advent-of-code/blob/main/2023/template.py
Oh i didnt realise i was in this channel
actually i could probably just paste it in here it's about the same size as the previous code block lol```py
from contextlib import suppress
from itertools import groupby
from pathlib import Path
with (Path(file).parent / "input").open() as f:
data = f.read().rstrip()
lines = data.splitlines()
blocks = [tuple(group) for has_content, group in groupby(lines, bool) if has_content]
with suppress(ValueError):
ints = [int(x) for x in data.split()]
functools reduce! also itertools cycle and repeat, and for me I use from time import perf_counter a lot as well. π
for re I have to use import re as I use the flags a fair bit. Not to mention the occasional use of compile and match
ooh yeah
i just grepped the folder to see what i tended to use
in the problem where cycle would've been useful i just multipled the string by a big number lol
Iβm not as fast as everyone else so I like using dataclasses/namedtuples to give my fields semantic meaning
Also, I often use sys.exit() to dump myself out of code when Iβm debugging things
oh yeah last year i used namedtuples a bunch
working in 2d with classes was so much easier
ah at that point i usually plop it all into a function and return lol
Yeah Iβm too lazy to indent things sometimes
fair
Or properly debug using a debugger
print debugging ftw
i've been dabbling in haskell and it's a miracle i haven't passed in io to print debug a function yet
icecream debugging > print debugging
I was trying to solve day 10 part 2, but the squeezing part is complicated...
otherwise I would do a simple coloring algorithm
like, travel from the inside, all tiles that are connected
but if there are pipes that are squeezed together, I wouldnt be able to travel through those
unless I did something...
any hint?
or any other different approach that I could take (just hint)
That's always fun.
Itβs not a huge amount of work either
@dataclass
def Point:
r: int
c: int
Point = namedtuple("Point", "x y")
ah i've always preferred using the one in typing
why is it in typing actually
Thatβs what I use 99% of the time, but I use row / column so I donβt have to think about swapping the y and x variable on lookups
"x y" just doesn't sit well with me, I know the namedtuple can parse it nicely, but it's such an odd way of passing in individual names
Also nice to add some dunders. For the Beacons puzzle a couple years ago where I needed 3 dim points:
class Beacon(tuple):
def __add__(p1,p2): return Beacon((p1[0]+p2[0],p1[1]+p2[1],p1[2]+p2[2]))
def __sub__(p1,p2): return Beacon((p1[0]-p2[0],p1[1]-p2[1],p1[2]-p2[2]))
Should add x,y,z to that and clean it up.
Also __iadd__ is nice
a = Point(1,2)
a += (1,1)
Work sreally nice if you have named directions
Up = Point(1,0)
A += Up
a = Point(1,2)
a.NorthEast()
Well you could do that too ^_^
this was my Range class for ||day 5||, it made writing the solution much much easier
||```py
class Range:
def init(self, start: int, end: int = None, steps: int = None):
self.start = start
if steps:
self.end = start + steps - 1
else:
self.end = end
self.seen = False
def contains(self, item: int):
return self.start <= item <= self.end
def repr(self):
return f"Range({self.start}, {self.end})"
def lt(self, other):
return self.start < other.start
def gt(self, other):
return self.end > other.end
Probably not, I'd go with a move, and some enums
Same
nice. I just used the actual Range class. but thought about extending it to support adding and subtraction of ranges.
I donβt think you can extend the range type?
!e
class Range(range):
pass
@normal dragon :x: Your 3.12 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 1, in <module>
003 | class Range(range):
004 | TypeError: type 'range' is not an acceptable base type
You could still make a custom Range() class and use the range item under the hood (though thatβll be slow for some operations, like the in operator)
why in specifically?
Oh Iβm thinking of something else
There was something where range was expanding out into the actual numbers of it
I donβt remember I was probably doing something stupid
ah ok
ah right, that's one of the reasons I abandoned it. Also it was getting silly with the permutations.
def __sub__(self, other):
b0,b1 = self.start,min(self.stop,other.start)
a0,a1 = max(other.stop,self.start),self.stop
return (ORange(b0,b1) if b1>b0 else (),ORange(a0,a1) if a1>a0 else ())
pretty sure that spoils nothing at all.
Yeah I have no clue what that represents
compared to just using actual ranges which was fine.
||```py
for r in seed_ranges:
# Split range into 3 possible ranges using r1, r2 as the potential breakpoints
B = range(r.start,min(r.stop,o))
A = range(max(a+o,r.start),r.stop)
M = range(max(r.start,o)+d-o,min(a+o,r.stop)+d-o)
if B: new_ranges.append(B)
if A: new_ranges.append(A)
if M: converted_rules.append(M)
Built-ins where possible is usually a good move. That looks clean
BAM.
Thoughβ¦
I donβt know, self, I feel like you could compress that down into a single line
It would be less clean. If you want to do that move it to a separate function. π

(I was just trying to bait you into doing absurd golf)
Also, now I recognize the code
Or rather which problem it was
bit stumped today. i liked day 10 more
I havenβt read the puzzle yet, but ||I saw someone mention it requires knowledge of a specific algorithm||
i hope it doesn't. its basically day 10 but with directions instead of a given grid
I was the only person I saw using range() so maybe it was not the optimal approach. But the code felt clean.
Super clean
Your solution from ||day 10|| should be applicable here. But it might be ||slow if you do it 1 point at a time|| but should still finish within a ||couple minutes||
||might not be. I relied on knowing when there is a corner. guess i could do where I came from and where i'm going at that point||
No, there's lots of ways to do it. But any of the ons that passed ||day 10|| should probably work. But ||there is a subtle difference in what they're counting||.
Cool!
Iβm very far behind. It always gets challenging keeping up in the later days with my social obligations
I posted links to 2 different wikipedia pages in the spoiler channel. ( spoilers: #1186176336734203954 message )
Noice
||ok idea i go basically the same way with tracking in and out by toggling but i'm doing it it in x and y seperately so it doesn't matter if there is a lot of space inbetween. might have to mark in all intersections though on both lists||
Best to just get help and keep plodding on. The exposure to the problems and techniques used alone is worth it, even if you get a lot of help.
Oh I more meant from finding time to do it
I usually can figure out when I need to start looking up algorithms or asking for help
I liked how one guy figured out a neat trick for one of the days and explained it, and someone else replied with a link to the wiki page explaining the same theorem.
Like the last three days have all been filled with holiday social/family things
I love that! Reading the solves is always such a joy
Especially the super fast solvers with the their one line solutions
I've got a personal battle with one guy. We think alike and post similar code, but his is so much cleaner especially when he uses numpy. Curses.
4HbQ?
me: I did a cool solve!
him: like this (link to better code)
curse him. π
Haha
jokes aside, he's great. especially when he does numpy stuff, and we've bounced some ideas off each other in the past.
I almost never use numpy
4HbQ and jonathonpoulson are prob my 2 favs to follow on reddit and anything @mossy basin posts on discord. always a good read.
jp's code is generally a mess, but I love the speed he cranks it out at and the way he explains what he's doing after.
I did one last year (or 2021?) I finished but wasn't happy with how slow my code ran, so I watched his vid, and 1/2 way through the solve he says "this won't work" and swapped to c for the rest of it.
I also really enjoy the early isolang days
Iβve hit the leaderboard all of once. That was early day when it wasnβt nearly as competitive as it is now
Yesterday was my first leaderboard this year. I've been going casually and didn't expect to hit it at all this year.
Thatβs awesome! Way to go
Thanks. But I was happier with rewriting it to finish in 1ms. the Original version the one that got on the leaderboard took 2 minutes to finish. lol
Nice. Excited to peek at your code later. Iβve enjoyed the discussions so far this year
In short there's an ||O(n) solution|| but my original ||was O(n*m)|| (<--- you can look at this later)
ok, brb. Being taken shopping. My favorite. π
I wish more engineers understood algorithmic complexity. Like you donβt need a super in depth knowledge of it, but having some knowledge is good
π«‘
I wish more engineers just had common sense. π
common sense is surprisingly uncommon?
I had a team working on a web front end to showcase how amazingly fast and real time our search engine was. But it took ~5 seconds to LOAD the web page. The Engineer working on it added a cute spinning logo to mitigate it but I was still annoyed it made us seem slow.
So I assigned another engineer to help see if he could speed up the loading code. Around lunch time I see him and asked if he'd found anything yet.
him: yeah, what do you want the load time set to?
me: well 0 ideally but do your best
(pause)
me: what do you mean "set to"
Turns out that the first engineer had added a sleep(5) to the page to make it look like it was a professional site and was doing a lot of setup.
LOL
ok, brb, have fun all
every now and then just regex find sleep(%d) and replace with '' in the codebase
That sounds like the old speedup loop
βSo what do you think about the opportunity,β Benβs recruiting agent asked. He thought about it for a few moments. It wasnβt exactly what he was looking for, but then again, he had been out of work since November of 1989 β nearly three whole months β and figured he should probably get back in to the swing of things. He told the recruiter that he...
I canβt believe you ran into it in the wild
man grep
who and what fruit?
grep is a command line utility that searches through text files
Cap, you a vim user?
I can actually imagine people complaining that an app's loading time is so quick it doesnt appear to be working "properly" to them
Sometimes slowing things down isnt such a bad idea
I've seen some things over the years. π
What is vim ??? /s
There is a legit UX experience need for slowing down a response to convince people the app is doing something. TurboTax is a well known/studied example. But it depends on the use case and should be an actual documented need before you slow down the experience for an end user
Same.
I just hadnβt seen that one in the wild. Iβve seen unintentional examples. Like once some dev wrote some silverlight code that had an animation that ate up huge amounts of cpu and eventually crashed the computer from a memory leak
but lets not pretend its isolated to programming. screw up at work: we have o ring seals for different temperatures. the 180 degrees ones are a lot more expensive. someone put in 160 degree seals in the 180 degree seals box. which work for the 30min of testing we do in house but start leaking after 5 hours when its with the client.... not ideal. also 180 was like 20.- and 160 about 5.- visually identical
.... ... like tears in the rain
I actually looked up the exact quote thinking I'd paste it, but the last line is a bit morbid. π
lol, I did same too...
...1999 Mars Climate Orbiter
An investigation indicated that the failure resulted from a navigational error due to commands from Earth being sent in English units (in this case, pound-seconds) without being converted into the metric standard (Newton-seconds). The error caused the orbiter to miss its intended orbit (about 90 miles, or 145 kilometers) and to fall into the Martian atmosphere at approximately 35 miles (56 kilometers) in altitude. The spacecraft disintegrated due to atmospheric stresses.
its the last words of a character of course its morbid
it's funny to see in the stats the drop on day12 and then everyone who managed to get through day 12 stayed for the next 3 days π
i must admit I may be close to my limit π
didn't have time to do much Friday-Sunday because of real life; caught up 16 and 17 now, went relatively smoothly.
18 isn't hard but I'm just pretty sick of such questions; not much motivation to od it
fair, I'm waiting for the next dijkstra so I can skip it again and be done π
lol
I didn't mind the djikstra as much tbh
I think largely because at least that felt a little more fresh
and the actual grid-like nature was not nearly as forefront. for day 18 most people are just using a formula they barely understand which I'm not that interested in doing π
I have never learned path solving algorithms so it was either spending all day on the problem or watching movies with family...
djikstra is fun and worth learning fwiw
I want to come back to it after christmas celebrations are over and redo day 12 for dp and 17 for dijkstra
You might still be working on day22 then ....
to be fair, using established tools and algorithns is a lot of what makes python great
You don't need to know how timsort works to use sorted. You don't have to implement a priority queue to use hyeapq, etc.
the puzzle is figuring out you need something that counts the ||area of a polygon||, googling algorithms to do that is part of the solve.
and maybe you learn enough, that next time you still know the options you have.
I'm honestly not sure how the convo was related to python in any way π€
I think as always for AoC, people draw the line in different places for what tools they'll use. Some people will use basically anything, some will use the standard lib, some will do it in C with zero dependencies, etc
personally I try to mostly only use things that I understand relatively precisely how they work. I got a binary heap implementation for day 17 because I didn't want to write one out from scratch, but I know how to do it.
i don't know how that formula works, and to judge from some of the discussion around it, it seems like most people have only the vaguest idea. some people will be okay with using that regardless, some will not.
Though honestly, I might sit down and learn it... it would probably be a lot less painful than dealing with all the edge cases in alternative ways of doing it
The point is you don't need picks or greens theorem here, You can use them. But they're not required. Using them just makes sense in the same way using timsort instead of writing your own sort makes sense. Sometimes knowing how to use a tool is all you need. For example the vast number of people that use something like excel, vs the small number of people that actually worked on it.
like I said, the difference is that I know how sort works - whether it's timsort or not is a red herring because it doesn't specifically need to be timsort
If the difference doesn't matter to you - that's cool. But there is a difference, and for me it matters π
Looking for someone in here trying to make billions
On a business idea
Starting from nothing
Lmao
Capital B
can someone give me a medium sized project that is for beginners? please?
Make an app that displays weather/forecast for a user's specified city/current city
"beginners"
You will have to scrape data
::))))
:')
And move work with api
That is beginners
Extremely beginner
Simple request and parsing
If you're in the US the NOAA is where to look for all your weather needs. Believe it or not most all weather apps or websites get their raw info from NOAA for free and then repackage it.
@spark dust@hollow wharf@civic dune this is better suited for #python-discussion it's off topic for this channel
Shhh
Language Roulette: Day 19
The language is ... C#
You need glasses?
No no, I've got them, that's how I C#
GLHF everyone
<@&518565788744024082> Good morning! Day 19 is ready to be attempted. View it online now at https://adventofcode.com/2023/day/19. Good luck!
oh part 2 must be a doozy today
haven't even looked at day 18 yet
Today looks tedious to implement
239/14 let's go
I'm purely judging off of the leaderboard's very slow trickle in completion
It's actually not that bad
I haven't even read today's question yet
Won't give hints until LB is full though
I keep forgetting to put 'return total' in my functions and I swear it's costing me several spots each day
REDEEMED
no I got 239 for p1
Tbf writing better code for p1 is probably why I did so well at p2
oh shit i forgot
But I think I literally cost myself 2 spots on p2 by forgetting the return total first time for each part
π π
FULL
40/70 :D
Nice
idk why my p2 doesn't work tbh
maybe it's just because the code is so bad
I should rewrite it..
Leaps of faith? Where lol
||i'm probably wrong somewhere, but why don't the xmas ranges ever intersect? i think you can construct a workflow such that they do||
I genuinely have no idea what you mean by this lol
Talk to me in spoilers
LB is full so I'll give the hint now: ||it's not that bad if you remember day 5||
86/855