README.org cleanup, update RESULTS.txt, build README.org with Makefile
This commit is contained in:
@@ -25,3 +25,17 @@ aoc-c : res=3790689
|
||||
aoc-c : res=6533
|
||||
time: 0:00.00 real, 0.00 user, 0.00 sys
|
||||
context-switch: 0+1, page-faults: 0+88
|
||||
|
||||
=========================================
|
||||
================= day03 =================
|
||||
=========================================
|
||||
|
||||
+++++++++++++++++ part 1
|
||||
aoc-c : res=860
|
||||
time: 0:00.00 real, 0.00 user, 0.00 sys
|
||||
context-switch: 0+1, page-faults: 0+99
|
||||
|
||||
+++++++++++++++++ part 2
|
||||
aoc-c : res=9238
|
||||
time: 0:00.00 real, 0.00 user, 0.00 sys
|
||||
context-switch: 0+1, page-faults: 0+98
|
||||
|
@@ -49,7 +49,7 @@ export PATH := .:$(PATH)
|
||||
|
||||
.PHONY: clean all compile assembly memcheck memcheck1 memcheck2 ex1 ex2
|
||||
|
||||
all: ex1 ex2
|
||||
all: README.org ex1 ex2
|
||||
|
||||
memcheck: memcheck1
|
||||
|
||||
@@ -71,7 +71,7 @@ ex2: aoc-c
|
||||
@$(TIME) aoc-c -p 2 < $(INPUT)
|
||||
|
||||
clean:
|
||||
@rm -f aoc-c core* vgcore* gmon.out aoc-c.s
|
||||
@rm -f aoc-c core* vgcore* gmon.out aoc-c.s aoc-c.i README.html
|
||||
|
||||
.c:
|
||||
@echo compiling $<
|
||||
@@ -85,3 +85,8 @@ clean:
|
||||
%.s: %.c
|
||||
@echo generating $@
|
||||
@$(CC) -S -fverbose-asm $(CFLAGS) -I $(INCDIR) $< -o $@
|
||||
|
||||
# generate README.org from README.html (must cleanup !)
|
||||
%.org: %.html
|
||||
@echo generating $@. Cleanup before commit !
|
||||
@pandoc $< -o $@
|
||||
|
@@ -55,9 +55,11 @@ is closer to the central port: its distance is =3 + 3 = 6=.
|
||||
|
||||
Here are a few more examples:
|
||||
|
||||
- =R75,D30,R83,U83,L12,D49,R71,U7,L72U62,R66,U55,R34,D71,R55,D58,R83= =
|
||||
distance =159=
|
||||
- =R98,U47,R26,D63,R33,U87,L62,D20,R33,U53,R51U98,R91,D20,R16,D67,R40,U7,R15,U6,R7=
|
||||
- =R75,D30,R83,U83,L12,D49,R71,U7,L72=
|
||||
=U62,R66,U55,R34,D71,R55,D58,R83=
|
||||
=distance =159=
|
||||
- =R98,U47,R26,D63,R33,U87,L62,D20,R33,U53,R51=
|
||||
=U98,R91,D20,R16,D67,R40,U7,R15,U6,R7=
|
||||
= distance =135=
|
||||
|
||||
/What is the Manhattan distance/ from the central port to the closest
|
||||
@@ -102,9 +104,11 @@ However, the top-right intersection is better: the first wire takes only
|
||||
|
||||
Here are the best steps for the extra examples from above:
|
||||
|
||||
- =R75,D30,R83,U83,L12,D49,R71,U7,L72U62,R66,U55,R34,D71,R55,D58,R83= =
|
||||
=610= steps
|
||||
- =R98,U47,R26,D63,R33,U87,L62,D20,R33,U53,R51U98,R91,D20,R16,D67,R40,U7,R15,U6,R7=
|
||||
- =R75,D30,R83,U83,L12,D49,R71,U7,L72=
|
||||
=U62,R66,U55,R34,D71,R55,D58,R83=
|
||||
= =610= steps
|
||||
- =R98,U47,R26,D63,R33,U87,L62,D20,R33,U53,R51=
|
||||
=U98,R91,D20,R16,D67,R40,U7,R15,U6,R7=
|
||||
= =410= steps
|
||||
|
||||
/What is the fewest combined steps the wires must take to reach an
|
||||
|
Reference in New Issue
Block a user