Skip to content

Commit 4775a88

Browse files
committed
Add generated graphs
1 parent 8f51783 commit 4775a88

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

day23/generated/demo.pdf

20.3 KB
Binary file not shown.

day23/generated/input.pdf

183 KB
Binary file not shown.

day23/scripts/regenerate

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
set -e
4+
cd "$(dirname "$0")/.."
5+
6+
for f in resources/*.txt; do
7+
name=$(basename "${f%.txt}")
8+
scripts/dotify "$f" | neato -Tpdf -o "generated/$name.pdf"
9+
done

day23/src/day23.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,7 @@ func main() {
6767
}
6868
fmt.Println("Part 1:", threeCliques(graph, "t"))
6969

70-
// Part 2 was solved by inspecting the output in GraphViz:
71-
//
72-
// scripts/dotify resources/input.txt | neato -Tpdf -o <path/to/output.pdf>
73-
//
74-
// The clique can be found at the very top.
70+
// Part 2 was solved by inspecting the output in GraphViz (see the PDFs in
71+
// `./generated`, as generated by `scripts/regenerate`). The clique can be
72+
// found at the very top of `generated/input.pdf`.
7573
}

0 commit comments

Comments
 (0)