diff --git a/2024/day18/main.py b/2024/day18/main.py index e909bf1..46d0bd1 100644 --- a/2024/day18/main.py +++ b/2024/day18/main.py @@ -25,38 +25,24 @@ def part_one(input): while True: keys = list(G.keys()) keys.sort() - print("G", G) p_list = G.pop(keys[0]) p = p_list[-1] for x in [[1,0],[-1,0],[0,1],[0,-1]]: nx = add(x,p) if nx == END: - print("WE FOUND THE END", len(p_list)) + print("P1: ", len(p_list)) return - print(V) if grid_check(nx, input) and tuple(nx) not in V: h = tuple([mag(sub(END, nx)), *nx]) V.add(tuple(nx)) G[h] = [*p_list, nx] - - - - - - - # if [] - - - pass - def part_two(input): pass def main(): f = open(INPUTS[0], 'r') contents = [list(map(int, x.strip().split(","))) for x in f.readlines()] - print(contents[:INPUTS[2]]) part_one(contents[:INPUTS[2]]) part_two(contents[:INPUTS[2]])