Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
kamyu104 committed Dec 17, 2023
1 parent 63f75a8 commit bbe1c30
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Final Round/programming_paths_part_1_2.py3
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ def check(G, K):
assert(A == K)

def generate(K):
def fill(_, cnt):
assert(d[0] < len(DEPTHS) and len(DEPTHS[d[0]]) >= cnt)
def fill(D, cnt):
assert(d[0] < len(DEPTHS) and d[0]%2 == D and len(DEPTHS[d[0]]) >= cnt)
for r, c in DEPTHS[d[0]][:cnt]:
result[r][c] = '*'
d[0] += 1
Expand All @@ -90,7 +90,6 @@ def generate(K):
def iter_dfs(x):
stk = [(1, (x,))]
while stk:
assert(d[0]%2 == 0)
step, args = stk.pop()
if step == 1:
x = args[0]
Expand Down

0 comments on commit bbe1c30

Please sign in to comment.