12a
This commit is contained in:
parent
4f973442e4
commit
202b162b63
|
@ -21,7 +21,7 @@ s = np.empty((h, w))
|
|||
s.fill(h*w) # enough
|
||||
tovisit = deque([S])
|
||||
def visits(y, x):
|
||||
return [(y+u-1, x+v-1) for u in range(3) for v in range(3)
|
||||
return [(y+u-1, x+v-1) for (u, v) in [(2, 1), (0, 1), (1, 2), (1, 0)]
|
||||
if y+u-1 >= 0 and y+u-1 < h and x+v-1 >= 0 and x+v-1 < w
|
||||
and goto[u][v][y,x]]
|
||||
#ic(a)
|
||||
|
|
Loading…
Reference in New Issue