15
Last seen 5 months ago
Member for 11 years, 6 months, 10 days
Difficulty Normal
I understand your code, as f is the already visited list, and d the list of friends extended each time, but ... what's the idea with sum ??
More
thx god for u, we don't have 2000 ways to encrypt data ;-)
More
Good one.
Is there a way to left function sooner than testing all rectangles ? from biggest rectangles to smallest ?
More
Thanks for your comments. do u have any suggestion for the 2 lists ?
=> grid[x][y] for x,y in product(xrange(row-1, row+2),xrange(col-1, col+2))
it's less readable i think.
I agree with line 8
isInRow = lambda x: 0 <= x < SIZE_X
isInCol = lambda y: 0 <= y < SIZE_Y
sum([ grid[x][y] for x,y in prod
More
I have pretty same solution using product to scan the product [row-1, row, row+1],[col-1, col, col+1]
More
same level , same ideas ? yes ! it looks like a graph pb not a set pb. I used a defaultdict(dict) to save a directed edge.
More