GG!! You really kicked into high gear these last few days. Excited to see those videos! I wonder how much working on them in Korean time helps. I've been doing them first thing in the mornings but stayed up till midnight to do day 23 and that was rough -- definitely not operating at 100%!
Nice dude! By no means I could beat your time. But I still think I solved it "better" in some way=). What I did is I simply visualized the graph. And all 3 connections are clearly visible by naked eye. Then manually remove them from the input and count nodes in two completely separate clusters. I do acknowledge it's a hacky way to solve the challenge but no more than using a library.
nice, congrats to 4th! if Jonathan would 10 sec faster, I think he would pass you but anyway, I like how you interactively get the answer ;-) this code should do it automagically (nx ;-) no random points are necessary G = nx.Graph() for line in lines: name, right = line.strip().split(":") components = right.split() for c in components: G.add_edge(c, name) edges_to_remove = nx.minimum_edge_cut(G) G.remove_edges_from(edges_to_remove) groups = list(nx.connected_components(G)) assert len(groups) == 2 g1 = len(groups[0]) g2 = len(groups[1]) res = g1 * g2 return res
Impressive! Congratulations.
Thanks man for all your effort and sharing this. Happy new year (^_^)
Congrats!! Amazing performance, every time I solved a day I came back to your video to see your solve😄 Thanks for making these
Congratulations! 4th is insane!
Congratulations 🎉
GG!! You really kicked into high gear these last few days. Excited to see those videos!
I wonder how much working on them in Korean time helps. I've been doing them first thing in the mornings but stayed up till midnight to do day 23 and that was rough -- definitely not operating at 100%!
Hello @Neil, any chance you release the videos for the 2023 days missing so far? I really like your live videos of AoC, very impressive performance!
Congratz :)
Yay big W on 4th place man
Congratz!
well done!! 🎉
Nice dude! By no means I could beat your time. But I still think I solved it "better" in some way=). What I did is I simply visualized the graph. And all 3 connections are clearly visible by naked eye. Then manually remove them from the input and count nodes in two completely separate clusters.
I do acknowledge it's a hacky way to solve the challenge but no more than using a library.
Hoq did you make the interpreter auto open when you had a runtime error?
IDEK what's even happening, I made it to only day 7😭😭 but congrats
Windows bot
what place did you finish in? :)
@c1s3lk4r I don't enjoy programming anymore, so why would I subject myself to that?
I've made my money and retired
nice, congrats to 4th!
if Jonathan would 10 sec faster, I think he would pass you
but anyway, I like how you interactively get the answer ;-)
this code should do it automagically (nx ;-)
no random points are necessary
G = nx.Graph()
for line in lines:
name, right = line.strip().split(":")
components = right.split()
for c in components:
G.add_edge(c, name)
edges_to_remove = nx.minimum_edge_cut(G)
G.remove_edges_from(edges_to_remove)
groups = list(nx.connected_components(G))
assert len(groups) == 2
g1 = len(groups[0])
g2 = len(groups[1])
res = g1 * g2
return res