30
vinc
12 30 44
5010/ 5195
Last seen 2 years ago
Member for 9 years, 9 months, 26 days
Difficulty Normal
Best reviews / Newest reviews
SafeCoasts-bunnychai 1 1
Too many nested loops. Poor reading. Lines 32-33: for dx, dy in ((0, -1), (0, 1), (-1, 0), (1, 0)): px, py = x + dx, y + dy do it more clearly: for x, y in ((x, y-1), (x, y+1), (x-1, y), (x+1, y)): More
slice-gyahun_dash 1 1
sum(sum(r[cs]) for r in grid[rs]) More
First-bunnychai 1 1
def minimum(data): ms = list(set([x[0] for x in data])) check = [] for m in ms: if all(d.find(m) <= 0 for d in data): check.append(m) return min(check) I think here it will be a little bit shorter and clearer;)) I like your solution. More
ForgetfulPrisoner-bunnychai 1 1
Congratulations! Good job. I should explore this at leisure;) More
First-Sim0000 1
if all(color[i] != c for i in connect[n] if i < n): ^^^^^^^^ This is a smart way to get back to the original state. Nice! More
In search of Eulerian path (vinc's solution), discarding loops-flpo 1
Great! Discarding loops is very effective and sufficient for this kind of graphs. More
Two rules-nickie
if 0 <= field[i][j] < 9: I think there is no need to check empty cells: field[i][j] == 0. You waste your time;) They have never got 'unknown' surrounding cells. More
Snake. Second. A* search-vinc
Lines 36-37 must be: new_snake = (point,) + snake[:-1] if new_snake not in closed: More
Third. Flood-vinc
I forgot one line before a cycle, but it isn't critical. field[first[0]][first[1]] = -1 More
yield from-vinc
This is from Python Cookbook by David Beazley #4.14 More
Forgetful Prisoner-vinc
This is not a stable algorithm. Just one of the uses of "scanner memory card". More
Loading Cargo-vinc
one-string code will be long and unreadable: return min(abs(sum(data) - 2*sum(kit)) for kit in (kit for i in range(1, len(data)//2+2) for kit in combinations(data, i))) More
First - Boolean Algebra-AQiccl135 1
Read this comments: [http://www.checkio.org/mission/boolean-algebra/publications/theholy7/python-3/hard-way/#comments](http://www.checkio.org/mission/boolean-algebra/publications/theholy7/python-3/hard-way/#comments) More
UserDict-gyahun_dash 1
Nice usage of UserDict. Thanks for practice. More