README.org cleanup, update RESULTS.txt, build README.org with Makefile

This commit is contained in:
2022-09-19 19:59:26 +02:00
parent 828d13f967
commit 42d1f7bf48
3 changed files with 31 additions and 8 deletions

View File

@@ -25,3 +25,17 @@ aoc-c : res=3790689
aoc-c : res=6533 aoc-c : res=6533
time: 0:00.00 real, 0.00 user, 0.00 sys time: 0:00.00 real, 0.00 user, 0.00 sys
context-switch: 0+1, page-faults: 0+88 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

View File

@@ -49,7 +49,7 @@ export PATH := .:$(PATH)
.PHONY: clean all compile assembly memcheck memcheck1 memcheck2 ex1 ex2 .PHONY: clean all compile assembly memcheck memcheck1 memcheck2 ex1 ex2
all: ex1 ex2 all: README.org ex1 ex2
memcheck: memcheck1 memcheck: memcheck1
@@ -71,7 +71,7 @@ ex2: aoc-c
@$(TIME) aoc-c -p 2 < $(INPUT) @$(TIME) aoc-c -p 2 < $(INPUT)
clean: 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: .c:
@echo compiling $< @echo compiling $<
@@ -85,3 +85,8 @@ clean:
%.s: %.c %.s: %.c
@echo generating $@ @echo generating $@
@$(CC) -S -fverbose-asm $(CFLAGS) -I $(INCDIR) $< -o $@ @$(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 $@

View File

@@ -55,9 +55,11 @@ is closer to the central port: its distance is =3 + 3 = 6=.
Here are a few more examples: Here are a few more examples:
- =R75,D30,R83,U83,L12,D49,R71,U7,L72U62,R66,U55,R34,D71,R55,D58,R83= = - =R75,D30,R83,U83,L12,D49,R71,U7,L72=
distance =159= =U62,R66,U55,R34,D71,R55,D58,R83=
- =R98,U47,R26,D63,R33,U87,L62,D20,R33,U53,R51U98,R91,D20,R16,D67,R40,U7,R15,U6,R7= =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= = distance =135=
/What is the Manhattan distance/ from the central port to the closest /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: 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= = - =R75,D30,R83,U83,L12,D49,R71,U7,L72=
=610= steps =U62,R66,U55,R34,D71,R55,D58,R83=
- =R98,U47,R26,D63,R33,U87,L62,D20,R33,U53,R51U98,R91,D20,R16,D67,R40,U7,R15,U6,R7= = =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 = =410= steps
/What is the fewest combined steps the wires must take to reach an /What is the fewest combined steps the wires must take to reach an