Compare commits

..

No commits in common. "8877dff48a3cdf73ede2e70c4db1f97ea7ebc6d6" and "1a4f2da0ce10a7e5728fdfbe1df21404bf7833c8" have entirely different histories.

3 changed files with 0 additions and 188 deletions

View File

@ -1,142 +0,0 @@
......................................................................S......................................................................
.............................................................................................................................................
......................................................................^......................................................................
.............................................................................................................................................
.....................................................................^.^.....................................................................
.............................................................................................................................................
....................................................................^...^....................................................................
.............................................................................................................................................
...................................................................^.^...^...................................................................
.............................................................................................................................................
..................................................................^.....^.^..................................................................
.............................................................................................................................................
.................................................................^.^.^.^.^.^.................................................................
.............................................................................................................................................
................................................................^.^.^...^.^.^................................................................
.............................................................................................................................................
...............................................................^.^.^.^.^.^.^.^...............................................................
.............................................................................................................................................
..............................................................^.^.^.^.^.....^.^..............................................................
.............................................................................................................................................
.............................................................^.^.^.^.^.^.^.^.^.^.............................................................
.............................................................................................................................................
............................................................^.^.....^.^.^.^.^.^.^............................................................
.............................................................................................................................................
...........................................................^...^.^...^.^.^...^.^.^...........................................................
.............................................................................................................................................
..........................................................^.^.^.^.^.^...^.^.^...^.^..........................................................
.............................................................................................................................................
.........................................................^...^.....^.^...^.^.^.^.^.^.........................................................
.............................................................................................................................................
........................................................^.^...^.^...^.^.^.^.^.^...^.^........................................................
.............................................................................................................................................
.......................................................^...^.^...^.^...^.^...^.....^.^.......................................................
.............................................................................................................................................
......................................................^...^...^.^...^.^.^.^.^.^.^.^...^......................................................
.............................................................................................................................................
.....................................................^.^.^.^.^.^.^...^.^.^.^...^.^.^.^.^.....................................................
.............................................................................................................................................
....................................................^.^.^...^.^...^.^...^.^.^.^.^.^.^...^....................................................
.............................................................................................................................................
...................................................^.^.^.^.^.^.^...^.^.^.^.^.^.....^.^.^.^...................................................
.............................................................................................................................................
..................................................^.^...^.^.^.....^...^...^.^...^.^...^...^..................................................
.............................................................................................................................................
.................................................^.......^.^.^.....^.^.^.^.^.^.^.^...^...^.^.................................................
.............................................................................................................................................
................................................^...^.^.^...^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^................................................
.............................................................................................................................................
...............................................^.^.....^.^.^.^...^.^.^.^.^...^...^...^.^.....^...............................................
.............................................................................................................................................
..............................................^...^...^.^.^...^...^.....^.^.......^.....^.....^..............................................
.............................................................................................................................................
.............................................^.^.^.....^.^.....^.^.....^.......^.^.^.^.^.^.^.^.^.............................................
.............................................................................................................................................
............................................^.^.....^.^.^.........^.^...^.^...^...^.^.^.^...^...^............................................
.............................................................................................................................................
...........................................^.^.....^.......^.^.^...^.^.^.^.^.^.^.....^...^.^...^.^...........................................
.............................................................................................................................................
..........................................^.^.....^.^.^.^...^.^...^.^.^.^.^.^.^.....^.^.^...^...^.^..........................................
.............................................................................................................................................
.........................................^.^.....^.^.......^.........^.^.^.^...^.^.^.^...^.^.....^.^.........................................
.............................................................................................................................................
........................................^.^.^.^...^...^...^.^.^.^.^.^.^.^.^.^...^.....^.^.^.^.^.^...^........................................
.............................................................................................................................................
.......................................^.....^.^.^.......^.^...^.....^.^.^...^...^.^.^.^.^.^.^.^.^...^.......................................
.............................................................................................................................................
......................................^.^.....^...^.^.^.^.^...^.^.^.....^.^.....^.^.^.^.^...^.^.^.^...^......................................
.............................................................................................................................................
.....................................^.^...^.^.^.^.^.^.^.^.^.^.^.^.^.^...^.^.^.^.^.^...^.^.........^.^.^.....................................
.............................................................................................................................................
....................................^.^.^.^.^.^.^.^.^.....^.^.^...^...^...^.^.....^.^.^...^.^...^...^.^.^....................................
.............................................................................................................................................
...................................^.^.....^.^.^...^...^.^...^...^.......^.^.^.^.^.^.^...^.^.^.^.^.^.^.^.^...................................
.............................................................................................................................................
..................................^.^.^.^.^.^.^.^.^.^...^.^...^...^.^.^.^.^.^.^.^.....^.^.^...^.....^.^...^..................................
.............................................................................................................................................
.................................^.^.^.^.......^...^.^.^...^.^.^.....^.^...^.^.^.^...^.^.^.^...^.^.^.^...^.^.................................
.............................................................................................................................................
................................^.^.^.........^.^...^.^...^.^.^.^.^...^.^...^.^.....^...^.^.^...^...^.^...^.^................................
.............................................................................................................................................
...............................^.....^.^.....^.^.^.^.....^.^.^.^.^.^.^.^.^.....^.....^.^...^.....^.^.^.^.^.^.^...............................
.............................................................................................................................................
..............................^.^.^.^.^.^.....^.^.^.^.^.....^.^.^.^.^.^.....^...^.^...^.^.^.^.^.^.^...^.^.^...^..............................
.............................................................................................................................................
.............................^...^...^.^.^.^...^.^.......^.^...^...^.^...^.^.^.^...^...^.^.^.....^.^.^...^.^.^.^.............................
.............................................................................................................................................
............................^...^.^...^.^.^.^...^.^...^...........^.^.^.^.^.^.....^.^.^.^.^.^.^.^.^...^.....^.^.^............................
.............................................................................................................................................
...........................^.^...^.^.^...^.^.^.^.^.^.^.^.....^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^...^.^.^.^.^.^.^.^...........................
.............................................................................................................................................
..........................^.^.^...^.^...^.^.^...^...^.^.^.^.^...^.^.^.^.^.^.^...^.^.^.^.^.^.^.^.^...^.^.^.....^.^.^..........................
.............................................................................................................................................
.........................^...^...^.^.^.^.^...^...^.......^.^...^.^...^.^.^...^.^.^.^...^.^.^.^...^.^...^.^...^.^.^.^.........................
.............................................................................................................................................
........................^.^.^.^.^.^.^...^...^.^.^...^.^.^.^.^.^...^...^...^.^.^.....^.^...^.^...^.^.^.^.^.......^.^.^........................
.............................................................................................................................................
.......................^.^.^.^.^.^.^.^.........^.^.^.^...^.^...^...^.^.^.^.^...^.^...^.^.^...^...^.^.^.^...^.^.^.^...^.......................
.............................................................................................................................................
......................^.^.^.^.......^.^.^.^.^...^...^...^.^.^...^.....^.^.^...........^.^.^.^.^...^.^.^.^.^.^.^...^.^.^......................
.............................................................................................................................................
.....................^.^.^...^...^...^.........^...^.^...^.^.^...^.^.^.^...^.^.^...^.^...^...^...^...^.^.^.....^.^.^...^.....................
.............................................................................................................................................
....................^.^.^.....^.^.^...^...^.^.^.^.^.^.^.^.^.^.^.....^...........^...^.^.^.^.^.^.^...^.....^.^...^...^.^.^....................
.............................................................................................................................................
...................^.....^.....^.......^.^.^.^.^.^.^.^.^.^.....^.^.^.^.^.^.......^...^.^.^...^.^.^.^.^.^.^.^.^.....^.^...^...................
.............................................................................................................................................
..................^.^.^...^.^.^.^.^...^.^.^...^.^.^.^.^.^.^.^.^...^.^.^.^.^...^...^...^.^.^.^.^...^.^...^...^.^.^...^...^.^..................
.............................................................................................................................................
.................^.^.^.^.^.^...^.^.^.^.^.^...^.^.^.^.^...^.......^...^.^.^.^.^...^.^.^.^.^.^.^.^.^.^.^...^.^.^.^...^...^.^.^.................
.............................................................................................................................................
................^...^.^.^.^.^...^...^.^...^...^.^.^...^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^...^...^.^.^.^.^.....^.^.^.^.^.^................
.............................................................................................................................................
...............^.....^.^.^.^.^.......^.^.^...^.^.^.^.^.^...^.^.^.^.^.....^.^.^.....^.^.^.^...^.....^.^.^...^.^...^.^.^.^.^...^...............
.............................................................................................................................................
..............^.^.^.^.^.^.^...^.^.^.^.^.^.^.^.^.^.^...^.^...^.^.......^.^.^.^.....^...^.........^.....^...^.^.^.^.^...^.^.^.^.^..............
.............................................................................................................................................
.............^.^.^...^.....^.....^...^.^...^.^...^.^.^.^.^.^.^.^...^.^.^...^.^...^.....^.^.^.^.^.^...^.^...^.^...^.^.^.^.^.....^.............
.............................................................................................................................................
............^.^.^...^.^.^.^.^.^.^...^.^...^...^.^.^.^.^.^...^...^.^.^.^...^.^.^.^.....^.....^.^...^...^...^.^.^.^.^.^.......^.^.^............
.............................................................................................................................................
...........^...^.^...^.^.^.^.^.^...^.^.^.^.^.^.^.^.^.^.^.^...........^.^...^.^...^...^.^.^.^.^.^...^.....^.......^.^.^.^...^...^.^...........
.............................................................................................................................................
..........^.^.^.^...^...^...^.^.^.....^.^...^.^.^.^...^.^...^.^.^.^...^.^.....^.^...^.^.^.^...^.^.^.^.^...^...^.^.^.^.^.^...^.^.^.^..........
.............................................................................................................................................
.........^.....^...^.^...^.^.^.^.^.^.^...^.^...^.^.^.^.^...^...^.......^.^...^.^.^.^.^.^.^.....^...^.....^.^.^.^.^.^.^.^.^...^.^.^.^.........
.............................................................................................................................................
........^.^.^.^.^...^...^.^.^...^.^.^.^...^.^.^.^...^.^...^.^.^.^.....^.^.^.^.....^.^.^.....^.^.^.^...^.^...^.....^.^.^.^.^.^...^.^.^........
.............................................................................................................................................
.......^.^.......^.....^.^.^.^...^.^.^.^.^...^.....^.^.^.^.^.^.^.^.^.^...^.....^...^.^...^.^.^.^...^.^.^.......^.^...^.........^.^.^.^.......
.............................................................................................................................................
......^.^...^.....^.^.^.^...^.^.^.^.^.^...^.......^.....^.^.....^.^.^...^.^.^.^...^.^.^.^.^...^.^.^.^.^...^.^.^.^.....^.....^.^.^.^.^.^......
.............................................................................................................................................
.....^.^.^.^.....^...^.^.^.^.^.....^...^.^...^.^.^.^...^.^.^.....^.^...^...^.^.^.^.....^.^.......^...^...^.^.......^.....^.^...^.^.^.^.^.....
.............................................................................................................................................
....^.^.....^.^.^.^...^.^.....^.....^.^.^.^.^.^.^.^.^.^.....^.^.^.^.^...^.^.^.^...^.^.^.^.^.^...^...^...^.^.^...^.....^...^...^...^.....^....
.............................................................................................................................................
...^...^.^.^.^.^...^...^.^.^.^.^...^.^.^...^.^.^.^...^...^.^.^.^...^...^...^...^.^.^.^.^.........^.....^...^.^...^.........^.^.^...^...^.^...
.............................................................................................................................................
..^.^.....^.^.^.......^...^.^.^...^.^.....^.^...^.^...^.....^.^.....^.^.^...^...^.^.^...^.^.....^.....^...^...^.^.^...^.^.^.^.^...^.^.^.^.^..
.............................................................................................................................................
.^.^.^.^.^.^.^...^.^...^.^...^.^.....^.....^.^.^.^.^.^.^.^.^...^.^...^...^.....^.^.^.^.^...^.^.^.^...^.^.^.^.^.^.......^.^...^.^.^.^.^...^.^.
.............................................................................................................................................

View File

@ -1,16 +0,0 @@
.......S.......
...............
.......^.......
...............
......^.^......
...............
.....^.^.^.....
...............
....^.^...^....
...............
...^.^...^.^...
...............
..^...^.....^..
...............
.^.^.^.^.^...^.
...............

View File

@ -1,30 +0,0 @@
from collections import Counter
def solve(input):
splits = 0
pos = []
paths = Counter()
for row in open(input):
row = row.strip()
paths.clear()
for i,count in pos:
if row[i] == '.':
paths[i] += count
elif row[i] == '^':
if i-1 >= 0:
paths[i-1] += count
if i+1 < len(row):
paths[i+1] += count
splits += 1
start = row.find('S')
if start >= 0:
paths[start] += 1
pos = sorted(paths.items())
# part 1
print(splits)
# part 2
print(sum(paths.values()))
solve("sample")
solve("input")