Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # visibilityTable: [ W, E, N, S]
- with open("aoc8_input.txt") as f:
- lines = [line.rstrip() for line in f]
- tallestTree = '0'
- visibilityTable = [[ [0, 0, 0, 0] for i in range(len(lines[0]))] for j in range(len(lines))]
- for line in lines:
- # from left to right
- tallestTree = line[0]
- for c in line[1:]:
- if (c <= tallestTree):
- #visiblity[it] = 0
- a = 0
- if (c > tallestTree):
- tallestTree = c
- print(lines)
- print(visibilityTable)
- # for j in range(len(lines[0])):
- # for it in range(len(lines)):
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement