#advent-of-code
1 messages ยท Page 8 of 1
lol
i don't get the algo here
when do you decide to build a lower level robot if there are higher levels of robots
when also to decide to build higher levels of robots
i think i'll let my current solution run and that might be part1 solved. i probably better figure out how to speed it up at least 10x for p2, though, whatever that is
prob something like "you have an elephant helper he can make a robot extra each day but it takes 4 mins to train him"
some of the blueprints are much cheaper to simulate then others
there's even a blueprint case for an ore-collecting robot; is that just ignored?
There is a difference between tedious and hard. I have no problem them giving hard problems
i guess cause you have the possibility of getting more ore / rotation
so like it snowballs
oh wait
that's actually
WAIT
it's like some sort of hard lookahead problem for me
huh, weird actually, why the hell does the test case never builds any orebots. is that truly optimal?
||we can calculate time to get next robot right?||
maybe just for this one
||sure, but is that truly a big speedup||
can we get like a channel to discuss this spoilering everything is getting annoying ๐
oh lmao
||Seems like dp+math, more than anything else||
^^
||i forgot to terminate once time reached 0 so it just kept going forever||
i just don't know the math ๐
imagine there's a theorm for this
people make idle game guides all the time how do they come up wtih the numbers
โซ||optimal point to build a level's thing to maximize the output of the last level||
someone wanna rephrase it for google searching
ever get temptation to ctrl+a, del
โซ||it's like that stock profit problem||
||ok question: will a greedy algo with lookaheads work if you try to get to the next level ASAP||
i just realized why my code wasn't working
i forgot that you could choose not to build a bot
do you have a solution other than just brute forcing with dp
good for you because i haven't realized anything
my code stopped working today
I really can't believe submissions of 16,17 and 18 are almost the same
18 was so much easier
welp
no
all i'm seeing is brute-force with dp
tessa is actually cracked wtf
which would be fine except there's a lot of permutations
i am getting this http error code 401
?
||import random
random.randn||
oh hey, rank89 on p1 lmao. just let my solution run for 13 minutes
im so tired lol
Wait, what did I do?
๐ ๐
they thought you solved it
๐ ๐
i might actually implement a genetic algo for this
Lmaooooo i didn't. I ain't doing it rn. Will do it in the evening. At work atm
oh! off by 1 error getting close
Also, don't want to ruin Monday morning with simulating shit
i might give up for now tbh
uhoh
oh wait you didn't
probably noulith cant do something lol
aaa
nvm
let's see if my naive dp solution will even work
jesus
the bigger they are...
best of luck?
u2
my dp solution just returned 0 ๐
i fucked something up
i'll figure it out tomorrow
my optimizations barely made my test 2x faster. this won't pass p2
it makes it much worse that i don't know how to do dp
basically just memoize some stuff
what's p2
||am I missing something or is dp just @lru_cache||
you can do that sure
pro
bro
p2 is easier no?
my parsing is horrible
ik i did that
and ill probably end up rewriting the whole thing later
now i don't know what else to do after
spoilers of p2: p2 is ||only the first 3 blueprints, but 32 mins|| ๐ฅด
he just like me fr
what time complexity is this jesus christ
that sounds painful
aaa I'm already slow on 24
uhoh
yeahhhhhhhhhhhhh!!!!
did you dp bruteforce
optimised p1!!! paid offf
or was there a smarter way?
i've been trying to figure out why my code is giving the wrong answer for like 40 minutes
it should work
theoretically
it finds the right path and gives the right answer for blueprint 1
pls hint my brain frazzled ๐ฅบ
Is using frozen dataclasses to hold my state really going to slow my program down due to long initialization?
208 / 98 ๐
woops, didn't mean that as a reply
it probably won't make a big difference
why not use a named tuple though
day 19 going well
neither are very familiar to me, looked at the syntax for dataclasses more recently.
doesn't matter then
i'm just gonna do this by finding the level that's the cheapest to get so far other than ore
i'd be surprised if it made a significant difference
finally
My problem is taking so long, I have no idea if it is ever correct in the first place... and now I'm adding a bunch of optimizations which, hopefully shouldn't change the answer, but who knows.
My problem is taking so long, I have no idea if it is ever correct in the first place
Probably not, you're probably having the same problem as me
Important observation that isn't obvious: ||you have to calculate your robot costs before you get your resources for the minute, not after||
isn't that a bit obvi if you're looking at the example?
yes but that doesn't help if you accidentally skip over it
There is 0 chance this lasts but ๐ #1 on pydis
your hours are limited
I finally took down Oliver Ni lmao
#2!!
Thanks for the tip, but I think mine should be doing that right at least. My day 16 took 4.5 hours to run, which was longer than most I think. I think I must just be doing dp worse than other people, idk. Which is really odd since I have so much projecteuler experience, which I usually consider to be a lot more demanding than AOC.
Oh lord lmao
took 13 mins for p1
If you want to check in the spoiler channel I posted how I'm initialising my DP table
My code runs in <1s FYI
i just finished p1 so
oh that lb doesn't even have my p1 on it
rip
takes while to update
this problem sucks
slow down, just let 200 more people finish first
i spent forever trying to optimize it and then i just let it run and it finished in like a minute
what else is new
Lmao
bro my robot count is the thing screwing me up rn wtf
@raven wave check this
That's what tripped me up
๐ญ I got wrong answer after brute forcing for 12 mins haha
Riiip
I hate pt 2
P2 is literally just p1 but longer, it runs in like the same amount of time for me
funnily enough thats not whats tripping me up
dont even know what it is rn tbh
is this a graph states problem or smth?
That's pretty much what I did yeah
damn your dp is way better than mine
it's literally the exact same problem as 3 days ago
but it just takes longer to run
is was
This problem was faster for me
ยฏ_(ใ)_/ยฏ
how did you decrease when you didnt use any resources
What LMAO
Did you accidentally mutate a shared object?
nope
really
wait maybe i did
i couldnt have cause the value for clay is still intact
but its like ore decided to reset to def
i envy you but congrats
oh well ill optimize it a bit and push it
About 0.64s, including redoing all the work I did in p1 for p2
how is yours so fast
speed
import speed
(jk)
Dunno, how's yours so slow? ๐
Apparently it's WA for cereal's input though so ยฏ_(ใ)_/ยฏ
LMAO
using dicts may have been an idea not good
LMAO
it works for mine
I'll let you know when it finishes ๐
It's 2/3 of the way through
1m40, worse than I remember
Wait it was the Rust one that was <5s and that one gave WA lol
I should sleep lol, exam later
gl
though I'll be honest I'm more worried about the questions being wrong than me getting the answer wrong lol
This is one of the questions on one of the prep quizzes we had, for reference
(the best part about this is that this is after I was given the explicit direction to stop telling people about padding)
finally have something that i think will work
and is running...
i dont fundamentally understand how it can take so long, theoretically a greedy algo makes sense
wait no even the example isnt greedy
Greedy algo is obviously correct for geodes (that's the primary optimisation goal, after all) - but I think it isn't generally correct for any other machine
Take this example: ||Ore robot: 10 ore, clay robot: 11 ore, obsidian robot: 12 ore + 1 clay, geode robot: 13 ore + 1 obsidian||
A greedy approach will obviously get the wrong answer
yeah
idk if im sounding dumb but what if it was in reverse
so it considers the most expensive robot first
wait no
Does it specify anywhere that you can't build several robots in one turn? Or is that just supposed to be assumed?
well apparently it doesn't work for the test if u let it be multiple per turn
i guess u kinda infer from "robot factory from your pack"
The elves: Hmm am I forgetting something
You:
It tells you that it takes you a minute to build a robot, I'd infer that to mean 2 minutes for two robots i.e. only one per turn
It says you only have 1 robot factory and it takes 1 minute for it to build a robot.
Does anyone know what the person that created the last few puzzles smoked and where i can get 10 of that?
Holy f the difficulty spike since last year is immense
Last year the last weekend was pain but this year it's since day 16 (except cube task)
day 19 and 16 were basically the same tedious task
day 17 just needed a weird trick to solve
day 18 was easy
idk about weird trick for 17
it's more of a "if this doesn't repeat I'm totally screwed"
that is basically the trick
||you just look for cycles||
Is this correct for day 1:
list_of_elves = """1000
2000
3000
4000
5000
6000
7000
8000
9000
10000"""
def find_max():
_item = ''
_list = []
_group_list = []
for x in list_of_elves:
if x != '\n':
_item += x
else:
_list += [_item]
_item = ''
sum = 0
for x in _list:
if x != '':
sum += int(x)
else:
_group_list += [sum]
sum = 0
return max(_group_list)
print(find_max())```
Correct in what sense? You can check the answer by submitting it on the calendar page.
I realise that now.
It is very much 'correct'.
It is quite verbose though. ||Youll want to read the input in as a text file rather than pasting the string into your code and to find the max you can use sum on a list. ||
storing it as a string is totally fine
no it isn't
all is well & good before you have to scroll down 1000 lines to get to your actual code
page down
that only took me down 20 lines
and pressing the end key in vsc
doesn't seem to do anything

the dropoff is real
(i'm guilty of it too :P)
godspeed you people still managing to complete these daily
same
but i got first message in posts of day 19, 17, and 16 iirc
i just don't have the time 
Same :(
Slowly making progress but can safely say that AoC has been kicking my ass, but at the same time has taught me a ton
yeah don't have the time to finish day 19 pt 2
guess I'll do it tonight
hope day 20 isn't painful?
have not because i travelled yesterday and today i kill my arch installation
so 18 and 19 are untouched for me :D
do it
Honestly AoC on a ski lift would totally count for an Upping the Ante post lol
Yes
missed opportunity to continue the plot to 0 messages on day 20
why'd day 3 have a giant jump .-.
I think day 3 might be when we started the golf effort
Good luck everyone, 15 seconds left!
<@&518565788744024082> Good morning! Day 20 is ready to be attempted. View it online now at https://adventofcode.com/2022/day/20. Good luck!
it works without
yeah i threw hard on those
I also did
i don't understand what's wrong with my code lmao i need help
^
ik
I have two 2 d arrays of shapes (100000, 4) and (90000, 4) . How to which indices are the same in both the arrays ?
that's why i ||created a list of indexes||
what
o wait
||I defined a __eq__ method on my class so I could use .index() to find 0 but then I realized duplicates could happen and stored the instance if the value was 0 but forgot to delete __eq__ and lost a minute to that||
bro the
nvm it doesn't work
i am reading diff
yeah there's something else broken
my code works on example
and your next line will be, "doesn't work on actual"
yeah
Best I've ever done on a problem in the 3 years I've been doing these
god I was so slow at part 1, had to debug a bunch
same lmao
i have no clue how i should debug mine lol
Its so tough when it works on the example
16:49 -> 18:14
modifying for part 2 was trivial the way I implemented it, thankfully
Same here
finally ๐
skill issue xd
jk i kinda got skill issued today
there were ||no dupes in the sample so i just ruled that out in my head as a possibility||
damn
i just assumed there'd be dupes ๐คทโโ๏ธ
i just can't get my wrapping code to work
๐
bruh why does everyone have so many points ๐ญ
mine is 24
kms on wrapping code
mine is 1
I have to say
being on a ski lift makes for a really good visualization of today
at least for pt 1
can't you just use ||a visited array?||
I'll do the question once I'm free today
[HELP]
Hello, I am learning python now.
I've built a very simple python backend for test but it occurs CORS POLICY ERROR.
for python developer, it's very simple and basic problem but for me it's very difficult.
How can I solve this problem? Please help me.
this is my simple backend.
from simple_http_server import route, server
@sullen dragon("/isvalid", method=["GET"])
def index(email, password):
return {"res": "hello world!"}
server.start(port=9090)
which code should I add?
Please help me.
import tkinter as tk
import time
class Timer:
def init(self, parent):
self.parent = parent
# Erstelle Eingabefelder fรผr Stunden, Minuten und Sekunden
self.hours_var = tk.IntVar()
self.minutes_var = tk.IntVar()
self.seconds_var = tk.IntVar()
tk.Label(self.parent, text="Stunden:").grid(row=0, column=0)
tk.Entry(self.parent, textvariable=self.hours_var).grid(row=0, column=1)
tk.Label(self.parent, text="Minuten:").grid(row=1, column=0)
tk.Entry(self.parent, textvariable=self.minutes_var).grid(row=1, column=1)
tk.Label(self.parent, text="Sekunden:").grid(row=2, column=0)
tk.Entry(self.parent, textvariable=self.seconds_var).grid(row=2, column=1)
# Erstelle Start- und Stopp-Schaltflรคchen
self.start_button = tk.Button(self.parent, text="Start", command=self.start)
self.stop_button = tk.Button(self.parent, text="Stopp", command=self.stop, state=tk.DISABLED)
self.start_button.grid(row=3, column=0)
self.stop_button.grid(row=3, column=1)
# Erstelle Fortschrittsleiste
self.progress = tk.Scale(self.parent, from_=0, to=100, orient=tk.HORIZONTAL, state=tk.DISABLED)
self.progress.grid(row=4, column=0, columnspan=2)
# Erstelle Indikator fรผr verbleibende Zeit
self.remaining_var = tk.StringVar()
tk.Label(self.parent, textvariable=self.remaining_var).grid(row=5, column=0, columnspan=2)
def start(self):
then all the time IndentationError: unexpected indent
what is wrong dont find out help ๐
do any of you people read the previous messages
Traceback (most recent call last):
File "C:\Users\user\Downloads\Outlook_Gen\Outlook Gen\Outlook gen\Gen.py", line 86, in <module>
create()
File "C:\Users\user\Downloads\Outlook_Gen\Outlook Gen\Outlook gen\Gen.py", line 45, in create
signupmoment.click()
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webelement.py", line 93, in click
self._execute(Command.CLICK_ELEMENT)
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webelement.py", line 410, in _execute
return self._parent.execute(command, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 444, in execute
self.error_handler.check_response(response)
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 249, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable
(Session info: chrome=108.0.5359.125)
Stacktrace:
Backtrace:
(No symbol) [0x00F2F243]
(No symbol) [0x00EB7FD1]
(No symbol) [0x00DACF10]
(No symbol) [0x00DDD003]
(No symbol) [0x00DD32A6]
(No symbol) [0x00DF858C]
(No symbol) [0x00DD2BFF]
(No symbol) [0x00DF8804]
(No symbol) [0x00E0C9EB]
(No symbol) [0x00DF8386]
(No symbol) [0x00DD163C]
(No symbol) [0x00DD269D]
GetHandleVerifier [0x011C9A22+2655074]
GetHandleVerifier [0x011BCA24+2601828]
GetHandleVerifier [0x00FD8C0A+619850]
GetHandleVerifier [0x00FD7830+614768]
(No symbol) [0x00EC05FC]
(No symbol) [0x00EC5968]
(No symbol) [0x00EC5A55]

help me pls
posting it here won't help you because this is AoC chat not general python help chat
guys can someone help me with my project
@boreal pivot please describe the problem.
Sorry - I only stick to the main channels.
If you can't describe it, then a VC won't help.
do you made a platformer game befor?
wtf, read a few god damn messages and realize this is not some random help channel...
did someone go "hey guys it'd be really funny if you asked for help in AoC instead of a help channel" today
hey guys i've made a new programming language called floatcode, and i need help...
at least you have a private leaderboard
and 2nd place cheated :/
cheated?
same
from day 7 onwards they had a 10 second delay for p2
i mean how would you cheat in aoc?
use somebody elses code
they didnt do it at like release time but like 5 hrs afterwards theyd use someone elses code
that doesn't hurt anyone except themselves
yh but its school lb and the owner of it said all solutions must be your own...
oh lol
i mean it doesnt affect me at all
a fellow hs kid i see
yh last year then off to uni
hs gang?
bro college apps are kicking my tail so hard
i wish people at my school would do aoc
there's only like a small subset that do programming and an even smaller subset that likes to do stuff like this
there's like 10 people that might apply in my entire year lmao
apply cs or apply to college
im from England so have no idea what they are lol
cs
From context I think it's 'applications'
Is there like a LB for everyone who scored points this year?
or do i need to make one if i want to see it?
what do yall do in england??
like the AP test or whatever you have lol
We write a Personal Statement talking about how much we love our subject and what weve done. Then some Universities require entrance exams and some require interviews aswell. But most only look at that Statement and the grades you are predicted to get at the end of the year
so just grades, test scores, and one essay???
(places that care about entrance exams are usually prestigious places like Oxford or Cambridge)
basically, but not an essay just talking about our passion for our study. 4000 characters
you talk about that in your personal statement
i would send you mine, but if it ends up online then it gets marked as plagerism and unis wont take u basically
ok, but that sounds...so simple
us unis want your life story in that personal statement
yeah UK unis really only care about studies and stuff
and Cambridge and Oxford dont care at all for extracurriculars
damn
where are you applying?
too many
how many can you apply to?
i am so many days behind
cause of exams
and I have finals the entire month of jan
i will most likely be able to continue only after jan
20 on commonapp
https://github.com/SaiMonYo/Global-Leaderboard-AOC global leaderboard (anyone who has points) here for anyone who wants to see where they are
519th whoo
same
A new kind of computer architecture that's more elegant than 1s and 0s, being based directly on Mathematics.
Note: Everything in here is real (IEEE-754), but the target is computer scientists and the troll level is set to ULTRA.
Source code and stuff (well, soon): http://tom7.org/nand/
&aoc c
Day 21 starts <t:1671598800:R>.
hypeeeeee
oooohhhh
how do you still have so much hype
i just want this to be over lol
ever since we got to the volano
boundless optimism
*volclano
๐ง
things have been going downhill
Good luck everyone
GLHF
This channel was so active just a week ago
where is everyone now
that's hurtful
you're my second fav <3
<@&518565788744024082> Good morning! Day 21 is ready to be attempted. View it online now at https://adventofcode.com/2022/day/21. Good luck!
is it really only 5 days left!
... How is it day 21?
|| Seems like this is directly eval-able perhaps? ||
|| i tried python had error cant fix it so changed method ||
Seems like a skill issue
true
Currently driving to work ๐ will do it once I get time
uhoh number 2
||Dang, are there 100 trillion monkeys now?||
wtf is part 2?
Idk, what is it? ๐จ
today was easy too ugh
oh i get it
i threw so hard
part 2 is pretty easy
||I think I'll learn sympy today finally||
That is how I did part 2. Used it before, but not well enough not to need to google all the syntax I needed
||Dont scare me like that lol. I thought like a trillion monkeys were attacking the elephants||
||sympy isn't downloading for me||
guess you aren't || symp-ing ||enough for it kekw
๐
i accidently installed ||simpy instead of sympy||
wtf pro
did which part
p2
just some quick stack overflow for ||sympy||
I said my goal for this season was to get on the leaderboard for 3 parts (last year and the year before I nailed 2 parts each year). Most of my scores have been in the 500-900 range this year, and hadn't made any leaderboards in the first 19 days, but I managed to crush the last two days!
helll yeah bro
Nicely done
Can someone send me the lb code?
avon crushing it
I definitely used to be better at aoc than I am now - I've only got 6 lb spots so far this year and they're all pretty bad; compare that to e.g. 2019 (second img)
or ppl using chatgpt to cheat on lbs
๐คทโโ๏ธ
.aoc join
Was that enough to get you in the top 100 overall for the season?
That too
Yeah, 78th global IIRC
- whatever that sponsor incident was
wtf pro
(apparently they did it again lol)
lmfao
not displayed
bot prefix is &
and the cmd doesn't work
&aoc join
Feels wrong
That's right
We have several leaderboards because of our size
There's like 10 leaderboards that all get merged into the one shown by the bot

I'm in 2 of them because 2019 -> 2020 something got messed up lol
i'm not the only one noticing lol
back in 2019 you were #1 on lb
doesn't give me double points though :(
i still have a random leaderboard i have 0 clue
here
Yeah, I won a T-shirt for it lol
This year, I'm using a programming setup I'm specifically trying to get better at. I'm using my custom 36 key keyboard I built and a neovim setup I've been working on. So on one hand, I'm still getting used to those, but on the other hand, its probably not going to slow me down any more than just doing it in jupyter like I did in previous years.
can i see what it looks like?
Honestly I have no idea where it is right now and it's 5:40 in the morning so I can't be bothered to go find it
oh lol
It's basically just the pydis logo with 'stupidsexyflanders.com' written in binary-encoded ASCII in the middle of it for some reason
Where are you in this years pydis leaderboard? I don't see Oo31 in there.
not for long
Lmao
it's like basically oliver and zeyu competing for first and second and oo for third .-.
i think he just has faster overall solve times
It looks like I'm 6th now, but I wouldn't be surprised if there is a person or two that'll push me down once they complete part 2 today
yeah, it's still p weird tho
I was 1st for all of about 10 minutes ๐
haha, nice!
I'm actually only 3 points behind Oliver so if he gets stuck for a while on a puzzle that I don't it could actually happen
Lmao
something's wrong
That was probably for a full 30 minutes though, since the bot doesn't refresh any more frequently than that
I mean that's true I did trigger that refresh
But I think in terms of time I was actually first it was about 10 minutes lol
Where did you find that? I remember finding some kind of combined board but I've lost the website lol
i created my own lol
i remember that site but couldnt find it so i just created the worst looking parser known to man
kekw
Very cool, thanks! It seems to be associating two different random people's GitHub accounts with my name ("Edward Keyes") for some reason, though.
found the issue, you placed 100th on p2 on one day. The way AOC writes the html p2 100th and p1 1st are on same line so it parsed their github link
Hahaha, nice debugging!
I had a hunch what it was the main debugging was finding what year you got top 100 lol
lots of crtl+f ing
for p1, ||not getting any error but it's stuck on computation since eternity||
can anyone help?
||-( instead of =(||?
||equations expects expr=0 i.e. only the left side of the expression. which is why I did it that way||
still doesn't work. I'm baffled. ||I checked for like a sample set of equations in the same format
import sympy as sy
x= sy.symbols('aaaa,simp,cccc,dddd')
equations = ['aaaa-(simp-8)','aaaa-(root-15)','root-(cccc-20)','dddd-(cccc+50)']
sy.solve(equations,x)
AND THIS WORKS. LIKE WTH||
Something silly like ||you happen to have a variable called simp||?
Wait this was 2 and a half hours ago kekw
โซwhich day of the last 5 days was the easiest
yesterday was really easy
I'd probably order last 5 days from easiest to hardest
list value moving (day 20)
cubes (day 18)
monkey math except they yell instead of throw (day 21)
robot assembly line (day 19)
tetris (day 17)
I'm currently working on Day 13, and am a little stuck. My unittest with the example works fine, but the result for the real input seems to be wrong.
For the example I'm wondering, what is the deciding factor for the following pair?
|| [[[]]]
[[]] ||
Is it ||right ran out of items||?
||yes, it goes down to comparing [[]] vs [] at which point the second is considered smaller because it runs out of items first||
Good. I also think I found my mistake. I am overwriting a previously made decision
Yes, Day 13 done... finally some progress again
20, 21, 17, 18, 19 imo
honestly after doing 21 i'd probably switch 18 and 21
if we extended to 6 days day 16 is defo at the back
very far back
bro what day 19 was the hardest lol
agreed
Doing day20 part1, and I'm having trouble. I get expected behaviour with test inputs, but not with actual inputs. I think my problem is ||dealing with values where abs(item) > length - it's throwing my calculations off||.
I think it'd help if I could have some sample data that has some such behaviour, and what the result at each step should be.
Actually, could someone give me the result of each step for the following test data (7 items which aren't part of my inputs), because I think that'd help me figure out how things should behave:
||8, 8, -11, 3, -9, 0, 12|| (edit: or maybe ||8, 7, -11, 3, -7, 0, 12|| )
||
[7, -11, 8, 3, -7, 0, 12]
[-11, 7, 8, 3, -7, 0, 12]
[7, -11, 8, 3, -7, 0, 12]
[3, 7, -11, 8, -7, 0, 12]
[3, 7, -11, -7, 8, 0, 12]
[3, 7, -11, -7, 8, 0, 12]
[3, 7, -11, -7, 8, 0, 12]
||
I might know your problem if you want a hint
That... might be helpful yeah. I changed my program in a way that gets the output you stated, but results in an answer for the actual input that is incorrect (If I recall, it's an answer I've previously submitted and AoC said it was wrong).
How are you implementing the mixing for the numbers? Are you like swapping N times or what?
In Rust (reimplementing in python to see if somehow that chanfes things because I'm desparate and it's easier to communicate on this server) I'm using ||collections::VecDeque|| which is equivalent to python's ||collections.deque||.
For each item, ||find index, then rotate_left index steps (python deque.rotate(index*-1) I think. Then I have two implementations. With one I pop_front (popleft), rotate k steps, then push_front / appendleft. k is abs(n) % (len old xs or len new xs). With the other implementration, I replace the value with None, then do the rotate, then push, then remove the None. First implentation works on sample input but feels buggy, second inplementation doesn't work||
ok this part ||abs(n) % (len old xs or len new xs)|| . Make sure ||the "length" is length after removing the item||
||> I replace the value with None, then do the rotate, then push, then remove the None||
Yeah i think this causes the same problem
Done, still getting wrong answer. Retrying in python now. Thanks for the help either way. (edit: a wrong answer, I've gotten multiple wrong ones)
nah it's more like
cubes
monkey math
tetris
list value
robot assembly
Reimplemented in python, getting same incorrect result. At this point I think I'm just going to give up and move to day21 for now.
I don't know that the tetris one is 'hard' its more that I just cba with all the boilerplate. But I also havent done it becasue I thought "cba with that" so maybe im missing the nuance of it!
I found it personally difficult because I didn't know how to ||do cycle detection||
at least for robot assembly I knew how to ||dfs from day 16||
See I havent done 16 or the robot one because ||dfs is new to me and im not 100% on writing somethign that complex yet.||
How would you apply ||dfs to day16 though? Since i think it matters in which order you trigger the valves||
Unless Iโm mixing up ||bfs and dfs||
where do I find the challenges?
||dfs to search the state tree not the actual graph itself||
||dfs was new to me as well but it's really just bfs but recursive so I picked it up pretty quick||
how is list harder than monkey math
yeah that's what I thought
list was really easy
monkey math is also pretty easy but not as easy
cubes was slightly above trivial
monkey math was so easy
the ||wrapping code took me like an hour to fix||
cubes was so trivial
i am not allowed to call that a skill issue
but i must say that is indeed an interesting allocation of time
sooner or later kat will mute me for the stuff i say 
I don't have such restrictions
skill issue

:(
yeah list is most trivial

just messed up on ||sympy installing|| ๐
imagine using ||sympy||
trivial even without ||sympy||
^
just use ||complex numbers||
ยฏ_(ใ)_/ยฏ
really any ||vector isomorphic to R2 would work||
one of those is just so much more convenient than others though
๐
regardless they were basically all trivial
yeah
except like robot
robot and tetris were kinda difficult
tetris just needed a trick
easier than day 16 tho
nah tetris was fine
but it was self obvious what the trick was
didn't you guys cheese it by ||guessing the cycle was just one cycle of the moves||
||i didn't detect any cycles in the actual jet streams itself, so it would've been a multiple of the length of the jet movements||
sevoi metagaming
||everyone else had cycles of like 5k length so idk what u did||
||5k? wasn't it shorter than that?||
||they were in the 2k range I think||
looked at the golf ๐ญ
that's how many moves there were
i see a modulo so it has to be length
the golfs make some assumptions
golfs just have to work on all aoc inputs
about the input
meh
like for yesterday we assume that no monkey had ro__ as their name, and that humn came before root
i have some mixed feelings abt that
we just look at the 6-7 inputs we have and if something is true in all of them, we just assume that it's true for all inputs
common sense applies though
like obviously we aren't just building a dict that maps inputs directly to outputs
another one I remember is day 13
we assume the numbers are from 0 to 10 and that the max nest length is less than 5
lmao
yeah
it might be interesting to see how much it'd add if you didn't assume anything about the input than what was directly stated
day 13 was the other list one, right?
yes
a
a lot ๐
that one was much harder than the recent list one
like the filesystem one
filesystem was trivial
but it would be much longer if ||input wasn't dfs||
it'd break entire solutions
for certain ones
for others it'd just add extra chars
yeah
i.e.?
day 13
ic
you need empty lists to be negative numbers
but they need to be comparable to each other along their absolute values
so I did nest level-5
if it's greater than 5 it breaks the code
you could do like 99 but it'd break for nest lengths of 100
you'd have to add an entire function to find the max nest length if you wanted to salvage it
day 21 also breaks without certain assumptions
for instance, we assume that ||part 2 is linear||
yeah
finally caught up, had too much to do last couple of days!
i haven't even began to catch up yet lol
||tbf a lot of normal solutions assume that as well||
||why don't you just subtract one from the other and then just do math on that||
welcome back to the land of the living
visualizations ใฉใ?
||that's what we do tho||
oh
||wait oh u mean if there was like root^2 or smth||
||1j * 1j = -1, which would mean that there could be no imaginary part||
||no we mean like if we had (humn related thing)*(humn related thing)||
||without the imag part, we cannot solve for the unknown, because it just disappears||
||normally it would be quadratic but the x^2 term would be lost||
ic
whoever came up with that idea should get a raise frfr
||since any vector isomorphic to R2 works, we don't need the bilinear product that comes with complex, but that also means that we don't have a proper operation for (humn thing)*(humn thing)||
they can get a 25% raise
from 0 to 0
||ok but what if there were multiple monkeys that required the humn node||
and it wasn't linear
||as long as it's linear, we're all good||
ok but this was one of the assumptions
without that it just breaks
how would you solve it if it wasn't though
multiple roots though?
pretty sure it's guaranteed to converge on one of them
if it's implemented correctly
how'd it be implemneted?
if it wasn't ||linear||, I probably would've just used my ||rational function class and made a rational function out of the thing, and then found the root||
idk yet
||golf would be difficult tho||
yeah classes are too big for golf
unforunate ๐
||if it wasn't linear it'd be a pain for the input creators as well since they have to guarantee a unique solution or do something else||
if you had asymptotes tho
would be quite annoying to deal with
||they say just to multiple them all together and use that number ez||
division
||if it was strictly polynomial this would be iffy||
||since if some of the roots have multiplicity > 1 you wouldn't be able to just vieta the answer straight up, so some inputs would be unfair||
||unless all of them had >single roots||
||but if it's rational I think that works out||
&aoc countdown
Day 22 starts <t:1671685200:R>.
Nearly overslept, caught COVID from my exam on Monday... This is gonna be interesting
GL everyone
glgl
ok T-60
where's dennis (2) ๐
I got covid last week
and I made it to global leaderboards on the same day
damn
Lmao nice
is that a sign
T-35
ยฏ_(ใ)_/ยฏ
3 minuts
<@&518565788744024082> Good morning! Day 22 is ready to be attempted. View it online now at https://adventofcode.com/2022/day/22. Good luck!
wth
Oh no
wtf
ew
Wrong channel
may i know which channel i need to go?
#โ๏ฝhow-to-get-help will explain how to ask questions here, best of luck!
alr thanks
p1
i'm still figuring out how to wrap
what is this p2
oh my fucking god, the part2
ikr
i did not sign up for topology
wtf topology?
i'm not even done with p1
||its a net of a cube||
yeah
are you fucking kidding me
yeah i realized 
they didn't pad the input file
so?
BRO WTF IS P2
ikr lmao
THIS IS JUST IMPLEMENTATION HELL
i had working code except this when there were 2 people on the global leaderboard
just ||store it in a dict||
just for this day
it's easy to solve the bug i'm just annoyed that they aren't at least a bit consistent with their inputs
isn't this entire thing made by one person lol
i mean even so idgi
in a way that even makes it easier to be consistent because you don't have people with differing thoughts
ok i don't mean to disrespect their time and effort i'm just miffed
try tracing the position, for me it wasn't too hard to debug
did you check ||if the teleport position is a wall?||
||basically just went in the direction opposite of the way we're heading until we hit empty space, then checked to see if that was a ".", and if so move there||
i am not looking forward to implementing this part2 ๐ฉ
same
nvm my thing is balding
lol
I hate this
like, I can ||hardcode the mapping between faces||, but then ||I'd also have to note that, say, going upwards on face 1 gets you on face2 in a flipped location - left side of top edge of face 1 is connected to right side of top edge of face 2||
5 minute cooldown โน๏ธ
ok I give up, I'll try again later
Lady and Gentemen, If you find the input format shitty, say I
I
I
MrPhlip is a god
I
maybe they've a library
i hate this
The board may be wrapping around, but I am still not able to wrap my head around this question ๐
lol??
Don't share a picture of your wood in the morning: ๐
this isn't a question tho
your next line will be "a cliff"
so uh
by the responses of people here can I assume part 2 is something ||about folding the net into a cube||
bro i've done this type of thing before
it took like 2 hours
what dunder method for class[a]
getitem
ty
my code doesn't work wth
oh shit mine very nearly works
ETS GOOO
IM DONE
HAHHAHAHA
i'm laughign so hard
my solution is the worst solution you could possibly imagine
i don't think it even works on all inputs
what does it do
coord bash
that's it i'm putting out the big debug thingy
i decided to debug with https://github.com/thatbirdguythatuknownot/sniplections/blob/main/string_assign.py
will post code when leaderboard fills up more
holy crap im thankful for my friend sending me p2 while im on cooldown
5 mins realistically won't make a big lb diff
actually jk
if i finished 5 mins faster i'd have jumped 20 places up
it was 5 mins twice lol

