#advent-of-code
1 messages Β· Page 37 of 1
mm
.aoc join
i just got really tripped up on that part
.aoc join
the explanation was kinda crap imo
Can I do this aoc later after 2 or 3 hours
I will do it for fun
So not a problem
You can do it any time, even next year if you want
You can access all previous aocs
Imma go eat breakfast
Under the events button
well, ive successfully discovered another thing im shit at lol
challenge: make the most cursed roundabout solutions on purpose
i wish i could
I will probably do these challenges with java
but that would require me to understand the question first
Honestly, a lot of people nickname this challenge "Advent of Reading" because 75% of the challenge is reading it and understanding what to do
You're just supposed to find the number of times the previous value increases
It's a simple for loop
This is day 1
no spoilers in this channel please
#advent-of-code-spoilers-archive for any solution discussion
welcome to 'autism sucks' volume 666: understanding written shit is hard
im having intrusive thoughts about using a different language for each day, but like stfu brain, you dont even know 30 languages
Reading AoC questions is kind of an art. There's a lot of text which isn't relevant to the question.
its an art I'm genetically destined to suck at
||advent of code spoiler||
Oh no!
I wonder if Eric does that on purpose
why do you have my old pfp?
Why did you have my new pfp?
I won't look at #advent-of-code-spoilers-archive at any cost lol
which lang do we have to write the stuff in
whatever your heart desires
whichever one you want!
Any
lets goo
in theory you can do it by hand
you have to leave the server if you don't use python
All that matters is that you turn the input into the output
that sounds like a pain
Raise your hand if you forgot about AoC until exactly the start time and didn't have anything ready
π€
some people have for previous years too!
They were like "fuck this code shit" and sat down with pen + paper for like an hour
and got the right answer
I remembered, but I haven't done it before so I didn't really know what to do
same
I just setup aoc helper and stuff before 20min
and how do i write multiple lines, whenever i click enter it tries to submit it
.aoc lb
Here's our current top 10! πππ
| Name | Score | β, ββ
--------------------------------------------------
1 | francisdbillones | 0 | (0, 0)
2 | Paritosh_Singh | 0 | (0, 0)
3 | mbaruh | 0 | (0, 0)
4 | Jack92829 | 0 | (0, 0)
5 | codephile1221 | 0 | (0, 0)
6 | Shakya Majumdar | 0 | (0, 0)
7 | Xithrius | 0 | (0, 0)
8 | neumond | 0 | (0, 0)
9 | Hassan Abouelela | 0 | (0, 0)
10 | HyTurtle | 0 | (0, 0)
pro tip: skip any text that appears before numbers
I have before, but I'm better with Python now lol
time for a 6 hour livestream of my hand
damn
You don't. You only need to submit the answer.
you don't submit your code, you run your code on the input provided and submit the output of that
is this from private lb?
I haven't done it before either, I did some of last year's last month
i put the input into a .txt file personally did i overcomplicate?
just do whatever feels the most natural/quickest
I did the same but without the extension
bot is sure struggling to fetch that LB π
It caches
i was gonna do it in the shell but i didn't want to paste too many times
It's on a cooldown
They don't want spam on the api
me too, I had a with open() or whatever
there we go
yeah same
.aoc lb
Here's our current top 10! πππ
| Name | Score | β, ββ
--------------------------------------------------
1 | Oliver Ni | 1460 | (1, 1)
2 | RundownRhino | 1457 | (1, 1)
3 | Defelo | 1455 | (1, 1)
4 | asishm | 1455 | (1, 1)
5 | Starwort | 1451 | (1, 1)
6 | Artemis | 1451 | (1, 1)
7 | artcz | 1450 | (1, 1)
8 | godlygeek | 1444 | (1, 1)
9 | Zeyu Chen | 1442 | (1, 1)
10 | salt-die | 1441 | (1, 1)
and i messed up once already because i didn't understand the question
I forgot how to see the time
who was 3 points faster than me 
how do you tell?
what's your username?
43 for me, not bad
RundownRhino
69 | Arnav-2004 | 1315 | (1, 1) B)
I need to hold that position
ahh
Oliver placed on global
This isn't what the website says?
well, I feel incredibly sad now
WAIT WTF YOU PLACED ON GLOBAL
there's multiple leaderboards - the bot consolidates all of them together to a single one
π
damn
Interesting you say that actually, as that's something I have trouble with too π€
great job reptile!
I was absolutely correct about the seconds thing
?
we have many people participating from our server, so we need multiple leaderboards
Oh
I probably was like seconds later than Oliver, and that's the difference between #30 and #78
I thought the leader board looked small
We technically have 7, we then combine them all and re-score them for our big community leaderboard
Nice!
how on Earth do you leave the leaderboard
We have space up to 1200 if I did the math right bit just under 800 currently joined
So I'm not 8th :( it was just an illusion
.aoc leaderboards
**```
.adventofcode
**Can also use:** `aoc`
*All of the Advent of Code commands.*
**Subcommands:**
**`about `**
*Learn about Advent of Code*
**`countdown `**
*Return time left until next day*
**`join `**
*Learn how to join the leaderboard (via DM)*
**`subscribe `**
*Notifications for new days*
**`unsubscribe `**
*Notifications for new days*
How does the community leaderboard work, by the way? What's the "score" there?
If you go to Private Leaderboard, there's a list of the ones you've joined. You can leave them from there.
oh that's how to get there
N points for 1st, N-1 for each following, N = number of people who completed that day iirc
huh
Hey guys can someone help me with python coding exam?
!rule 8 - No.
8. Do not help with ongoing exams. When helping with homework, help people learn how to do the assignment without doing it for them.
mhm, which is why this year I'm going to do a secondary leaderboard scoring and only include people who completed each day. That way the first few days aren't weighted so heavily
hmm, I see
did the first question already get over?
flip flopped on the stars or tied
You can still solve it!
The questions stay up permanently, https://adventofcode.com
What do you see?
plain blank screen with a timer still running
I'm gonna make my own aoc next year but like... not so many words
the words make it impossible
Refresh? What does the timer show?
ah there we go, Personal Stats have the timings. Apparently all of my score is from part 1, whereas part2 I fumbled, by like 2 minutes.
23 hours 25 mins
I can take a look at the individual scoring, but I'm pretty sure the scoring algo is right. We checked the math a lot last year
Is there a 1 above the timer? That is the puzzle
Thatβs the timer for tomorrow. Click on the 1.
This is harder than I thought
ACTUALLY
ahh got it
DID Y'ALL KNOW
done!!!
Yes
no
thanks @somber crow and @signal grotto
RUN .aoc daystar for #aoc-bot-commands for some funness
...the scoring algorithm is linear?
we now show the times submitted for each day + star, so if you want to see how you placed per star and per day you can
Big shoutout to @bright mantle for this feature
how do you join the pydis leaderboard
.aoc join
it felt like a eternity but i did it in the end π
you should already be on it iirc
how else
freakin 14 degrees celsius here π first time programming with a jacket and beanie on
absolutely
i think i have to turn on dms to use the dot command
Yep.
lol how the heck did i manage to be on the top 10 of the leaderboard
is there another way
I can just give you the join code in staff channels
Was about to say the same π
insert joke about touching grass
lmao
Do we have only 1 try for each question?
No
nah, any number
i would've finished below a minute if i didn't have a 30 second timeout on part 1, i don't think it's too bad for day 1
Nope, you have as many as you need! There may be a cooldown though
Looking at the times for part2, I did really bad on it
some people finished part2 within 2-3 minutes
did you also create a nested loop?
w h a t
i still havent finished lol Β―_(γ)_/Β―
lmao i cant even navigate the damn website
nah, my mistake was trying to use [REDACTED] which I don't have the right numpy version for π©
and then I did it the simple way
my mistake was writing a whole class to do half of the shit which didnt work 
(3 times)
evidently none worked
Anyhow, I am off to bed. If anything breaks profoundly ping devops pls
last year, there were like 2 or so game of life tasks
so maybe make sure you have the sliding-window utility methods for the next tasks
though... it's unlikely, this is day1 after all
:)
The creators be like: I wonder how many days in a row can we base on that concept before they start catching on?
right I'm gonna go write this in brainfuck brb
did my discord bork or did this message not ping anyone
ended too
Samee
p sure lance doesnt have perms to ping roles
;(
rip
(as it shouldnt)
I'm gonna look into that rn but yeah that may be it
oh my god I think we disallowed mentions
I didn't even know that message existed and I have the role
I'd be immensely concerned if lance has the ping everyone permission tbh
lol
I guess I can just manually ping.
thats a huge nono in the world of discord bots on big servers 

input for second part?
trust me I've had experiences...
same as first part
it does not have a b c d
it took me longer to find how to access the input file than it took some people to finish
same input
those are just examples
good luck everyone, im off to work
aoc helper ftw
this
i like not cheating /shrug
automating to it's finest
think
await aoc_channel.send(
f"{aoc_role.mention} Good morning! Day {tomorrow.day} is ready to be attempted. "
f"View it online now at {puzzle_url}. Good luck!",
allowed_mentions=discord.AllowedMentions(
everyone=False,
users=False,
roles=[aoc_role],
)
)
yeah @minor cave I'm guessing this part didn't work right or something (that or permissions)
alright! im done with both the puzzles!
yeah, I need to bother admins about it
nvm
Hey! The input is just too huge to copy and paste or something so I try to web scrape or something it tells me everyone has different input so you must login... @minor cave how do I access the input then? Is copy paste the only way?
I just copy-pasted it into vim
The input is just too huge to copy and paste
What?
You should definitely be able to copy/paste into a file
You can grab the session cookie from your browser, and then you'll be able to request the inputs.
Ctrl+A, Ctrl+C
you can also right click and save link as
see https://github.com/salt-die/Advent-of-Code/blob/master/2021/aoc_helper/__init__.py for an example
I mean, isnt that kinda.. wrong
it's 2000 numbers. It's small.
just press CTRL + A
Not at all, why?
it'll select everything
you can also ctrl S to save as a txt file
π
eh, but then you have to navigate through your file explorer
bold of you to assume i dont save everything on my desktop
lol
Lol
You can also get the file by it's link: https://adventofcode.com/2021/day/1/input
right click and save link as....
tfw preset file explorer b/c i didnt prep and other way to download
i know but then it says its unauthenticated...
wait this thing came out!
everyone has different inputs
When does the timer start counting? Is it when you click the link for the day, or is it based on the actual time?
yeah right click and save as
see my messages above
aww man i might have to do it tmrw
wait is the leaderboard time based
faster u finish itt the better
timer starts when the puzzle is released. Midnight EST
yeah
yeah, and for this day the global leaderboard was filled within like 90 seconds
One of the many reasons the leaderboard does not matter.
finished
wow.
ours can technically fill indefinitely (right?)
Oh well... that means i'll never have a chance to get on the leader board π¦
IT STARTED YAY
bruh i lost over 40 minutes on the second one because i messed up a for loop slightly
how to check the server leaderboard
you can probably try on the latter days
one small number haha
since those'll take more than a few minutes
the global fills very fast, the Python Discord one fills much slower and there's a lot of drop off as we get past the first week
So by the end, even completing a day could earn you top 25
.aoc lb (probably best to do it in #aoc-bot-commands or something)
ok thank you
That's why we have private leaderboards for discord and for reddit, so that we can play amongst ourselves and not be wrecked by the speedcoders.
im 16th on the leaderboard π₯³
I don't usually stay up this late. I wont get to do them until the next morning. π¦
this is super cool
note that you need to join the server's leaderboard to be there (get a code with .aoc join and input it in the Leaderboard tab of the site)
You'll find that that is fine, just doing them at all is where the fun is.
It is fun tho - i'm not worried about the scoring.
i already joined :D
Is the leaderboard different from last year?
The python discord leader board is split into multiple leader boards
168 here, for eg.
@charred plaza my new nemesis!
Great to meetcha
the later puzzles are where the speed spazzes will start to get tempered a bit by difficulty
likewise!
how do i access the others i just see this
What is the code for a leader board in here?
(also, another fun feature, .aoc lb <aoc name> will show you your rank in the leaderboard embed
Your rank from the end, AFAIK. In other words, it's the number of people who finished the task minus your position in the list of people who finished the task
Run .aoc lb in #aoc-bot-commands
.aoc keaderboard
do .aoc join to join to the leaderboard
.aoc join
.aoc join
.aoc join
.aoc join
.help aoc
Very cool. I placed on that one. π
#aoc-bot-commands also exists π
Sorry!
No worries at all!
How hard do the questions get?
.aoc lb
:x: Please use #aoc-bot-commands for aoc commands instead.
oop
how in the world can ppl finish the first thing in 90 seconds
They get pretty difficult, but it depends on the year to be honest
People get competitive with this, plus the first few days are always easy (compared to later days)
seems like too many have not joined the private leaderboard
they skim the question and already know which function they want to use and most likely automate their input and submission
I'm pretty old. The first two are pretty easy.
so, we technically have 7 leaderboards. You can see the full list be going .aoc lb in the bot commands channel
yeah just saw
.aoc subscribe
Okay! You have been subscribed to notifications about new Advent of Code tasks. You can run .adventofcode unsubscribe to disable them again for you.
There is a cap of 200 per private leaderboard
Across all our leaderboards we have 700+ joined
We have 7 for a bit of padding so we don't need to make a new leaderboard every year
so theres 25 days each day has 2 parts?
yep
mhm
yes
assuming it will be utc-5 everyday
cool
Goes up and down, but on average it increases
yeah
now we can spend the rest of the day speculating on if we get to make another intcode computer
.aoc subscribe
Okay! You have been subscribed to notifications about new Advent of Code tasks. You can run .adventofcode unsubscribe to disable them again for you.
is it intermidiate friendly
.aoc join
probably π
i was literally not prepared with the procedure so that wasted much of the time π©
each input is 2k lines long?
Ofc there should be opt codes this year
Some problems are easier than others!
thats good
Why do I seem to have a different Private Leaderboard?
no intcode this time please
There's likely a huge number of people visiting right now, give it some time
Last year had 1 with 2 lines iirc
We have 7 leaderboards, the bot combines them into 1
We have multiple leaderboards due to our community's size. You can see the full lb with .aoc lb
.aoc lb
:x: Please use #aoc-bot-commands for aoc commands instead.
Depends on the problem, some are very short and some very long
ah
Ah ok, that makes sense
i wonder why they capped the leaderboard
This is so much fun - reminds me of homework from long ago.
How do i play an advent of code thingy? I've logged onto the website idk what to do now
click on the 1, and that's the page of the first task
Ah, thanks
Finally
How did I go back in leaderboard?
if you left it, just .aoc join for the join code and re-enter it
i mean ... my rank fell
Oh, what you placed is what you placed. You can increase your score on later days.
so the rank is also dependent upon time when u submitted the puzzle - the time when u opened the puzzle
the time the puzzle is released (midnight East coast US) to when you submit it
oh man im on 83
so... i did it earlier. but i still fell in rank for some reason
has it started?
1hr passed
I've never seen the scoring to be inaccurate, sometimes others just beat you to it π€·ββοΈ You can catch up tomorrow!
i finished day 1, well that was a good start
okay..
It could be someone placing very high for the first part, then taking longer for the second, so you don't see their points until later. It could also be some oddities for how much each point is worth as people complete it
is it really that good to solve these puzzles on Python REPL instead?
I can double check, but I'm preeeetty sure it's right. It's just a bit funky because of the scoring metric. It produces some non-intuitive but correct results
are you referring to the private leaderboard?
Ohh okay..
I'd recommend a code editor instead, but it's certainly possible.
Would I still get stars if I do them on like Saturday
Ah, thanks!
Yep! You get stars regardless of time, even if you do these problems next year.
Also, https://adventofcode.com/2020/day/25/ is literally the Diffie-Hellman key exchange
#11 place yay
AoC is just dsa in disguise if I'm being honest
No one really knows what to expect from each day until it's posted, but yeah probably.
Oh god
I can try
I have been practicing dsa
it's all about algorithms
but like.... it's fun cause π it's ~themed~ dsa βοΈ
Aoc gives me Christmas spirit
||why is santa from AOC going places?||
I did aoc day 2 in 2020
I was #13
Then let's just say
My brain decided to head out
but what is dsa
data structures and algorithms
I love it
ah, okay
yayyy #17
I did till like day 10 in 2020
and then my brain passed out
has it started
1:30H ago
DUCK
1 hour 30min
Hey! I found the answer to the first question but is there a way to know if its correct. I mean I wanna crosscheck if its correct or not...
I will do later
Just submit it on the website!
I just wanna crosscheck before submitting.I am kind of nervous
Don't be! You have as many chances as you need.
you can't submit answers too often, but you can do at least two in quick succession
FYI to those confused about time zones: the next day will open up at <t:1638421200>, shown in your local time (<t:1638421200:R>)
finally got my access to computer π©
don't know how the phone ui works but i just can't see anything there
I wouldn't expect much from a coding challenge site on a phone tbh
true true
You got this!
lol why do you need pain
no.. I failed π
It says my solution is lesser than whats the correct one
found it!!!!
I solved it!
Nice!
I used 0 for start which was wrong
it has alrd began?
Yep!
where's the website again?
.aoc lb
We have 7 private leaderboards. @hidden copper combines these leaderboards into one for you to see. Just run .aoc lb in #aoc-bot-commands!
Here's our current top 10! πππ
| Name | Score | β, ββ
--------------------------------------------------
1 | Oliver Ni | 1486 | (1, 1)
2 | RundownRhino | 1483 | (1, 1)
3 | Defelo | 1481 | (1, 1)
4 | asishm | 1481 | (1, 1)
5 | Starwort | 1477 | (1, 1)
6 | Artemis | 1477 | (1, 1)
7 | artcz | 1476 | (1, 1)
8 | godlygeek | 1470 | (1, 1)
9 | Zeyu Chen | 1468 | (1, 1)
10 | salt-die | 1466 | (1, 1)
ah that makes so much more sense thanks
and where are the challenges at?
Right below that
also what is the function for calculating score 
Commandline?
2*n -p +1?
For the global leaderboard or ours?
What do you mean by that?
yours
also 1 question is my name nsfw
or in general too
just to be safe
our private leaderboard gives you 1 point for every person you beat, plus 1
Hmm I see
global gives you 100 points, minus how many people were faster than you
;-; this sounds like a pretty basics but still too hard
I wouldn't be the one to ask, not a moderator.
I thought it only gave points to top 100
I am confused why do we have 7 leaderboards instead of just 1?
I have 0
yes. if you're position 100, you get 100 - 99 points. If you're position 101, you get 100 - 100 point. i.e. 0
ye
do i get neg points
:(
Where did you get this stat?
luckily not lol
yes, you see part 2 when you complete part 1
no negative points just 0, you can still join the pydis lb and rank up there
yeah not gonna do it
already ended
got your meaning there
lolz
How do I see this?
personal stats
I am at 69
blame school π©
our private leaderboard gives you points based on how many people you beat plus 1, so you can still compete with everyone else in this server who is participating
haha
Every time I have to deal with raw indices / slices I die
hey if I have solved only the 1st part and many people have too done that but how are they ahead of me in the leaderboard?
they did it quicker?
umm... How does the platform know if its quicker?
It's from when it unlocks
they solved before you
I'm waking up at 5 am every day so I can get try for the global leaderboard
.aoc join
:x: @twilit gorge, please (temporarily) enable DMs to receive the join code
how are @twilit gorge
I'm not doing it for the global leaderboard
.aoc join
it's entirely for fun for me
what do I have to do now, I logged in and joined the private lb
im fine
solve the first prob
.aoc leaderboard
:x: Please use #aoc-bot-commands for aoc commands instead.
.aoc join
π©
that moment when you typed the wrong answer
*not the wrong answer, i know the answer already but i typed it wrongly
imagine they add captchas for submitting ur answer
π©
the sad part is my english isn't good, i can't read the question too well
dumping it to google translate makes it worse
advent of english
.aoc join
next time prob in saturday i'll get better score
.aoc join
i swear it was harder last year maybe its just the first question, im smarter, or i was stupider lol
but it was fun looking forward to the next few days 
Is a small clarification of the problem statement considered spoiler, or is that fine here?
asking about what the problem is asking for is not a spoiler
I am gonna to aoc in 30min
@mossy basin I'm always impressed by the simplicity of your solutions. This year (technically, day), is no different
i made a typo the first time i entered it in :(
my code i mean
do you lose points if you get it wrong the first time?
The problem says what to do if one number is larger than the previous, and what to do if one number is less than the previous. Presumably, they are never equal, but I haven't looked through the input thoroughly. What way would two consecutive equal numbers count?
Can I upload solutions for day 1 on github public repo?
do you think the depth will be same?
sucks that im going to college rn
ive got maths for 1 hr 30
actually 3 hours of math
What time does this start?
Same question
what? AOC?
Yeah
.aoc countdown
Day 2 starts <t:1638421200:R>.
the website https://adventofcode.com/ also shows a countdown for the next day
time to do aoc
morning warmup
where do i do it
what do i click on on the website
click the first row for day 1
I had the same problem. Click on the 1 in the middle column of the front page.
12:00 (UTC-5). If you are Indian, then 12:30AM (00:30) everyday
a little question, what do the blue and grey ~~ mean in the image?
i have the similar thing showing
They'll form an image later on
it's the top row of an ascii image
cool
I'm doing Rust this year and turns out I'm not good at Rust.
And I haven't written any Rust in a long time.
This was last year. I didn't finish all days, but I think it'll have colors when all days are done
So that took me practically forever.
oh hey dem. im doing the same.. turns out, its surprisingly challenging. im already stuck π
Took me about an hour and a half.
But this is good, I am relearning Rust, which is what I wanted.
no problem
those big bois did it in 10 mins, its fine if your stuck
just understand what it wants and its easy after that
Day 1 has been solved in Gurklang
hi
ty
who knows
Weβre discussing Advent of Code here. Check out #911684406605930496
Rust is very unforgiving, so it might not be the best choice if you want to be competitive in AoC.
i dont particularly care, but dawn gave a good suggestion earlier, and so im doing the challenges first in python and then trying it in rust. it seems to work out well
you get a little bit of gratification before the suffering π
can someone send me a screen on where i click to get the first puzzle
you need to be signed in, and then its on the homepage. just click the 1 number
I don't really have any interest in competing, I know from previous experience that I have no chance whatsoever, so I'm using this as an opportunity to improve my Rust skills instead.
I know from previous experience that I have no chance whatsoever
is it really that hard
To place well on the leaderboard? Yes.
global leaderboard seems very competetive
if you care about getting top rank then yes
This can be done in any lang?
yes
oh ok
it took me i guess aroung 20 to do day one 
only the output matters, as you need to submit the output not the code
i clicked on the 1
The finished image
with a cool tornado
animated
and i dont get anything
ah ok
read :)
||(the 2nd task of day 25 is basically just have everything else)||
can you share a screenshot of what youre seeing on the site
Wonder if that counts as a spoiler not sure
have everything else?
can you please elaborate?
or actually dont, why ruin the fun
xd
Kinda.
yeah I also think kinda
So, err on the side of caution and avoid mentioning it here.
I mean you could do day 25 part 1 of last year and see what I mean
i spent some time getting a 3.10 env set up, looking at last years' questions I think match might come in handy
oh i can? let me see
Yeah day 25 of last year wasn't that hard if I remember right
cool
yeah Midnight at UTC -5
did aoc day 1 π
Rotating pieces of seamonsters was the hard one last year.
Which day was that? I forgot
Where did you guys put your aoc input?
At the bottom of the page there's a link after logging in.
if you miss a day can you go back and do it after?
yes, you can even do previous years
okay, thank you ^^
.aoc subscribe
Okay! You have been subscribed to notifications about new Advent of Code tasks. You can run .adventofcode unsubscribe to disable them again for you.
Hey can someone DM me part 2 of day 1? (Not the solution but the problem itself). I donβt currently have access to it although I have already completed part 1
If you've completed it it should appear on the same page as part 1, under part1
No I mean Iβm not able to access the website atm
Is it a good idea to put input in your github
Sup
I don't think it really matters. Nobody but you can use it.
question about aoc bot: how is the score calculated? it's way different than on the leaderboard directly on the website
and there are much more users who completed the tasks according to bot than there is on the leaderboard website?
The leaderboard on the website has a user limit
'The bot one is the aggregate of multiple aoc leaderboards
After you've done the task, do the blue and greyness of the ~ mean anything lol?
It's the first row in an ascii image
When you complete a day, that row becomes colored
oh so its the same for everyone
So when AoC is over, you will see a "black and white" image if you haven't completed any days, and a colored one if you completed all of them
makes sense
how is it scaled? does bot manually keep track of current number and assign score to people who appeared during the update? 
iirc, it works the same as the regular ones, only it scores based on the virtual aggregate of all PyDis private leaderboards.
2015 had a xmas tree (I did some a few days ago :D)
pity that the next one comes out at 4am I'm never gonna be on the leaderboard lol
yep, I guessed how the score is kept. but I meant... bot only gets the leaderboards once a few minutes so it cannot do the accurate score
who does it first
Sooo thats impossible for me to be there lol
I mean, I assume it recalculates all scores whenever it gets new data
for private leaderboards: we have n people
first person gets n points
second n-1
and so on
So it'll be accurate based on whatever data was available at the last update'
but it cannot compare score m from one sub-leaderboard against score m from another because they could've been assigned at different times. that's why I was curious about keeping internal count and using it
!src aoc lb
Unable to convert 'aoc lb' to valid command, tag, or Cog.
It doesn't use scores from the subleaderboards
!src aoc leaderboard
Unable to convert 'aoc leaderboard' to valid command, tag, or Cog.
!src aoc
Unable to convert 'aoc' to valid command, tag, or Cog.
It treats everyone in all subleaderboards as part of one big leaderboard
And calculates scores based on that
yep. I said that I assumed that much
Ok, just making sure we're on the same page
can you only be in one private leaderboard?
how to participate
No, you can be in any number of private leaderboards.
ok cool
Google advent of code... lol
ty
Can someone put a link to day 1 for me. Or tell me how to get there
Thanks
im legit stuck on part 2 π¦
Go through your code and check what exactly it is doing
Reconsider what you have to do and how you'd accomplish it
Try the test case as well
Do you have a solution that doesn't work, or do you have no idea how to even approach the problem?
Please keep solutions to #advent-of-code-spoilers-archive
But, would you put yours?
oh there's a channel for that this year?
Yep
cool!
I did already in fact
I mean, I did it by accident. I don't think there's any harm or benefit to it.
Yea my solution doesent work
Do you mind if I steal this and add it to aoc_helper btw?
!subscribe
I dont understand what the answer box wants me to input
Do i put in code
Or just an input
Its asking how many measurements are larger than the previous measurements but it already said seven
Yes, that gives you a big text file of numbers
Oh ok
alr solved the first puzzle
So am i supposed to write a program that solves the problem when i input it
wonder what the best solution was
Yes
I mean there are only 2000 numbers you could do it manually :P
What is this?
This is a difficult challenge
Im thinking its gotta be something with lists or for loops
hey I'm sorry for asking what might be a silly question, but when posting or answer do we just paste the code into the answer box or can I link a repl project?
Now i dont know if this is the solution or not but just incase it is ill spoiler it ||i was thinking that you have to make the input values into a list and then make a loop taking the next value and the previous values which would be variables cause you can do that with lists, and subtract them and if its larger than 0 it adds to the overall count, then it will add the previous value variable and next value variable 1 so it takes the next values||
Sorry for the confusing statement
it wants the result itself
Time to do aoc instead of my schoolwork π
There probably isn't a "best" solution
why not?
but I'm sure there's a solution that took the shortest amount of lines
Because "best" is really subjective and it depends on who you ask
just a list and a gen comp
Hello
shortest amount of chars*
fastest to write? (gets you on the leaderboard). Fastest to run? Cleanest code? Has tests? Generalizes to larger problem spaces?
Maybe this AOC is when I learn how to use tests ooh
I'll set up some tests for my solutions when I actually solve the puzzle
in past years, i would write tests using the sample data from the problem statement
ah
I see
do they just give the real input and the sample data?
i'm not sure what you are asking
and what do you mean by tests? do you write unit tests for your code..?
yes
yes
ah alright
if i'm unsure that my code is working, yes.
did u write unit tests for first day?
i didn't today
can you explain more pls?
do you by tests mean asserts?
i might write the code, but have some question about whether it's working. I can write a test using the sample input and answer, and check it.
I mean pytest-style tests with asserts, yes.
I might not know enough about python to do this
Im just gonna look at the solution for today
Hm, how does scoring for AOC work? Is it who gets it correct + who finishes first
ah, thanks!
hmm i could write a selenium that automates and send the answer to there, probably will be faster
but wouldnt be if the answer is wrong
I'm doing it in rust this year so haven't check it still works
@mossy basin I'm guessing it's still fine?
They haven't made any breaking changes to the site? π
just refined mine using asserts with long solution against reduced
i don't maintain it, starwort does, i think it's fine, i have a vendored version that i use that works
Ahhh cool
i just had to update my token is all
yeah, mine from last year still works as well
hmm that one looks good
Am i the only one that thought it was every time the depth increased from the last highest depth and not the last depth
I find that with AoC, your greatest enemy is usually your inability to read the problem description properly. π
what does the number before the star in the leaderboard represent
Right, theres quite a bit of filler text that the actual problem statement sometimes gets lost in it
Or rather an explanation of the story, not filler text
hey how u guys put that string into a list?
If you're the first person to solve a puzzle in a given private leaderboard, and there are n people in the leaderboard, you get n points.
If you're the second person to solve it, you get n - 1 points.
Is there are any good rust Aoc helper crate/script?
The number before the stars is the sum of points over all days and stars so far.
can others join aoc late?
Yes
ooo, so n will change
You can join at any time and you can continue solving puzzles indefinitely
You can solve puzzles from previous years as well
interesting
hello, can someone advice me how to upload photo using webdriver and selenium ? - i want to upload photo on facebook
Oh, yeah, it gets recalculated if people join or leave the board.
This is the discussion channel for Advent of Code 2021. If you have Python-related questions, you can ask them in #python-discussion or in your own help channel (see #βο½how-to-get-help). If you have a non-Python related question you can ask it in one of the off-topic channels.
!ot
Off-topic channels
There are three off-topic channels:
β’ #ot2-never-nesterβs-nightmare
β’ #ot1-perplexing-regexing
β’ #ot0-psvmβs-eternal-disapproval
Their names change randomly every 24 hours, but you can always find them under the OFF-TOPIC/GENERAL category in the channel list.
Please read our off-topic etiquette before participating in conversations.
The only complaint i have about AOC is that score is time based, which means that there are MUCH more beneficial timezones. For me (western europe) it releases at 6AM which is just a nop for me meaning my scores will probably be very low
it's 5am for chris lol
Difficult to implement a better solution that's guaranteed to be fair, though.
and me lmao
You can't really make the start time user-dependent.
u got a point
the only thing i could imagine is that it detects when you load the question page and times it based off that
But what if someone else loads the page for you
nah, cheaters...
Welcome to exploit city.
Then you just solve the puzzle and hammer through it
oh yeah cheaters
you make 2 accounts, solve with 1 then try to hand it in super speed with the second one
Yeah
no worries, time travel always works
I was trying to think of a better solution to the scoring as well, but i am not smart enough.
damn why didn't i think of that
Nobody is. If they were, we'd be using that system now.
But your island will grow weeds!
which island of mine?
i don't think there's an easy way to dewit
Never mind I assumed it was an animal crossing joke (because people do that frequently to access events they missed)
Hii
o/
hello
Hru guys??
Not bad
Gtk
like PEP 8 no longer exists
Nice
Well I have my exams day's Im really busy
ah good luck!
I bet you could get that down to one line each.
Thx
i'll show you in #advent-of-code-spoilers-archive see if you can compact it down
I saw it already
ah okay
I could get that down to a single line for both parts with no problem π
the only way i can see it going to a single line is by making your dataset inside your code
is there any way other than copying to take those numbers to my code
I'll tag you in the spoiler channel
just copy paste to a .txt file
if you select all and press ctrl c
i did that but i was wondering what professional coders would have done something like fetching it from web
ic
The input would be array of those numbers or just numbers?
yeah, you can automate and download the input
Simple webscraping
don't forget your authorization headers
cookies!
Yeah several of us do - salt wrote a tool for it two years ago I think, last year he and I rewrote it; we've pushed it to PyPI if you want to use it (aoc_helper) - he rewrote it again this year and vendored his new version in his aoc repo
So I was wondering that is their a time limit to solve the problems in aoc? Like do i need to solve the first problem before the 2nd problem comes out?
Nope
ofc salt-die did
Do it whenever
you can even do it years later (assuming the website still exists then). just if you want to be competitive, you should solve them asap
Hello, I'm trying out this question https://adventofcode.com/2015/day/5#part2
Here's what I wrote:
numNiceStrings = 0
with open('2015/Day 5/input.txt') as f:
strings = f.readlines()
for string in strings:
try:
for index in range(len(string)):
doubleLetter = string[index] + string[index + 1]
modifiedString = string[:index] + string[index + 2:]
if doubleLetter in modifiedString and string[index] == string[index + 2]:
numNiceStrings += 1
break
except:
pass
answer = numNiceStrings
print(answer)
Can anyone find out any errors in the code?
There's a competition to see who can solve them the fastest, but there's no upper time limit.
yup thanks
I got 20, which is incorrect.
If you need any help with setting it up just gimme an @
Can someone help, I can give the answer for part 1 or share the question if you want.
can i access questions of advent of code later?
Yes, you can access puzzles from all previous years
Yeah, I'm trying to solve a 2015 question, right now.
And I am not able to π
@bright spindle Can you help?
Nope, I'm working, sorry.
No Problem.
Hey, I needed some help.
o/
Nice
.
i hope you noticed there are 2 questions right?
not that you only did half
My code is [CODE REDACTED PER ANTI-CHEATING ACT OF 2021 C.E.]
That's not related to the library and I haven't done 2015
So, if I share you the question, can you tell if it's right?
my code
you're only looking at the same index for both rules. this basically means you only check for triple letter (double letter would be index and index+1, and spaced letter is string[index] == string[index + 2])
easy fix: keep two flags (booleans) and mark completion of the rule separately. then after the loop check if both are true
wait, no
... wtf I'm saying
I don't remember this task well
despite doing it a few days ago
no, I'm right, but not with triple letter, but close
you check for xyx with xy repeating in whole string
but those don't have to be the same
I'm doing this.
In the string, take out two consecutive strings.
Then remove it from the original string (modified string)
For example
original string = xyxy
modified string = xy
Now i'm checking if xy (the string I removed) is in modified string. If it is, then it accords to the condition.
with qjhvhtzxzqqjkmpb (nice) you'd check qj (true) with q-h equality (false) and qj (true) with q-k equality (false)
because you do both checks at the same index
but in here it's qj pair but zxz spaced letter
as I said, your problem is doing both checks at the same index. instead of doing them separately - one trait can be in any place of the string, the other trait in another
Ohhh I got your point..
.aoc join
how does answering work? this is my first time participating and i'm lost lol
you get your own input, and then you post your output (number) in the box on the website
nah, only answer. so you can do it in any language or even manually, as long as you get your answer
since you can use any programming language you wish, or you could even calculate by hand, it's very difficult to be able to grade the code
you need to code to get the output tho
pen, paper, small calculator and a LOT of patience...
Can you tell in #help-cheese ?
Yeah there are only 2000 numbers in the problem today, people have done worse puzzles with pen and paper
like trying to crack enigma
Most of the time. There are exceptions.
Is there any consequences to submitting wrong answers?
No, but iirc, there's a cooldown
So you have to wait a minute or so between attempts
Aight
i made a typo for question 2 and had to wait a minute before i could resubmit
.aoc join
it's not a minute forever, it grows
exponential backoff
hi



