27
pohmelie
10 32 41
4003/ 4195
Nikita Melentev
Last seen 7 months ago
Member for 10 years, 21 days
Difficulty Normal
Best reviews / Newest reviews
lambda-Kerulen 3 1
"exclusive": lambda x,y: (x or y) and not (x and y) It's just "exclusive": lambda x,y: x ^ y More
Random Solver-Sim0000 1 1
> Interestingly, size 6 case is better performance than size 4 Probably 6 case have relativly more solutions. Nice idea, but hard to understand realisation for me %) More
Friends-bunnychai 1
Heh, my solution have same idea, but with some extra additions: * When you write "a in self.connections[b]" with defaultdict you actually create an empty 'defaultcontainer' (set in this case) if there was no container for this key. So garbage will grow up. * Definetly better to call self.add in \_\_ More
date-acman
I don't get why it's faster than any other solution from uncategorized? More
Eigensolve-veky 1
What is the idea behind this? I'm pretty confused %) More
Assault of batteries-veky 1
Awesome solution! 👏 Funny, that python have this module at all. Sometimes I think that standard library was made as: — WOW, MAN, WE NEED THIS IN STDLIB RIGHT NOW! — YEAH, DUDE! But this can't be removed or refactored cause legacy. Since now only small part of stdlib is used as mainstream and eve More
Structured as search-russell.l.brand
Instead of "i_and_r" you can use real args: ``` def keep_rings(lower, individuals, rings): ... return max(keep_rings(*break_loop(True, individuals, rings)), keep_rings(*break_loop(False, individuals, rings))) ``` Also you can return results without parenthesis: ``` return i More
search with timeout :|-pohmelie
Based on idea that if a -> b (-> is gift direction) and this gift breaks the longest chain of chains, then we should check chain, which intersects with this chain. So, line 55 is this check. We take chain only if it intersect "base" chain (actually first random). The logic is if a -> b doesn't break More