My Advent of Code solutions in Python. kevinyap.ca/2019/12/going-fast-in-advent-of-code/
advent-of-code python
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update day10.py

-4
-4
2019/day10.py
··· 12 12 13 13 14 14 # Read problem input 15 - grid = [] 16 15 asteroids = set() 17 16 18 17 for y, line in enumerate(fileinput.input()): 19 18 for x, c in enumerate(line.strip()): 20 19 if c == '#': 21 20 asteroids.add((x, y)) 22 - grid.append([c == '#' for c in line.strip()]) 23 21 24 - width = len(grid[0]) 25 - height = len(grid) 26 22 27 23 # Part 1 28 24 detections = {