25
Василий Чибиляев
Last seen 11 months ago
Member for 6 years, 10 months, 20 days
Difficulty Normal
feel free to contact me at chibiliaev23@gmail.com
Great! Though I would consider using list(i) instead of [j for j in i]. And you actually don't need both else statements in the last loop as np.rot90 should be done at each iteration.
More
Everything seems to be ok, though i prefer using for loop insted of while
wnenether it is possible
More
Very smart. This piece '(i.endswith(j) or j.endswith(i))' does make sense.
More
Nice and clean. Though I would recommend to replace array[len(array)-1] to array[-1]. Python allows you to use negative indexes to iterate backwards through array, so array[-1] gives you the last element in the array, array[-2] - second last element, ..., array[-len(array)] - the first one. Consider
More
Nice, pretty fast and out of the box approach. Well palyed. However I would consider changing this piece of code:
def expand_water(area, mapdata):
for p in area:
l = [q for q in adjacents(p, mapdata)
if is_water(q, mapdata) and q not in area]
area.extend(l)
I
More
one extra '+' which goes from my heart for the daft punk) oh, the code is awesome!!
More
Really great work! You can check out my solution if you want, it is pretty fast but not that complex. Unfortunately I have no opportunity to compare the speed of my code vs. yours, so if you don't mind please do this on your PC and share the results.
[My solution](https://py.checkio.org/mission/mak
More
if len(matr) == 2:
return matr[0][0] * matr[1][1] - matr[0][1] * matr[1][0]
these two lines are actually redundant. You can start right from: if len(matr)==1...
More
Well, that's pretty creative. You implemented for-else trick and that's great you know such things! Though I don't see big use of it, you get +1 for this. However there are some problems. First of all, your solution is not that flexible. Imagine the input is now 100*100 grid, how many time will it t
More