#AdVENt of Code
1 messages · Page 12 of 1
||floor?||
ground
what
.
oh
ok
||so to ur code, outside group = touches walls?||
idk if this is too much of a hint ||my solution basically just did a scan across the board and kept track of wall parity||
ill just stop here
i dont really feel like working on this further
i wanna eat and od other stuffs
def resolve_pipe_destinations(pipe : Char, x : Int32, y : Int32) : PipeDouble | Nil
case pipe
when '|'
{ {x, y - 1}, {x, y + 1} }
when '-'
{ {x - 1, y}, {x + 1, y} }
when 'L'
{ {x, y - 1}, {x + 1, y} }
when 'J'
{ {x, y - 1}, {x - 1, y} }
when '7'
{ {x, y + 1}, {x - 1, y} }
when 'F'
{ {x, y + 1}, {x + 1, y} }
when '.'
nil
end
end
how terrible is this
thats unironically so real
dests = resolve_pipe_destinations map[y][x], x, y
next_dest = dests[0] == prev_dest ? dests[1] : dests[0]
it just gives the next point
|| my solution starts at S and simultaneously walks into both ways til they meet by keeping track of the previous points and then picking of the two next points the one that isnt the previous point ||
i didnt know of a better way to know which of the two points a pipe connects to is the one i need to take
yes
of who
no
r u lacking neurons
yea thats real
!?!?!!$@#T
each loop step
are u doing 2 simultaneous walkers
@distant kindle@distant kindle@distant kindle
^
yeah
i walk into both directions from start at once
one step per loop step
until they meet
i was gonna do that too
nyaa :3
so i could put them in threads
THREADS
but the input is tinyyy
i didnt use threads wtf...
i just found it easier this way cause otherwise ur steps are gonna be like
S12
703
654
instead of
S12
103
234
i should use spoilers
vapwill be vaporized
i fogro
joe is here
mmm food
what
it looks like batman scarecrow
halloween concert
god i dont have the time to make large inputs this week
: ( ( ( (( (
maybe tmr will be easy and i can pump out a few at the library
ATT HE LIBRARY
oh right youre like in fl or wtv
library goes hard tho
that is true
Me
DO NOT FLOOD FILL
bouta flood fill your a-
yeah I did flood fill
no
the image u replied to shows why flood fill doesn't work
cause there's that one 0
HOLY GENIUS
Part 10
do u mean like || u multiply all coordinates by 2 so that there's proper gaps between pipes when they're touching ||
I interpreted it that way yea
that was my idea but i was kinda too lazy to try
see what I just did
||all the Xs are artificially added points, and I made it connect the pipes correctly||
||ok ive successfully duplicated all points, now to figure out how the hell to flood fill||
@steady fog@steady fog
||after copying the first floodfill algo from wikipedia I have successfully done shit||
||. = non-pipe in original input, x = non-pipe after extending input, + = flood-filled part||
||ok now + is only the flood-filled tiles that were in the original input, and = is flood-filled tiles that weren't, so I should just be able to subtract the total non-pipe tiles beforehand with the amount of +s hypothetically||
Real
FNAF 4
wait why did u need to copy an algorithm
floodfill is super easy with recursion
because I have no clue how it worked
Recursion fear
recursion is one of the things that's like "wow that's really neat" and then once you try using it more you realize "wow this actually sucks how can i make a loop"
recursion actually works pretty well in rust with this specific example
Recursion always works well when ur not recursing too much
I just store the current input in a variable that can be accessed from any level of the recurion function
Tbh
a lot of stuff is easier with recursion yeah but depending on your lang/implementation you're limited by the stack length
and then I don't have any cloning issues like I did before
i think if you're recursing so much that u hit stack limit you probably shouldnt be using recursion
also my recursive function returns nothing so that helps
I will make u a large input dw
Make if I can on phone
I was using recursion for p1 today but in node recursion didn't work today since max stack length is only like 3000 calls in js
huh how do u do recursion in pt 1
yeah recursion for pt1 seems like one of those aforementioned cases where a loop is better
I was doing a full search because initially i assumed that since you didn't know what S was it could be connected to multiple possible loops and you had to find the "real" loop
and then I decided to be smart and actually look at the input
The fear you'd feel if your S looked like this```
.|.
-S-
.|.
or just read the exercise xd
it tells u it's one single closed loop
:p
yes but
.|..
-S-7
.|.|
.L-J
that is also, still, one single closed loop
you just don't know what S is without checking first
done
177 lines of code 
not super fast but meh who cares its the fun way to do it
smart solutions are for nerds
i do think the way you did it is more satisfying
yeah
i like the visual solutions
don't tempt me to make this compile to wasm just so I can visualize it easily
Ooo u give me the best idea
this isn't fully functional and doesn't solve the problem properly but
|| https://codepen.io/katlyn/full/wvNOQmo ||
||i just wanted to see pretty flood fill||
my ||flood fill|| loop became super cursed in order to make it be non-blocking
so the canvas could update
it's not that cursed I guess but using requestAnimationFrame as a while loop kinda gross xd
virus visualiser
i should make it not do diagonally
would probably look better
OH GOD
I DID NOT OPTIMISE THIS FOR LARGER GRIDS
new game: stop the virus
why is this so satisfying wtf
WHAT IS THAT
guh that's cool
@tranquil vapor Im doing day 10 in c++
do you love
||Me figuring out how to formula the corner pipes||
goemyty
insane
WHAT
horror
Is that for solving or large input
me
you
vap do be writing an essay
Basically ||I kept track of my direction as a number 0 right 1 up 2 left 3 right called d, and I got the index of the corner pipe in "J7FL" called it m, and the new direction after moving into a corner pipe is ((-1)^m - d) % 4||
Idk if that's right u might have to swap the subtraction terms
Solving
why does vscode try to run all my language extensions at once
can it only run them when necessary
Yes good ones usually only spin up when they see the file in the project or a file type gets opened
I don't think so
guh
I also did this in rust so its ok
is that your session cookie
doing zig today 
GOGOGOGOGO
I honestly have no clue how to start this
I initially went "oh just use pythagorean theorem" but no you can't do that
hm ok I have an idea but
hm
Today is pathfinding for real
What if galaxies collapse
Game doesnt tell anything then ig its fine
Anyway looks fun
what if i collapse you
i wonder if others are gonna do my idea i have
for expanding the rows/cols
might kill mantika not usrer
zig is evil
its super easy ||the path is just the manhattan distance and so you take the amount of columns that is in between two galaxies and add them to the path||
is my interpretation of the example correct about 36 pairs
1 galaxies (1 #) = 2 galaxy
when the universe was expanded, they doubled so as I believe, so this is now:
1 galaxies (1 #) = 4 galaxy
so 9 galaxies * 4 galaxy = 36
works for part 2 as well
galaxies are constant
what do u mean galaxies * galaxy
its just 9 galaxies
i love finding some random github issue with the answeri need
zig has a matrix function
ok p1 done
and of course p2 is the same old "now fuck you, be smarter about it" crap
nvm
I don't get it either but my interpretation was that the pair of galaxies on expansion on those paths expanded so it would be 4 now
today wasn't too bad but i spent about 5 minutes working out why the fuck "pairs" weren't galaxies with every other galaxy
the only confusing part for me is where does 36 come from
yeah that's exactly what i mean
I haven't started yet
today is easy just im struggling with the lang
can you explain this, eage probably is afk
universe expansion does not change the amount of galaxy
just the amount of space between them
yea
the pairs are done ||for i, j where j > i||
so ||galaxy 1 is paired with 2 .. 9
galaxy 2 is paired with 3 .. 9
galaxy 3 is paired with 4 .. 9||
etc
you get to ||8+7+6+5+4+3+2+1|| = 36 pairs that way
day-11-zig.zig:7:32: error: type '[][]const u8' does not support array initialization syntax
var universe = [][]const u8{};
Die
combinations
every unique combination of galaxies, ignoring ordering
im going insane
I was stuck on part two for so long because of an off by one error 
oh got it
thanks @teal mountain @solemn python
the puzzle phrasing is a bit off for me but this is it
thank you jetbrains for being smart
does rust have an itertools crate
woah
that's really good actually lol, i wonder how that works
is it AI or something
they do have something like copilot but it's an additional license that I don't have
so I don't think that would be it in this case
although i guess you would be doing something like that when rotating a matrix
ok today isn't ot bad
yeah I used it for combinations lmao
just add "itertools", then use itertools:IterTools; and then you can call .combinations(2) on any iterator to get the pair combinations
anyways today isn't bad at all tbh
once you don't do the ||lazy parse of keeping everything in a 2d array|| it's pretty easy
nice
my bones are soaking
I just did ||sets of the expanded columns and rows, and then just pooped from xmin..xmax incrementing doubly for the expanded cols, same for y||
||i love pooping from xmin..xmax||
||but I just stored the indexes of blank columns/rows, then after finding galaxies I add <amount of empty to the left> * 999,999 to the coordinates in both directions||
my pc made an evil noise
Cant you just use iter().slice(2)
first of all that isn't a method
@real hinge work
that just pairs them up
Javascript rotten my brain
which is a very different thing than combinations
How
I have lesson
combinations draws a line between every possible pair
well for 3 galaxies
1,2
1,3
2,1
2,3
I thought it combined 2 values trol
actually that has a repetition
Op
idk how combinations work, thats why I used a lib lmao
guh
no
and besides if you did .chunks for the example you would have 4 pairs and 1 galaxy left over lol
Just 2 for loop no?
ok zig is too cursed for this
and stared at my invalid syntax for a few minutes before remembering parentheses exist
I just kept track of how many I added
and added that to the insert index
¯_(ツ)_/¯
that would probably work
and now I forgot that I have to actually prefix for loop variables with "const"
guhhhh
AND I FORGOT ABOUT IN VS OF
this is concerning
thread 38123 panic: index out of bounds: index 11, len 10
thats a lot of threads
yes
day-11-zig.zig:18:18: error: no field or member function named 'replaceRange' in 'error{OutOfMemory}!array_list.ArrayListAligned([]const u8,null)'
what
Its written with A and double O
what
You did wrong
what
mantika is a genius
oh guh this wont work
nvm itll work
finally
i got it adding expansion
nop
@steady fog you love
Omg
It's so late
Time to set my alarm so I'm not late to the library
Today is such a layup for uiua can't wait
@hazy sinew global #52 did it in Uiua
insane
NOT NEW
What
yes I've been using javascript/typescript for years, I just got so used to rust syntax for a bit
SO RELATABLE
REAL
Me in js when I wanted traits
we need betterscript
isn't that just typescript
no
typescript is just java with types
coffeescript is the real king 👑 🚀
Which makes it 500x better
Also *javascript
java.
I hate typescript
coffeescript is actually kinda onto something
Prototype chains were a mistake
YES
rininininiininini
instanceof should be O(1)
you love they only realised that on es6 and added classes but its just more prototypes
All of javascript was a mistake
At least typescript makes it mostly tolerable
That's my experience
javascript was literally made in 10 days
@sullen fiber make uiua compile to wasm and script with that
by one guy
It does
gonna make my own programming language
HEY DID YOU KNOW IN AN ALTERNATE TIMELINE WE WOULD HAVE SCHEME ON BROWSERS
Its in rust and the Uiua online pad uses wasm
as any redpilled aoc player does eventually
You love
Love
steal your memory
In 1995, Netscape hired Brendan Eich with the promise of letting him implement Scheme (a Lisp dialect) in the browser. Before he could get started, Netscape collaborated with hardware and software company Sun (since bought by Oracle) to include its more static programming language, Java, in Navigator. [...]
By then, Netscape management had decided that a scripting language had to have a syntax similar to Java’s. That ruled out adopting existing languages such as Perl, Python, TCL, or Scheme. To defend the idea of JavaScript against competing proposals, Netscape needed a prototype. Eich wrote one in 10 days, in May 1995. [...] In early December 1995, Java’s momentum had grown and the language was renamed again, to its final name, JavaScript.
scheeeeeeeeeeeme
kill netscape
nvm they died already
kill them again
Thank GOD
YOUR MOM
I'm going to shave rinis enamel
scheme has very simple syntax which means you could easily compile even more things to it
WHAT IS SCHEME
lisp
lisp has macros defined as lisp functions
thats like the most extensible you could ask
WHY IS IT SO BIG
im right
it worked on example
How good are they tho
lisp's data type is literally lisp syntax
So they only allow lisp syntax
can
HOW
DIEDIEDIEDIE

wrong
nice
i got destryoed today
woke up at 5.40, sick and extremely dehydrated, had an arch linux moment (wifi randomly stopped working at 6:02), so after not realizing for 5 minutes i had to reboot
ended up with a 20min run
to prove this, i did column.filter { it != '.' }.isEmpty() instead of column.all { it == '.' }
Yop
@tranquil vapor do aoc
soon
You didnt even do yesterday
i gave up best choice ever
dont slap
advent of code players when i vent into their ad
i have a feeling day 23 or 24 is gonna be interdimensional travel
yea
be nice btich
@tranquil vapor do aoc
but i have to get a new idea for part 2 
oh
i doubt i can just insert 1000000 rows
yeah I did same
or can i
yeah
so char array
ig
|| I just stored all empty row and column indexes in some array and added to result by adding 99999999 (1 billion - 1) per row, column ||
do day 10 part 2 ehen
@distant kindle
annoying
i will just not use an enum
easy
literally same function for both parts
Now 10 p2
nop
i did this and it worked
||
pairs.each do |p1, p2|
i1, i2 = [p1[0], p2[0]].sort
j1, j2 = [p1[1], p2[1]].sort
steps1 = steps2 = -2
(i1..i2).each do |i|
steps1 += map[i][j1] == BlankLine ? 2 : 1
steps2 += map[i][j1] == BlankLine ? 1000000 : 1
end
(j1..j2).each do |j|
steps1 += map[i2][j] == BlankLine ? 2 : 1
steps2 += map[i2][j] == BlankLine ? 1000000 : 1
end
sum1 += steps1
sum2 += steps2
end
||
Whyu
why did you
lmao yea thats smarter than what i did
fixed
are you embedding file
nop
I am too lazy to make funtion work for both parts
but its pretty much doing same stuff
that too, cheat
nop
wait
I think I d
include_str! embeds file to binary right
yes
Same at first I did this and then treated it as input
except you used uiua
I did it better cus I had to in part 2 tho
Except I'm doing twice as much work as I need cus idk how to not in uiua
😭
Idk how to only get like one half of a table
🧌
freya is nice
yop
you guys wouldnt believe what freya said in my dms
shed be if she accepted my friend request
the f slur
this video came out 8 months ago and i just randomly stumbled upon it
bro this channel is so good
🔴 Learn graph theory algorithms: https://inscod.com/graphalgo
⚙ Learn dynamic programming: https://inscod.com/dp_course
💡 Learn to solve popular coding interview problems: https://inscod.com/50problems_course
⌛ Learn time and space complexity analysis: https://inscod.com/complexity_course
🔁 Learn recursion: https://inscod.com/recursion_course
NB...
@warped dust an old person came up to me and asked if I was writing APL
are u
No it's UIUA
But it's very much like APL I think maybe
Idk APL but it looks the same
xd did you talk to them
if they know apl, theyve gotta be a god programmer
It's from the 60s
It's like math notation: the language
FEAR
no thank u
uiua better
oml
i cant use perf on github codespaces 💔
its so over
NO
@proper totem im writing a wavefunction collapse thing for the aoc
might make it easier to generate
ngl i didnt look up how wave function collapse works exactly but i watched some videos on CDCL last night and imma assume its the same thing
what the hell is this
STOP
password generator
manti probably uses this
yop
@fallow fern
In quantum mechanics, wave function collapse occurs when a wave function—initially in a superposition of several eigenstates—reduces to a single eigenstate due to interaction with the external world
whAT
DO
no
yes
lolol im talking about smth else
but it uses the name as like an analogy
I never get projects done so this gives me something to focus on which is nice
its like a tile map generator, where you put constraints on how tiles can be touching
THAT'S NOT WHY I PINGED YOU
That's exactly why I can't focus on any of them

nop
the "Leave thread" in question
yes i did
insane why are u still here
and then got pinged again 2s later
idc
HAHAHAHA
the "pinged back into it" feature:
@real hinge make a bot that monitors member list in this channel and pings aagamer whenever he leaves
STOPPPP
okay
@fallow fern
do it via message edit
wait there's even an api method for adding members to threads
ve channel.addMember
[AsyncFunction: addMember]```

yop
but then he wouldnt get pinged
ve void channel.addMember("373833473091436546")
undefined```

undefined?!?
now do setTimeout
who was that
oh void
Oh aa
@fallow fern did you know
did you know
I knew
@fallow fern hello
STOP
HORRIBLE
never
marlboro jumpscare
gays vs trans people:
And Britain is just on a whole other level of freedom
@solemn python tyman country
Tyland
@solemn python fix
Fix
Tonight will be impossible
good
get ready gamers
why didn't you ping me yesterday
Ok fine I'll read before I go to sleep
another pipe like puzzle again?
I was ready since the last 5 mins since my bot pings 5mins before midnight utc
im using V lang
FUCk i just spilled my drink on my laptop
i dislike this one
Just calculating possibilities I think
what does contiguous group of damaged springs mean?
actually that paragraph alone doesn't make sense to me
is ok
mantika moment
part two is either going to be incredible easy or going to kill you with math
what if I do this the stupid way
this doesn't seem horrible to bruteforce
but thats also probably not p2-proof
Just brute force trol
I'm not sure how you would not brute force this one
You will think p2 later
there might be an extremely mathy way but idk
@proper totem hi
hewooos
spoob
brute forcing this shouldn't be too resource intensive though
This one is cracked
there's not too many solutions
you finished it already?
@real hinge j
H
have some sleep guys, don't stress it
whats the math for part 2
there
1 blocked message
now I can do my AoC peacefully without remembering leaderboards or people who are good at programming exist
anyways im bruteforcing it but im doing it the looping way so I don't have 893024903890432 allocations
😭 😭 😭
I have a fever
I also wanted to but don't think I will after seeing this puzzle
okay now that its time to write code
I am thinking
ho wdo you even brute force this
bleh i know what i need to do but it is difficult to visualize this one in code
not really just spoilers just thinking out loud ||if it was just the ???? that needed to be worried about my current solution would work but you also need to worry about the existing broken springs||
||which makes the logic to fill things more complicated maybe? maybe I'm making things more complicated than they need to be||
bleh i have math finals tomorrow
I should be studying for those instead of spending all night on this
will come back later
I have english :)
you will faile
nop
the teacher said if we actually try and get lower than total grade, she will just put in our total grade so it doesn't go down
I have ignored maths for most of the semester so the exam tomorrow is my hope to get my grade up a bit
i would much rather be doing the other kind of dp
ok my thing works on the example, time to add --release and wait
oh --release is only 1.5s lol
did u just cache it
the debug test had me worried
I'm going to do some funky memo shit
dang
I tried the stupid way
on the second example line its taking forver
yeah um thats not feasable
i had to try ok
time to pull out my calculator and do some math

ok well I started on something
but my hypothesis is that ||if I can calculate the amount of possibilities of situations given the 1,2,2 grouping, I can just do some quick subtraction for the answer||
I can't figure out doing this outside of brute forcing
I found a nice NodeJS threading lib and am just gonna wait for the bruteforce
||dyanmic programming||
??????#?#?#?..???#?. 6,2
this line alone requires 40 million checks
this is bad
it increases factorially
let me try mine
HAHAHA lmao
well i guess you could make your bruteforce smarter ||cache the answers||
adventofcode/2023/12 on trunk [!?] is 📦 v0.1.0
λ time ./target/release/day
Part 1: 7633
Part 2: 23903579139437
./target/release/day 0.04s user 0.00s system 98% cpu 0.041 total
no brute force
bad
guh ig I can just iterate through the dots and do the calculation logic
but I dont remember those from high school
too lazy to look up
I am thinking about brute forcing part2 too
but uhuuhuh
when i made the initial list I went through anyone who had a linked github on the aoc leaderboard
nop
who is eric
eric cartman from south park
the author of the puzzles you're scratching your head on
Too bad
Good morning
time to write clean code and push it
and forget whatever happened at 6 am
Morning
I would like to post a picture but some people dont like such things in this chat
Goal achieved i no longer remember what happened
I just know that its 11.40 and im tired
i mean not that far from truth
there are some "LGB" communities
lesbian, gay, trans and vee
lgtv
Lesbian gay trans vagi
Insane
@tranquil vapor part 2 is impossible
false I solved it
need to make 10^30 big number comparisons to brute force
HOW
lie
answer is 765
your answer is too low
part 2 is so easy i wish i knew before trying math for 40 minutes ||you literally just do part 1 with memoization and that works for some reason||
your answer is too slow 😭
dude theres trillion+ checks
I doubt it would work even if I cache the results
also I doubt memoization would work in my solution
wait why not
and source?
r/adventofcode: Advent of Code is an annual Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be …
@tranquil vapor
same for puzzle text
I removed generating readme which contained the puzzle text in my aoc tool
The reason is so clones are harder to make
Eric's reaction to me making an input generator for every day:
would it be 1:1 accurate
guhh
honestly with this day im so lost i got no idea 
idek how id brute force this shit 
i didnt believe it either
but it works for some reason
every day this year has been bruteforceable and i hate it
just wait for puzzles like this
https://adventofcode.com/2018/day/24
||note the length of the answer||
INSANE
im most excited for collecting keys for specific doors
this years part 2 have all been exactly the same
just a "stop trying to bruteforce"
not even a cool story
except day 10
and the early days
these leaderboard people are insane
day 4, 5, 6, 8, 11, 12 are all haha gotcha cant bruteforce this one and then it takes 1 second to bruteforce on unmodified part 1
it used to be in 5 minutes but now someone does it in 7 seconds
on part 1 there is a LOT of time to be saved still
how does your code work tho
7 seconds 😭
I check entire thing at once
||I memoed my results with hashmap||
i love ||
oh lmao there was a pipe in your message
you could've just put it in a codeblock then surrounded it with spoilers
||check only the first character, if its . then just drop it and go recursively, if its # then check if its delimited by a . at the end correctly and call recursive again for the next char||
i rewrote it to use hyper neutrinos refactored approach
Back to #4 for now!
My AoC repository: https://github.com/hyper-neutrino/advent-of-code
Join my Discord! https://discord.gg/j9uunTRRJm
0:00 Part 1
8:08 Part 2
Want to improve your mastery or learn a new language? Try Codecrafters, a platform where you learn by building your own project! I've always believed that learning by doing is the best w...
i did
||```kotlin
a || b
see
nutty
i just found out thats already in the stdlib
certified kotlin moment
actually you cant even do that
ternary doesnt exist in kotlin
? and : is used for elvis operator
nullable?.function()?.otherFunction() ?: nullCondition
youre basically outsourcing the null to the end
if (this) return true
if (other) return true
return false
}

wait shit
infix fun Boolean.OR(other: Boolean) = if (this) this else other
infix fun <T : Object> T?.OR(other: T) = if (this != null) this else other
the bottom one is just nullableVariable ?: nonNullVariable
also why T : Object
insane
i dont think null is an Object
youd have to do
infix fun <T : Object> T?.OR(other: T) = if (this != null) this else other
yes
but why tho
this is just ?: written with 2 different characters of the same length
infix fun <T : Object> T?.OR(other: T) = this ?: other
STOP SAYING THIS
U CANT JUST SAY THIS EVRY DAY
wee woo
But it .... It's Uiuable 🙁
somebody should solve advent of code using a breadboard and a bunch of CD4011 NAND gates
someone in our school made a calculator using only logic gates
Ok will
surely advent of code is doable too
probably not a graphing one
I wanted to use my CPU asm but it's only 8 bits
And I didn't have time to make it 32 bit
Or however many id need to address the damn input
Github mobile
github.
folders for each day.
SHIT UP
i just commit the example inputs
i get the inputs thing but puzzle text doesnt make any sense

I've been trying
I think I might have a way but I need a bit more time to figure it out
i thought of a more optimal way but its still so bad
requires too much code
i think i found the math: ||https://crunchingnumbers.live/2016/02/20/solving-nonograms-with-compressive-sensing-part-1/||
I found some reddit post with math on it, and I'm getting a number so big I need arbitrary precision
I'll look at that article, it's probably more detailed
I just found how to calculate the possibilities for the 1,1,2 part (hint: a lot)
Now how do I get that number down to 4 lol
yea i realize thats also what this article covers
it doesnt account for narrowing from partial solves
||but its kinda interesting i wonder if i can just iterate through the total known solves, the number is super small||
Wdym ||known solves||
||like, imagine if all you had was ??????????, basically a completely empty row that you must solve from scratch. the number of possible solves here is much smaller than 2^n. i wonder if you can just iterate through possible solves and count which ones match the known slots||
||btw if u dont wanna parse thru that whole article, basically the formula is nCr(n - r + 1, p) where n = len("#....?#"), r = sum(groups), p = len(groups)||
Yeah I got that part



