AdventOfCode/2024/19/solution.py

47 lines
1.2 KiB
Python

#!/bin/python3
import sys,time,re
from pprint import pprint
sys.path.insert(0, '../../')
from fred import list2int,get_re,nprint,bfs
start_time = time.time()
input_f = 'test'
def loadFile():
colors = []
towels = []
with open(input_f) as file:
for l,line in enumerate(file):
if l == 0:
colors = line.rstrip().split(',')
if l > 1:
towels.append(line.rstrip())
return colors,towels
#########################################
# #
# Part 1 #
# #
#########################################
def part1():
colors,towels = loadFile()
return
start_time = time.time()
print('Part 1:',part1(), '\t\t', round((time.time() - start_time)*1000), 'ms')
#########################################
# #
# Part 2 #
# #
#########################################
def part2():
return
start_time = time.time()
print('Part 2:',part2(), '\t\t', round((time.time() - start_time)*1000), 'ms')