Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Edsger Wybe Dijkstra would be proud solution in Clear category for Open Labyrinth by Vulwsztyn
def invmaze(m):
n=[]
for i in range(len(m)):
n.append([])
for j in range(len(m[i])):
if m[i][j]==0:
n[i].append(-1)
else:
n[i].append(-10)
return n
def markuj(m,i,j,k):
if i>0:
if m[i-1][j]==-1:
m[i-1][j]=1+k
if j>0:
if m[i][j-1]==-1:
m[i][j-1]=1+k
if i0):
dir=[['E',[0,-1]],['S',[-1,0]],['W',[0,1]],['N',[1,0]]]
for i in dir:
if row+i[1][0]>=0 and row+i[1][0]0 and col+i[1][1]
Nov. 28, 2016