Renamed solver to main
parent
3fa9ecd01a
commit
a79651b1de
4
day01.py
4
day01.py
|
@ -18,7 +18,7 @@ def partI(modules):
|
||||||
def partII(modules):
|
def partII(modules):
|
||||||
return sum(map(calc_fuel, modules))
|
return sum(map(calc_fuel, modules))
|
||||||
|
|
||||||
import solver
|
from main import Tests
|
||||||
tests = solver.Tests()
|
tests = Tests()
|
||||||
tests.add(1969, partI=654, partII=966)
|
tests.add(1969, partI=654, partII=966)
|
||||||
tests.add(100756, partI=33583, partII=50346)
|
tests.add(100756, partI=33583, partII=50346)
|
||||||
|
|
2
day02.py
2
day02.py
|
@ -44,5 +44,3 @@ def partII(init_prog):
|
||||||
break
|
break
|
||||||
|
|
||||||
return 100*noun + verb
|
return 100*noun + verb
|
||||||
|
|
||||||
import solver
|
|
||||||
|
|
4
day03.py
4
day03.py
|
@ -67,9 +67,9 @@ def partII(paths):
|
||||||
|
|
||||||
return min_steps(path1, path2)
|
return min_steps(path1, path2)
|
||||||
|
|
||||||
import solver
|
from main import Tests
|
||||||
|
|
||||||
tests = solver.Tests()
|
tests = Tests()
|
||||||
tests.add("R75,D30,R83,U83,L12,D49,R71,U7,L72\n" +
|
tests.add("R75,D30,R83,U83,L12,D49,R71,U7,L72\n" +
|
||||||
"U62,R66,U55,R34,D71,R55,D58,R83",
|
"U62,R66,U55,R34,D71,R55,D58,R83",
|
||||||
partI=159,
|
partI=159,
|
||||||
|
|
5
day06.py
5
day06.py
|
@ -15,9 +15,8 @@ def partI(graph):
|
||||||
def partII(graph):
|
def partII(graph):
|
||||||
return graph.min_path("SAN", "YOU") - 2
|
return graph.min_path("SAN", "YOU") - 2
|
||||||
|
|
||||||
import solver
|
from main import Tests
|
||||||
|
tests = Tests()
|
||||||
tests = solver.Tests()
|
|
||||||
tests.add("""COM)B
|
tests.add("""COM)B
|
||||||
B)C
|
B)C
|
||||||
C)D
|
C)D
|
||||||
|
|
5
day07.py
5
day07.py
|
@ -46,9 +46,8 @@ def partII(amp):
|
||||||
|
|
||||||
return best
|
return best
|
||||||
|
|
||||||
import solver
|
from main import Tests
|
||||||
|
tests = Tests()
|
||||||
tests = solver.Tests()
|
|
||||||
|
|
||||||
tests.add(
|
tests.add(
|
||||||
"3,15,3,16,1002,16,10,16,1,16,15,15,4,15,99,0,0", partI=43210)
|
"3,15,3,16,1002,16,10,16,1,16,15,15,4,15,99,0,0", partI=43210)
|
||||||
|
|
4
day09.py
4
day09.py
|
@ -11,7 +11,7 @@ def partI(program):
|
||||||
def partII(program):
|
def partII(program):
|
||||||
return Interpreter(program, SingletonIO).run(2)
|
return Interpreter(program, SingletonIO).run(2)
|
||||||
|
|
||||||
import solver
|
|
||||||
|
|
||||||
tests = solver.Tests()
|
from main import Tests
|
||||||
|
tests = Tests()
|
||||||
tests.add("104,1125899906842624,99", partI=1125899906842624)
|
tests.add("104,1125899906842624,99", partI=1125899906842624)
|
||||||
|
|
4
day10.py
4
day10.py
|
@ -96,9 +96,9 @@ def partII(packed):
|
||||||
v = asteroid_map.vaporize_seq(asteroid)[199]
|
v = asteroid_map.vaporize_seq(asteroid)[199]
|
||||||
return 100*v.x + v.y
|
return 100*v.x + v.y
|
||||||
|
|
||||||
import solver
|
from main import Tests
|
||||||
|
|
||||||
tests = solver.Tests()
|
tests = Tests()
|
||||||
|
|
||||||
map1 = \
|
map1 = \
|
||||||
""".#..#
|
""".#..#
|
||||||
|
|
Loading…
Reference in New Issue