Compare commits
1 Commits
a0746bbee0
...
d67ee5f3b6
Author | SHA1 | Date | |
---|---|---|---|
d67ee5f3b6 |
|
@ -16,12 +16,12 @@ jobs:
|
||||||
- name: Deploy to external repository
|
- name: Deploy to external repository
|
||||||
uses: https://git.sour.is/actions/github-action-push-to-another-repository@main
|
uses: https://git.sour.is/actions/github-action-push-to-another-repository@main
|
||||||
env:
|
env:
|
||||||
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
|
API_TOKEN_GITHUB: ${{ secrets.GH_TOKEN }}
|
||||||
with:
|
with:
|
||||||
# GitHub Action output files
|
# GitHub Action output files
|
||||||
source-directory: .
|
source-directory: .
|
||||||
destination-github-username: jonlundy
|
destination-github-username: sour-is
|
||||||
destination-repository-name: advent-of-code
|
destination-repository-name: go-pkg
|
||||||
user-email: jon@xuu.cc
|
user-email: jon@xuu.cc
|
||||||
# It defaults to `main`
|
# It defaults to `main`
|
||||||
target-branch: "main"
|
target-branch: "main"
|
||||||
|
|
|
@ -2,13 +2,15 @@ package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
|
"bytes"
|
||||||
_ "embed"
|
_ "embed"
|
||||||
"fmt"
|
"fmt"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
aoc "go.sour.is/advent-of-code-2023"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
//go:embed input.txt
|
||||||
|
var input []byte
|
||||||
|
|
||||||
type partNumber struct {
|
type partNumber struct {
|
||||||
number int
|
number int
|
||||||
row int
|
row int
|
||||||
|
@ -54,14 +56,10 @@ func (tab symbolTab) scanSymbol(p partNumber) bool {
|
||||||
// 553079
|
// 553079
|
||||||
// 84363105
|
// 84363105
|
||||||
|
|
||||||
func main() { aoc.MustResult(aoc.Runner(run)) }
|
func main() {
|
||||||
|
buf := bytes.NewReader(input)
|
||||||
|
scan := bufio.NewScanner(buf)
|
||||||
|
|
||||||
type result struct {
|
|
||||||
valuePT1 int
|
|
||||||
valuePT2 int
|
|
||||||
}
|
|
||||||
|
|
||||||
func run(scan *bufio.Scanner) (*result, error) {
|
|
||||||
parts := []partNumber{}
|
parts := []partNumber{}
|
||||||
symbols := make(symbolTab)
|
symbols := make(symbolTab)
|
||||||
symbolList := []*symbol{}
|
symbolList := []*symbol{}
|
||||||
|
@ -97,7 +95,6 @@ func run(scan *bufio.Scanner) (*result, error) {
|
||||||
if v, err := strconv.Atoi(string(slice)); err == nil {
|
if v, err := strconv.Atoi(string(slice)); err == nil {
|
||||||
parts = append(parts, partNumber{number: v, row: row, col: col - len(slice), end: col - 1})
|
parts = append(parts, partNumber{number: v, row: row, col: col - len(slice), end: col - 1})
|
||||||
slice = slice[:0]
|
slice = slice[:0]
|
||||||
_ = slice
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,5 +119,4 @@ func run(scan *bufio.Scanner) (*result, error) {
|
||||||
// fmt.Println(symbolList)
|
// fmt.Println(symbolList)
|
||||||
fmt.Println("part1:", sum)
|
fmt.Println("part1:", sum)
|
||||||
fmt.Println("part2:", sumGears)
|
fmt.Println("part2:", sumGears)
|
||||||
return &result{sum, sumGears}, nil
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,43 +0,0 @@
|
||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"bufio"
|
|
||||||
"bytes"
|
|
||||||
_ "embed"
|
|
||||||
"testing"
|
|
||||||
|
|
||||||
"github.com/matryer/is"
|
|
||||||
)
|
|
||||||
|
|
||||||
//go:embed example.txt
|
|
||||||
var example []byte
|
|
||||||
|
|
||||||
//go:embed input.txt
|
|
||||||
var input []byte
|
|
||||||
|
|
||||||
func TestExample(t *testing.T) {
|
|
||||||
is := is.New(t)
|
|
||||||
scan := bufio.NewScanner(bytes.NewReader(example))
|
|
||||||
|
|
||||||
result, err := run(scan)
|
|
||||||
is.NoErr(err)
|
|
||||||
|
|
||||||
t.Log(result)
|
|
||||||
is.Equal(result.valuePT1, int(4361))
|
|
||||||
|
|
||||||
is.Equal(result.valuePT2, 467835)
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestInput(t *testing.T) {
|
|
||||||
is := is.New(t)
|
|
||||||
scan := bufio.NewScanner(bytes.NewReader(input))
|
|
||||||
|
|
||||||
result, err := run(scan)
|
|
||||||
is.NoErr(err)
|
|
||||||
|
|
||||||
t.Log(result.valuePT1)
|
|
||||||
is.Equal(result.valuePT1, int(553079))
|
|
||||||
|
|
||||||
t.Log(result.valuePT2)
|
|
||||||
is.Equal(result.valuePT2, 84363105)
|
|
||||||
}
|
|
|
@ -4,6 +4,7 @@ import (
|
||||||
"bufio"
|
"bufio"
|
||||||
"cmp"
|
"cmp"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
aoc "go.sour.is/advent-of-code-2023"
|
aoc "go.sour.is/advent-of-code-2023"
|
||||||
|
@ -30,7 +31,13 @@ func run(scan *bufio.Scanner) (*result, error) {
|
||||||
if len(text) == 0 {
|
if len(text) == 0 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
histories = append(histories, aoc.ReadStringToInts(strings.Fields(text)))
|
histories = append(histories, nil)
|
||||||
|
|
||||||
|
for _, s := range strings.Fields(text) {
|
||||||
|
if i, err := strconv.Atoi(s); err == nil {
|
||||||
|
histories[len(histories)-1] = append(histories[len(histories)-1], i)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
log(last(histories...))
|
log(last(histories...))
|
||||||
|
|
||||||
|
|
0
day10/example.txt
Normal file
0
day10/example.txt
Normal file
140
day10/input.txt
140
day10/input.txt
|
@ -1,140 +0,0 @@
|
||||||
F---7-FJ.7--FJ7.-.7-|7F.|7FJ77F7J-|--.FLF|.F-7-F7.F.J77|--|7--|7|-J-F--7-F7.F7-F7F7F-|-|-F777L7|-.FLF|-77F7-FJF|JF--F.77J-L7-FF--7.FFF7FF7.7
|
|
||||||
|J.F|7F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7F7|FJL7||F-J|F-J|FJLJL7|F7L7-||L7LJFJJF7|FJL7LJLJL7||FJ||L--7F-7-|7.F.|7JL-L7J-7JFFL--JFFL.L
|
|
||||||
..FFJL7L7-LLF7|L--JL-7F--J|LJ||L7FJ|L7F|F--JF7-LJ|||F-J||L-7LJF-JL--7FJLJ|FJFJL7|F-JF7||||F7|F----J||L7LJF--JL7|F--7LFLJ--||||FLLF7-J.FF-.F|
|
|
||||||
F-J|7L|-77|-J7|F7F--7|L---JF-JL7|L-JFJFJL-7FJL7F7|||L7|||F7|F-JF7.F7||F7FJL7L7FJ||.FJ||LJ||LJL-7-F7||JL7FJF7F7||L-7|-FJ-7LL77-F7-F|J.F7||F-7
|
|
||||||
LL7L77L-7-7-LLLJLJF-JL-----JF--JL--7L-JF7FJL7FJ||||L7L7|LJLJ|F7|L7||||||L-7L7||FJL-JFJL-7||F---JFJLJ|F-J|FJLJLJ|F7|L7JF7.7JL7|LF-7.F-FF77JJ.
|
|
||||||
FF--.7.LJLL7|.|FF-JF--------JF7F7F7|F--J||F-JL-JLJ|FJFJL7F--J|LJFJ|||||L7|L7LJ||F---JF--JLJL--7JL7F-JL7FJ|F----J|||FJFJ|7JF-J-7|JL||LLLJL7-F
|
|
||||||
7|..L-FFJJFL7FFLL-7|F---77F7FJLJLJ||L7F7LJL--7F---JL7|F7||F--JF-JFJ||||FJF7L7FJ||F--7L---7F---JF-JL7F7|L-JL7F--7|||L-JFJF7L7F7JJ.FJF-7L7J|7|
|
|
||||||
F7.L7LJJ.FJL|F7L|7LJL7F7L-J|L----7|L7LJL7F7FFJL7F-7||||LJLJF--JF7L7||LJL7|L-JL7|LJF7|F7F-JL-7F7L7F-J|||F---J|F7||LJF--J||L7JLJ.LFLJ|LJ--7JL|
|
|
||||||
J7-FJ.|7.|J-F7L7LF7F-J||F-7|F7FF-JL7|F--J||FJF-J|FJFJ||F7F7L--7||FJLJF-7|L---7||F-JLJ||L--7FJ|L7|L7FJLJL7F-7LJ|LJF-JF7F7L7L7||--|..|F7|LJ|F|
|
|
||||||
|F7LF77J.LF-LJJ.FJLJF7|||FJLJL7L--7LJL7F7|||FJF7||FJFJLJ||L---J||L--7|FLJJF--J||L-7F7||FF-JL7|FJL7|L-7F-J|FJF7L-7L7FJLJL7|FJ7|F7|F.|--7-LL|7
|
|
||||||
|L||F---F.F7LJ-FL---J||||L--7FJF7L|F--J|||||L7||||L7L-7FJL-7F-7||F7FJL7F-7L--7LJF-J|||L7L7F-J|L7FJL-7|L-7|L7||F7|FJ|F---J||F---77-|J|7L-F.L7
|
|
||||||
-7F77JJF-|7JJ.F-F--77||LJF--JL-JL-J|F7J||||L7|||||FJF7|L7F-JL7|||||L7FJ|FJF-7L7FJF-J||FJFJL7FJFJL7F-J|F-J|FJ|||||L7|L7F7FJ||F--JJ7|.L7|F|.LJ
|
|
||||||
.L.|L|.F-L|7|FFLL-7L7LJF7L--------7LJL-JLJ|FJ||LJ|L7|LJFJ|F7FJLJ||L-J|.||FJFJFJL-JF-J||FJF-JL7|F-JL7FJ|F7||FJLJLJFJ|FJ||L7LJ|F-7JF777.LFFJL|
|
|
||||||
J..L.LL|J-J-|7J.LLL7L-7|L---------JF--7F7FJL7|L-7L-JL77L7LJLJF--JL7F-JFJ|L7|FJF---JF7|LJFJF7FJ|L-7FJL7||||||F----JFJL7|L-JF-J|FJ-LF77.|L||.F
|
|
||||||
.F-.L7.|7.F7.F-7.FLL7FJL----------7L-7LJLJF7|L7FJF-7FJF7|F--7L--7FJL77L7L7|LJFJ|F7FJ|L-7|FJ|L7L--J||FJLJ||LJ|F7F7FJF-JL7F-JF7||F77.JJ-L-|-LJ
|
|
||||||
FF|-.FFF-JJLLJL|FF--JL7F77F7F7F--7|F-JF7F7|||FJL-JFJL-JLJL-7L---JL7FJF7L7|L-7L7FJ||FJF-J||FJ7L---7L7|F--JL-7LJLJLJFJF-7||F-JLJLJ|-J7|-|F7-L7
|
|
||||||
|L-JLLJL-J7F||.J|L---7LJL-JLJLJF7LJL7-|||||LJL7-F7|F7F---7FJF7F-7FJL7||FJ|F7|FJL7||L7L-7|||F7F7F7|FJ||F7F7FJF----7L-JFJ|||F---7FJFL7.FFJJ|F7
|
|
||||||
..|.|F7L77LL77J|F-7F7L--------7|L--7L-JLJ|L--7|FJ||||L7F7LJ|||L7LJF-J||L7LJ||L--J||FJF-JLJ||LJLJ||L7|LJ|||L7L-7F7L--7L-JLJL7F7LJ-7F|-7.|7FLJ
|
|
||||||
F.L|-|J.F7.|L|-LL7LJL----7F-7FJ|F-7L7F---JF7FJLJFJLJ|FJ|L--7||FJF-JF7||JL-7LJF7F-J|L7L--7FJL7F--J|FJ|F-J||FJF-J|L--7L7F7F--J|L7L|F-J|F|JLJ|J
|
|
||||||
|F-L.|.-JL7|JF-L|L------7|L7LJFJL7|FJ|F--7||L--7|F7FJL7|F--J||L7|F-J|||F7-L-7|LJF7|FJF7FJ|F7||F7FJL-J|F7|||FJLFJF--J-|||L---JFJ.-JF|JLJ|J.JJ
|
|
||||||
7-LJFJ7|J.F-.J77FF------JL-JF-J..||L7||F-J||FF7||||L7FJ||F7L||F||L-7|||||F7F||F7|||||||L7|||||||L7F--J||||||F7|FJF77FJ||F-7F7|F7-|FL-F.7-7J|
|
|
||||||
F7-|7.FF-FJ-|JF7FL--7F7F7F--JF7-FJL-J|||F7||FJ|||||FJ|FJLJ|FJ|FJL7FJ||||||L7|LJLJ|||FJ|FJ||||||L7||F-7|LJLJLJLJL-JL7L7||L7||LJ|L--7J7|FL-|-F
|
|
||||||
LJ--F7L---JFLJL-JJ-LLJLJLJF--JL7L7F77||LJLJ||JLJ||LJL|L-7.||FJL-7|||LJ||LJFJL7F--J|LJFJL7LJ||||FJ|||L||F----------7L7||L7|||F-JF--JJ-F7LLJ-J
|
|
||||||
|.LF-JF-F|.|J7.L77|.F--7F7L---7L-J|L7|L7F--JL-7F||LF-JF7L7LJL7F-JLJF--J|F-JF-JL7F7L77L--JJFJ|||L7|LJFJ|L---------7L7||L7|||LJF7L7|7|F|L..L7J
|
|
||||||
|7F-J7.FFLLJ|F..F7F-JF7LJL---7L---JFJL-JL--7F-JFJL7L7FJL7L-7FJL---7|F-7||F7L7F7LJ|FJF7LF--JFJ||FJL77|FJF---------J|LJL-JLJL7FJL7L--7J-J-7...
|
|
||||||
.-J|||-|7L|7FJF7||L-7|L-7F--7|FF7F7L--7F7F-JL7FJF7|FJL-7L7FJL7F7F-J||FJ|||L7LJ|F-J|FJL7L7F7L7LJL-7|FJ|FJF--7F7F--7F-----7FFJ|JFJF--J-7.FF--F
|
|
||||||
J7|FLJF-L7|LF7|LJL7|LJF7LJF-JL-JLJL---J||L7F7|L7|||L7F7|FJL7-LJ|L77LJ|FJ||FJF-J|F7LJF7L7|||FJ|F--J|L7|L-JF7LJLJF7LJF7F-7|FJFJ|L7|JLJF7-FJ7||
|
|
||||||
||L7.FL|LL-L.LL7F7L7LFJ|F7L------------JL7||||-LJ|L7||||L-7L--7L7L7JFJL7LJL7L7FJ|L7FJL-J||||F7L---JJ||F--JL----SL--JLJJLJ|FJF--J|7FL-.F77.F|
|
|
||||||
J.||F--7.J7J|-LLJL7L7L7||L---------------JLJ|L--7L7|LJ|L-7L7F-JJL7L7L7FJF--JFJL7L7|L-7F7LJLJ|L-----7LJL7F----------7F7F7|LJ7L---J777.L7LJ--|
|
|
||||||
L-|-|..L7-|LF.LJ-LL7L7||L--------7F--7F7F77FJF-7L7||F-JF7L7|L-7.FJFJFJ|-L-7FJF-JFJ|F7LJL7F7FJF-7F-7L7F7LJF7F-7F----J|||L7.LJJFLL-7|F7JJ.||.|
|
|
||||||
L7F-JF-F|7.F77J|-F7L7LJL7-F---7F7LJF7LJLJL7L7|-L7|||L-7|L-J|F-JFJFJFJFJF--J|LL-7|J|||F--J|||FJFJL7L7LJL--JLJFJL-----JLJFJF|..|LL7JJ-LJ-F7FJ-
|
|
||||||
.F.|FFFF--7||F7LFJL7L7F7|FJF-7LJL7F|L-----JFJL7J||LJF-JL-7FJL7.|FJFL-JLL7F7L-7.|L7|||L---J||L7L7FJ7L7F7F-7F7L----------JJF7-.|L-.||LJ.FLJJ|.
|
|
||||||
FJF|--JL-7||||L7L-7L7LJ||L-JFL7F7L-JFF7F7F7L-7L7|L7.L-7F7||F7L7|L-7|F---J||F-JFJFJ||L7F---JL-JFJL7F7LJLJJLJL-----7LF7F7F7|||.F-J7LJ7.7|J.L|-
|
|
||||||
|7JL|..L||LJLJFJF7L7L7|||7F7F-J|L7F--JLJLJL-7L-J|FJF--J||||||FJ|F7|FJF7F7|||FFJFJFJ|FJL---7F--JF-J||F7-F7F------7|FJLJLJLJL-77LLF7L7-L77L.|7
|
|
||||||
-J7.F----|F7F7L-JL7L7L-JL-JLJF7L7LJF-------7L--7|L7L7F7|||||LJL|||||FJ||||LJFJFJ7L7|L--7F-J|F7FJF-JLJL-JLJF7F--7LJL7F-------J..|JF.77LJ-J-||
|
|
||||||
L-FFF77|-LJLJL---7|JL-7F7F7F7||FJF7L------7|F7FJ|FJ-LJ||||||7F-J||||L7LJ|L7FJFJ|F7LJLF-JL7-||LJ7L----7F---JLJF7|JF7|||F-----7.F7FF7FJ-|...||
|
|
||||||
|7|FJL-7-F-7F7F7FJL7F-J|||||LJLJFJL-------JLJ|L7LJLF7FJ|||||FJF7|LJ|FJF-JFJL7L-7|L--7L7F7L7LJF------7|L7F----J|L-JLJL-JF-7F-J-|L-J|JL-J7.F-7
|
|
||||||
---L7F-J7|FJ||||L-7|L--JLJ||F7F7L7F---------7L-J|F-JLJFJ||||L7|||F-J|FJF7|F-JF7|L--7L-J||FJF7|F----7|L-JL--7F7L--7F7F7FJ.|L-7-|F--J7J|LF-J-F
|
|
||||||
L7LFJ|F7-|L-JLJL--JL7F7|F7LJ|||L7LJF----7F-7L---7L7F7FJ|||||L||||L-7|L-J||L-7|||F--JF7FJ||FJ|||F---JL------J||LF7LJLJLJF7L7FJFJL-7LF-7LL7FF7
|
|
||||||
FL-L7|||F|F7F-7F7F-7LJL-J|7FJ||FJF7L---7|L7|F7F-J.|||L-7|||L7|||L7FJL-7FJ|F-J|||L7F7|LJFJLJFJLJL7F7F--7F----JL-JL----7L|L7LJFJF--J7|FJ.LLLLJ
|
|
||||||
LLF-JLJL-J|LJFJ|||FL-7F-7L7L7LJL-JL----JL7|LJLJF-7LJL7FJ|||FJ||L-J|F--J|FJL7FJ|L7||||F-JF7FJLFF7LJLJF7||F------------JFJFJF7L7|JFLFF|J.L|7L|
|
|
||||||
F-L---7F7FJF7L7|||F--JL7L7L-JF-7F7F--7F7FJL---7|FJF7FJ||LJ|L7LJJF7|L--7||7F|L7L7||||||F7|||F7FJL-7JFJLJ|L-----7F7LF7F7L7L7|L7|L77FF7|LF.F--|
|
|
||||||
L77LJLLJ||FJL-J||||F---J||F-7|FLJLJF-J||L7F--7LJL-J|L7|F-7|FJF--JLJF7FJ|L7FJFJFJ|LJ|||||||LJ||F-7L-JF-7|LF7F7FJ|L-JLJL7|FJ|FJ|FJFLF7F7|L.FL|
|
|
||||||
F-LJFLLFJ|L-7F7|||LJF----JL7||F----JF7|L7|L-7|F---7L7|LJFJ|L7|F7F--J||-L7|L7L7|FJF-J|||LJ|F-JLJ||F-7L7||FJLJLJJ|F--7F-J|L-JL-J|F7F|LJL7FFLJJ
|
|
||||||
||LFJ-LL7L7FJ|||LJFFJF7F7F7||||F-7F7|||FJL-7||L--7L-JL--J.L-J|||L--7|L-7|L7|FJLJJ|F7|||F-JL7F---J|FJFJLJL------JL7FJL--JF----7LJL-JF7FJJJJJ|
|
|
||||||
F7|JFF|.L-JL7|LJ7F7L-J||LJ||LJLJFLJLJLJ|FF7LJL---JF-----77L-FJ|L7F7||F7|L7|||JFF-J|||LJ|F--JL----JL7L7LF7F7F-7F7FJL-----J.F-7L-7F7FJLJJJ..|J
|
|
||||||
|L--|FFF---7||F--JL---J|F-J|F-7F7F-----JFJL7F--7F7|F---7L7|||FJFLJ||||LJ|LJLJ77L-7|LJF7LJF--7LF7F77L-JFJLJLJ.LJLJF7F-7F--7|FJF7LJLJJ|J-7-7..
|
|
||||||
J|LF-7.L--7LJ||F7F7F-7FJL--JL7|||L---7F7|F-J|F7LJLJ|F7LL7L7-||.J|LLJLJ7.-JJLFF---J|F-JL--JF7L-J|||F--7L----7F7F--JLJFJ|F-J|L-JL-7JJJ|JF7JFJ7
|
|
||||||
|F-JF-JL|FJF-J||LJLJFJL7.F7F-JLJL-7F7LJLJ|F7||L---7LJL7JL-J7LJ7.FF|-J--7LF-7-L-7F7|L--7F7FJL7F7LJ|L7FJJF---J|LJF7F7FJF|L--JF---7L77FF7JJFFJJ
|
|
||||||
LL7.LJ|FFJFJF-J|F---JF7|FJ|L-7F7F7LJL---7LJ||L---7L--7L---7-..F-F|.LJ7LL.7J||LLLJ|L--7||LJF7LJ|F7L-JL--JF---JF7||||L--JF--7L-7|L7L-7||J.J.77
|
|
||||||
J..F|.|LL7|JL-7|L----JLJ|FJF-J|||L-----7L7FJ|F---JF-7|F---J-F|..L|L.|L..F|-||F7F-JF7FJLJF-JL-7LJL--7F---JF---JLJLJL7F7FJF7L-7L-7|F7LJ|JL.7L-
|
|
||||||
.FF-J.|FJ||J.F||F-----7L||FJF-JLJF--7F7L7|L-JL----JFJ|L-77JL7J--J|FFF7|.L|-|-F-|F-J||F-7L---7|JF7F7LJF7F7L-----7F7-||LJ7|L-7|F-JLJ|F-J|.FL-J
|
|
||||||
FF|-7.-JFLJ.FLLJL----7L-JLJFJ|F-7L-7LJL-J|F-7F-7F7FJ-L-7L-7J|...F7F7|FL7-JJL7J|LJJ|LJL7L-7F7||FJLJL--JLJL-----7LJL7|L---JF-J|L--7||L7J7--JJ|
|
|
||||||
L-7--JLLJL|.J.F77F7F-JF7F--JF-JFJF7L----7|L7LJFJ|LJF7F7L--J-L.|.FJ|L77..7J.FF.FLJ.J7.|L-7LJLJ|L7F7F--7F------7|F--J|F-7F7L-7L---J-L-JJ|-7.F7
|
|
||||||
FL77L||.F--J-FJL-JLJF7|||F--JF7L-JL-----J|FJF7L-JF-J||L-7J.LL7L-JL..L-J7..JFLF-|FJ.|.F7FJF7F7L7LJ||F-J|F--7F-JLJF7LLJFJ||F7L7F7||7||.L--7.-7
|
|
||||||
JJL7-77.JJLJ.L7F---7|LJLJL---JL---------7|L-JL7-FJF-J|F-J.|.|L-|FL--77|7F7F7||.|7F-F-J|L-JLJL7|F7LJL-7||F7LJF7F7||F-7|FJ||L7LJL-7-7-7-L7J-L|
|
|
||||||
|.-7L||-J--JFFLJF--J|F--------------7F--JL7F-7L7|FJF7||F-7F-77FJ7J|7JF7JJFL-7J-7F77|F7L------JLJL7JF7LJLJL--JLJLJLJFJLJ-LJFJF7F-J.|||..L-..F
|
|
||||||
77|J.LF-J|.|LFF7L--7|L---7F7F-7F7F-7LJF7F7LJFL7LJL7|||LJFJ|FJF7|L777JFJ|FL7F|7..L|-LJL-7F------7FJFJL7F-7F-7F------JF7F--7L-J|L7J77F7-|.||FJ
|
|
||||||
LFL-77|.F7-FF7||JF7LJ7F77LJLJLLJLJ|L--JLJL7F-7L---J|||F-JFJL-J|J.JLJJ|||F|JLJF-JLJ7L7|FLJ7F----JL-JF-JL7LJJLJ|F7F---JLJF-JJF7L-J-7-7F7FL7.FL
|
|
||||||
FF|7|FL|--F-JLJ|FJL---J|F7F7.F------------J|FJ.F--7||||F7L7F--J7F7F7F-L-77FFJJJJFLL7|JFF-7L-7F7F7F7L-77L-7F7F7|LJF-----JF7FJL7F-77J|-F|7|FJJ
|
|
||||||
||L|--.JJ|L---7LJF7F--7LJLJL7L---------7FF7|L7FJF-J||||||.|L--77.|LL7-J-7--|||-F|||-.L|L7|F7LJLJ|||F7L-77LJLJLJF7|7F7-F7|||F-J|FJF7LF-|F7J7.
|
|
||||||
-LJ||.LL7F|JLLL--JLJ7FJF-7F7L7F--------JFJLJFJL7|JFJLJLJL-JF--JJ7L-7J-|-FJ..|7.-|F|77|F-J|||F7F-J||||F7L7F--7F7||L-JL-JLJLJL--JL-JL7|LJ-J.L7
|
|
||||||
|F-|-J.FF7L7F||F7F---JFJFLJ|FJL7F--7F7F7|F--JF7|L-JF--7F7F-JJJL-JF|--.7L|.7FL--.L|FF-7L-7LJLJ|L--JLJLJL7|L-7|||||F--------7F----7F-J-FLJ-7-|
|
|
||||||
F7||-F-F-JJF7-FJLJF--7L7F--JL7JLJF7LJLJ|||-F7|LJF-7L-7|||L-7.7JFLFJ-7FJ7|7L7--LF7F7L7L-7L---7|F7F--7F--JL--JLJLJLJF---7LF7LJF7F7||F77JF-7-F7
|
|
||||||
7JF|.L--7J7F7-L--7|F-JFJL--7FJF7F||F---J|L7|LJF-JFL--JLJL--JF7.|J|.|F7F7JFJL|.F||||-|F-J|F--JLJ||F7|L--7F---7F7F7FL-7FJFJL--JLJ|LJ||F7FL7JJ|
|
|
||||||
..F--77JJFFFJJ|.LLJL--JF---JL-JL-JLJF7F-JFJ|F7L--------7F7F7|L7JFLFLJL7L-F--LF-J|||FJL-7FJF7F-7|LJ||F7JLJF--J|LJL7F-JL-JF7F7F-7L--JLJL7FJJF-
|
|
||||||
L7|L|LJ.77F77LF7F---7F7L--7F7F-7F---J||F7|J||L-------7FJ|LJLJFJFF-L7JF7FL|.LLL-7LJ|L--7|L-JLJL||F7||||F--JF7FJF7FJ|F---7|||LJF|F-7F--7|-J.LJ
|
|
||||||
.F|7|L-F--|L7FJ|L--7||L--7LJLJ7LJF---J||LJFJL-------7LJFJF7F-J.L77LJ.-77-LJ..|7L7FJF--JL-7F7JFJLJLJ|||L---JLJFJLJ-||F-7|||L--7LJ-LJJLLJJF7-F
|
|
||||||
FF.JJ7|LJ-L7|L7|F7FJ||F-7L-------JF7|FJL--JF-7F--7F7L7FJFJLJJF7JJL|J77.F7JFFF-7FJL7L----7LJL7L----7||L-------J|F7FJLJFJLJL7F7|.F7F7|.||.---J
|
|
||||||
FJ-|7F-7F|L|L-J|||L7|LJFJF7F7F7F-7|L-JF7F-7|FJL-7LJL-JL7L7F--JL-7.77F7-|J|FJ|FJL7FJF---7L--7L-7F7FJLJF-7F7F-7F7|||F--JF--7LJ|L-JLJL7-777-|-7
|
|
||||||
|J-77|J|F7JL7F7LJL-JL7.L-JLJLJLJJLJF--JLJ|LJL7F7L7F7-F-JFJL7F---JF7FJL--7F7FJ|F7|L7L--7|F7FJF7LJLJF-7|FJ|||FJ||||||.F7L7FJF7L7F7F7FJ.J..F||F
|
|
||||||
|LFJFJ7LF--FJ||F7F-7FJF7F7F-7F-----JF7F7F-7F7||L7LJL7L7FJF7|L-7F7|LJF7F-J||L7LJLJFJF7J|LJLJFJ|F7F7|.LJL-JLJL-JLJLJL-JL7|L-JL7LJ||LJLF.FF7LL|
|
|
||||||
|-7F|JF.LL.L7|LJLJFJL-JLJ|L7|L------JLJ|L7LJ|LJLL---JFJL7|||F-J|||F-JLJF7||LL--7FJFJL7|F7F7L7||||LJF7F7F7F7F7F-7F7F7F7LJF7F7L7FJL7F--7-.|7|F
|
|
||||||
J||FF7..-7FLLJF---JF----7L-JL----------JFJF7L------7FL7FJ||||F7|LJL-7F7||||F7F-JL7L7FJLJLJ|FJLJLJ.FJLJLJLJLJ||F|||||||F7|LJ|FJL-7LJF-JFF7JF-
|
|
||||||
J-|L--|7LL7J|-L----JF--7L------------7F-JFJL7F-7F--JF7|L7|LJ||||F---J|||LJ|||L7F7L7|L-7F7|LJF-----JF-7F----7|L7LJ||LJ|||L-7||F-7|F7|7.LJJ7||
|
|
||||||
||JLJ7|F.|J.F-F-----JF7L-------------J|F-JF7LJJ||F-7|||FJ|F-J|||L7F-7||L7FJ||-||L7||F-J||F7JL-7F7F7|FJ|LF--JL7L-7|L-7LJ|F-J|LJFJ|||L-7.FJJ7L
|
|
||||||
FF7-7|F7FF77.FL--7F7FJL7F------7F--7F7|L--JL--7||L7|||||F|L7FJ||FJ|FJ|L-J|FJL7||FJ||L-7|LJL--7LJLJLJL7L7L-7F7L--JL--JF7LJF7L7FJL|||F-J-F|FFJ
|
|
||||||
F-J-7-7||-L7-F--7LJ|L-7||F-----J|F7LJLJF--7F--J||FJ||||L7|FJL7LJL7|L-JF--JL7FJLJL7LJF-JL---7FJLF-7F--JFJF-J|L--------JL--JL7|L-7LJLJJJJLL-7|
|
|
||||||
77F.|LFJJL-|JL-7|F7L--J||L------J||F7F7L-7LJF77||L7||LJFJ||F7|F--J|F--JF-7||L--77L-7L7F-7F7||F-JFJL--7L7L--JF--------------JL--J-|JJ|-FJJ.FJ
|
|
||||||
|L-.LF-J7JF7-F-JLJ|F--7LJF--7F7|FJLJ|||F7L7-|L7LJFJLJF7|FJ||LJL---JL--7L7|FJF--JF--JFJL7LJ||||F-J|F-7L-JF---JF7F----7|F7LF--7.F7F|J.|7L77-L7
|
|
||||||
J-J7.LJL--F--JF--7|L7FJF7L-7|||FJF-7LJLJL7L7|FJF7|F--J||L7||F---------JFJ|L7|LF7L--7|F7L-7LJ||L--7L7L-7|L----JLJF---JFJL-JF-JFJL7--F7|LJL77|
|
|
||||||
L-J777-F|LL---JF-J|FJL7||F-JLJLJFJ.L----7L-J|L7|LJL--7LJJ||||F--7F7.F7FL7|FJL7||F7FJLJ|F-JF7|L-7FJFJF7L----7F---JF7JFJF-7FJF7L7FJLFJ|7JLFFFL
|
|
||||||
FFJFFJ7-F.|FF--JF7|L7FJ||L---7F7|F7F----JJF7L7|L7F---JF-7||||L7FJ|L7||F7|||F-J|LJ|L-7FJL--J||F7||JL-JL----7|L----JL7|FJ|LJ7||FJL-7L7|--77FJ.
|
|
||||||
FJ-LL.L7F--7|F--J||FJ|.|L----J|LJ|LJ|F7-F7||FJ|FJL-7F7L7LJLJL7|L7L7LJ||||||L-7|F7|F7||F7F--J||||L7F-7F7F7FJL7F--7F7LJL77F-7|||F--J-||J-JF7L.
|
|
||||||
|F-F7FFLL7|F||F--J|L7L7L-----7L7FJF--JL7|||LJFJL7F-J|L7L7F-7FJL7|FJF-J|LJLJF-JLJ||||||||L7F7||||FJL7LJLJLJF-JL7.|||F-7L7L7LJLJ|F7F7||J|FL7J7
|
|
||||||
F7J.L7|-JLLLLJL7F7L-JFJF7F7F-JFJL-JF---J|||F7L--J|F7|FJ|LJFJ|7FJ||FJF-JF---JF-7FJ||||LJ|FLJ|||LJL7FJF7F--7L--7L7LJLJ.L7L7|F---J||||||F-7.7J|
|
|
||||||
LJ-F-FJJ--J-L|LLJL7F7L-J||||F7|F---JF7F7||LJL-7F7||||L7-F7L7L7L7|||J|F-J-F7FJFJL7|||L7FJF7FJ||F--JL-JLJF7L--7L7L-----7L7LJL-7F7|||||||FJ7L7.
|
|
||||||
LFFF7JF-7J|-FJ-F--J||F-7LJ|LJLJL----JLJLJ|F7F7||LJ|LJFJFJ|.L7L7||||FJL7F7|||FJF-J||L7|L7||L7LJ|.F-7-F--JL---JFJF-7F--J|L7F--J|||LJLJLJL-7L||
|
|
||||||
.|J.77|F7F-.|--L-7FJLJJL-7|F7F7F--------7||LJ|||F7L7FJ-|FJF7L7LJ|||L-7LJ|||||FL-7||FJ|FJ||-L-7L7L7L7L----7.F7L-J7LJLF7-FJL---JLJF7F-7F7FJ.L-
|
|
||||||
F.|7|-F|F--|.L|F-J|F7F-7FJLJLJLJF---7F-7LJL-7||LJ|FJ|F7||FJL7L-7|||F-JF-J|||L7F7|||L7|L7||F7FJFJFJFJLF--7L-JL-------JL7L-7F---7FJLJ.LJLJ|FF|
|
|
||||||
|7L-J.LJ7J||-FFJF-J||L7|L-7F7F7FJF--J|FJF7F7|||F-J|FJ||||L7FJF7||||L7FJF7||L7||||||FJL7|||||L7|LL7|F7L7FJF-------7F7F7L7-||F-7LJF-7F77LL|7-F
|
|
||||||
FFL7|FFJLF|.|L|FJF-JL-JL--J||||||L--7||FJ|||||||F-J|FJ||L7|L7|LJLJL7|L7|||L7|||||||L7FJ||||L7||F7||||FJ|FJF----7.LJ||L-JFJLJFJ|FJFJ||7LL|J.7
|
|
||||||
F|L|-|7J-J|FL7LJ7L--------7|LJLJF7F7|||L7||||||||F-J|-||FJL7|L-7F--J|FJ|LJFJ||||||L7||FJ|||FJ|LJ|||||L7|L-JF--7L--7|L7F7|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FL|FLL-LL--------7|LJL7LJF-J-LJ||||L7||L7L7F7L-7F7|FJL7FJLJ|||||L7||||L7||LJF7LL--JF7-||LJ|L-7L7FJ|L-7|F7L7||F--JF-7F7FJJ|J-F7--J777
|
|
||||||
FLJ.LLJJ7L|7.LF7F7F------JL---JF7L-7|F-J|LJF|||FJFJ||F7||LJL7FJ|F--J||L-7LJLJ|FJ|L--JL7F---J|FJL-7|F7|-LJFJF7||||FJ|LJF7FJ||||L7FL-F|L|F7L-L
|
|
||||||
LJL|.FL.|LL.FF|LJLJF7F7F7F---7FJL-7|FJF7L--7|||L7|FJ||LJ|F7FJL7|L--7||F7L7F--JL7L7F-7FJL7F-7LJF--J|||L--7L7|LJ|||L7|F7||L-7LJL-J-||FJFJL-JLL
|
|
||||||
|J-|JJ|-F7|LFFJF7F7|||||||F7F|L--7|||FJ|F--J||L7||L7|L7FJ|||.FJ|F--J||||FJL--7FJFJL7LJ.FJL7|F7L--7||L7F-JL|L-7||L7||||||F7L----7|L|.F||F7||J
|
|
||||||
|.|F7JL7|FFJFJFJLJLJ||LJLJ|L-JF7FJLJ||F|L--7||FJ|L7||FJ|FJ|L7|FJL--7|LJ||F7F7||JL-7L-7FJF-J||L7F-J||F|L--7|F7|||FJ|||LJ|||F---7|J.-7.F7.F7|.
|
|
||||||
F7-LL.LJLJL7L-JF7F--J|F---JF7FJ||F7-LJFJF-7||||FJFLJ||-|L7L7|LJF---JL-7|||LJLJL7F7|F7||FJ.FJL7|L7FJ|FJF--JLJ||||L7||L-7LJ|L--7LJJ7LL7L7FFJ-J
|
|
||||||
.|JJL7.7|FFLF--JLJF7FJL-7F-J||L||||F--JFJJ||||||F---JL7L7L7||F7|F-7F7FJ||L-7F7FJ||LJLJ||F-JF-JL7||FJL7L----7||||FJ||F-JF-JF-7L-7.|7.|-|FJ.L.
|
|
||||||
|..FFLLJF7JJ|F-7F-J|L7F-J|F-JL7LJ|LJF7FJF-J|LJ||L7F7F7L7L-JLJ|LJ|FJ||L7|L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.|||FJF|J..|-LJF-L|7L|-7L|7L7J-JJ.L-J-||-|-LJ|LLF
|
|
||||||
LJ-F---J.F7|77JFL-||-F7||-J-LJ-FJLJF-7|F|F-JFFJ|.F--7-LJ|LFL|-7||JFF-|LF.JL|FJ7FFJL7J-|7L77F|FFJJ|7..LL-J.777F7F|JF-77J|LFFF77FL|LL-|-.LJJJ|
|
|
||||||
.|JF|-L|.J7LJJ77|F7|7F--|-|JL7-L7LFFJ-77-J|F-JFJ7JF|J|7|F-|7|-L|||F7.|L7-F|LJJ7-|7.|FLLF7LL-FFJ|.-L--7.LF||F-J.L|F7.L7F7.F7LLJ7J|F|-|J|L|L77
|
|
||||||
F-7|L77L..F-J7F---7J7||.|-F.LL7.|F7.JL|F7LF|-FF-LF7|-7-|.L--|...FL|L-JFF-J-.|.7F||JF||.FL7L.7||L7JJ-7FF-7|F|-|-LF--J7L7LL7JL||LF|F--LJ|-FJ|7
|
|
||||||
L|L--JJJ-LLJ-FF.JJLLJ7-L7-JLJJ|-.F7..-|LJ.FJ.|J..L7J.L-.--JL|.-FJ-L-LL.|.JJ-FJ.F|JLLJF-7J7JJJ|7JLJ..FL--JJ-77L7.|JLL-JL-L.LL-|7-L|J.LLL-L-|.
|
|
223
day10/main.go
223
day10/main.go
|
@ -3,240 +3,23 @@ package main
|
||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
|
||||||
|
|
||||||
aoc "go.sour.is/advent-of-code-2023"
|
aoc "go.sour.is/advent-of-code-2023"
|
||||||
)
|
)
|
||||||
|
|
||||||
var log = aoc.Log
|
|
||||||
|
|
||||||
func main() { aoc.MustResult(aoc.Runner(run)) }
|
func main() { aoc.MustResult(aoc.Runner(run)) }
|
||||||
|
|
||||||
type result struct {
|
type result struct {
|
||||||
valuePT1 int
|
valuePT1 uint64
|
||||||
valuePT2 int
|
valuePT2 uint64
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r result) String() string { return fmt.Sprintf("%#v", r) }
|
func (r result) String() string { return fmt.Sprintf("%#v", r) }
|
||||||
|
|
||||||
func run(scan *bufio.Scanner) (*result, error) {
|
func run(scan *bufio.Scanner) (*result, error) {
|
||||||
m := Path{s: -1}
|
|
||||||
for scan.Scan() {
|
for scan.Scan() {
|
||||||
text := scan.Text()
|
text := scan.Text()
|
||||||
_ = text
|
_ = text
|
||||||
|
|
||||||
m.readLine(text)
|
|
||||||
}
|
}
|
||||||
dist := m.buildPath()
|
return &result{}, nil
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return &result{valuePT1: dist}, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
type node struct {
|
|
||||||
value rune
|
|
||||||
pos int
|
|
||||||
whence int8
|
|
||||||
left, right *node
|
|
||||||
}
|
|
||||||
|
|
||||||
func (n *node) add(a *node) *node {
|
|
||||||
if a == nil {
|
|
||||||
return n
|
|
||||||
}
|
|
||||||
n.left, a.right = a, n
|
|
||||||
return a
|
|
||||||
}
|
|
||||||
|
|
||||||
func (n *node) String() string {
|
|
||||||
return fmt.Sprintf("node %s from %s", string(n.value), enum(n.whence))
|
|
||||||
}
|
|
||||||
|
|
||||||
type Path struct {
|
|
||||||
m []rune
|
|
||||||
w int
|
|
||||||
s int
|
|
||||||
l int
|
|
||||||
n *node
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *Path) readLine(text string) {
|
|
||||||
if m.w == 0 {
|
|
||||||
m.w = len(text)
|
|
||||||
}
|
|
||||||
if m.s == -1 {
|
|
||||||
if i := strings.IndexRune(text, 'S'); i != -1 {
|
|
||||||
m.s = i + len(m.m)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
m.m = append(m.m, []rune(text)...)
|
|
||||||
}
|
|
||||||
func (m *Path) buildPath() int {
|
|
||||||
m.start()
|
|
||||||
log(m.n)
|
|
||||||
i := 0
|
|
||||||
for m.next() {
|
|
||||||
log(m.n)
|
|
||||||
i++
|
|
||||||
}
|
|
||||||
log(m.n)
|
|
||||||
log("length", (m.l+2)/2)
|
|
||||||
return (m.l+2)/2
|
|
||||||
}
|
|
||||||
func (m *Path) start() {
|
|
||||||
m.n = &node{value: 'S', pos: m.s}
|
|
||||||
log(m.n)
|
|
||||||
|
|
||||||
switch {
|
|
||||||
case m.peek(UP) != nil:
|
|
||||||
m.n = m.n.add(m.peek(UP))
|
|
||||||
case m.peek(DN) != nil:
|
|
||||||
m.n = m.n.add(m.peek(DN))
|
|
||||||
case m.peek(LF) != nil:
|
|
||||||
m.n = m.n.add(m.peek(LF))
|
|
||||||
case m.peek(RT) != nil:
|
|
||||||
m.n = m.n.add(m.peek(RT))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
func (m *Path) next() bool {
|
|
||||||
var n *node
|
|
||||||
switch m.n.value {
|
|
||||||
case '7':
|
|
||||||
if m.n.whence == LF {
|
|
||||||
n = m.peek(DN)
|
|
||||||
} else {
|
|
||||||
n = m.peek(LF)
|
|
||||||
}
|
|
||||||
case '|':
|
|
||||||
if m.n.whence == UP {
|
|
||||||
n = m.peek(DN)
|
|
||||||
} else {
|
|
||||||
n = m.peek(UP)
|
|
||||||
}
|
|
||||||
case 'F':
|
|
||||||
if m.n.whence == RT {
|
|
||||||
n = m.peek(DN)
|
|
||||||
} else {
|
|
||||||
n = m.peek(RT)
|
|
||||||
}
|
|
||||||
case '-':
|
|
||||||
if m.n.whence == LF {
|
|
||||||
n = m.peek(RT)
|
|
||||||
} else {
|
|
||||||
n = m.peek(LF)
|
|
||||||
}
|
|
||||||
case 'J':
|
|
||||||
if m.n.whence == LF {
|
|
||||||
n = m.peek(UP)
|
|
||||||
} else {
|
|
||||||
n = m.peek(LF)
|
|
||||||
}
|
|
||||||
case 'L':
|
|
||||||
if m.n.whence == RT {
|
|
||||||
n = m.peek(UP)
|
|
||||||
} else {
|
|
||||||
n = m.peek(RT)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if n == nil {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
m.n = m.n.add(n)
|
|
||||||
m.l++
|
|
||||||
return m.n.value != 'S'
|
|
||||||
}
|
|
||||||
|
|
||||||
const (
|
|
||||||
ST int8 = iota
|
|
||||||
UP
|
|
||||||
DN
|
|
||||||
LF
|
|
||||||
RT
|
|
||||||
)
|
|
||||||
|
|
||||||
func enum(e int8) string {
|
|
||||||
switch e {
|
|
||||||
case ST:
|
|
||||||
return "ST"
|
|
||||||
case UP:
|
|
||||||
return "UP"
|
|
||||||
case DN:
|
|
||||||
return "DN"
|
|
||||||
case LF:
|
|
||||||
return "LF"
|
|
||||||
case RT:
|
|
||||||
return "RT"
|
|
||||||
default:
|
|
||||||
return "XX"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *Path) peek(d int8) *node {
|
|
||||||
switch d {
|
|
||||||
case UP:
|
|
||||||
x, y := toXY(m.n.pos, m.w)
|
|
||||||
if y == 0 {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
p := fromXY(x, y-1, m.w)
|
|
||||||
r := m.m[p]
|
|
||||||
if any(r, '7', '|', 'F') {
|
|
||||||
return &node{value: r, whence: DN, pos: p}
|
|
||||||
}
|
|
||||||
case DN:
|
|
||||||
x, y := toXY(m.n.pos, m.w)
|
|
||||||
if y == m.w {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
p := fromXY(x, y+1, m.w)
|
|
||||||
r := m.m[p]
|
|
||||||
if any(r, 'J', '|', 'L') {
|
|
||||||
return &node{value: r, whence: UP, pos: p}
|
|
||||||
}
|
|
||||||
|
|
||||||
case LF:
|
|
||||||
x, y := toXY(m.n.pos, m.w)
|
|
||||||
if x == 0 {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
p := fromXY(x-1, y, m.w)
|
|
||||||
r := m.m[p]
|
|
||||||
if any(r, 'F', '-', 'L') {
|
|
||||||
return &node{value: r, whence: RT, pos: p}
|
|
||||||
}
|
|
||||||
|
|
||||||
case RT:
|
|
||||||
x, y := toXY(m.n.pos, m.w)
|
|
||||||
if x == m.w {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
p := fromXY(x+1, y, m.w)
|
|
||||||
r := m.m[p]
|
|
||||||
if any(r, '7', '-', 'J') {
|
|
||||||
return &node{value: r, whence: LF, pos: p}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func fromXY(x, y, w int) int { return y*w + x }
|
|
||||||
func toXY(i, w int) (int, int) {
|
|
||||||
return i % w, i / w
|
|
||||||
}
|
|
||||||
func any[T comparable](n T, stack ...T) bool {
|
|
||||||
var found bool
|
|
||||||
for _, s := range stack {
|
|
||||||
if n == s {
|
|
||||||
found = true
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return found
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,94 +9,26 @@ import (
|
||||||
"github.com/matryer/is"
|
"github.com/matryer/is"
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:embed example1.txt
|
//go:embed example.txt
|
||||||
var example1 []byte
|
var example []byte
|
||||||
|
|
||||||
//go:embed example2.txt
|
|
||||||
var example2 []byte
|
|
||||||
|
|
||||||
//go:embed example3.txt
|
|
||||||
var example3 []byte
|
|
||||||
|
|
||||||
//go:embed example4.txt
|
|
||||||
var example4 []byte
|
|
||||||
|
|
||||||
//go:embed example5.txt
|
|
||||||
var example5 []byte
|
|
||||||
|
|
||||||
//go:embed input.txt
|
//go:embed input.txt
|
||||||
var input []byte
|
var input []byte
|
||||||
|
|
||||||
func TestExample1(t *testing.T) {
|
func TestExample(t *testing.T) {
|
||||||
is := is.New(t)
|
is := is.New(t)
|
||||||
scan := bufio.NewScanner(bytes.NewReader(example1))
|
scan := bufio.NewScanner(bytes.NewReader(example))
|
||||||
|
|
||||||
result, err := run(scan)
|
result, err := run(scan)
|
||||||
is.NoErr(err)
|
is.NoErr(err)
|
||||||
|
|
||||||
t.Log(result.valuePT1)
|
t.Log(result.valuePT1)
|
||||||
is.Equal(result.valuePT1, 4)
|
is.Equal(result.valuePT1, uint64(0))
|
||||||
|
|
||||||
t.Log(result.valuePT2)
|
t.Log(result.valuePT2)
|
||||||
is.Equal(result.valuePT2, uint64(0))
|
is.Equal(result.valuePT2, uint64(0))
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestExample2(t *testing.T) {
|
|
||||||
is := is.New(t)
|
|
||||||
scan := bufio.NewScanner(bytes.NewReader(example2))
|
|
||||||
|
|
||||||
result, err := run(scan)
|
|
||||||
is.NoErr(err)
|
|
||||||
|
|
||||||
t.Log(result.valuePT1)
|
|
||||||
is.Equal(result.valuePT1, 8)
|
|
||||||
|
|
||||||
t.Log(result.valuePT2)
|
|
||||||
is.Equal(result.valuePT2, uint64(0))
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestExample3(t *testing.T) {
|
|
||||||
is := is.New(t)
|
|
||||||
scan := bufio.NewScanner(bytes.NewReader(example3))
|
|
||||||
|
|
||||||
result, err := run(scan)
|
|
||||||
is.NoErr(err)
|
|
||||||
|
|
||||||
t.Log(result.valuePT1)
|
|
||||||
is.Equal(result.valuePT1, 23)
|
|
||||||
|
|
||||||
t.Log(result.valuePT2)
|
|
||||||
is.Equal(result.valuePT2, 4)
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestExample4(t *testing.T) {
|
|
||||||
is := is.New(t)
|
|
||||||
scan := bufio.NewScanner(bytes.NewReader(example4))
|
|
||||||
|
|
||||||
result, err := run(scan)
|
|
||||||
is.NoErr(err)
|
|
||||||
|
|
||||||
t.Log(result.valuePT1)
|
|
||||||
is.Equal(result.valuePT1, 70)
|
|
||||||
|
|
||||||
t.Log(result.valuePT2)
|
|
||||||
is.Equal(result.valuePT2, 8)
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestExample5(t *testing.T) {
|
|
||||||
is := is.New(t)
|
|
||||||
scan := bufio.NewScanner(bytes.NewReader(example5))
|
|
||||||
|
|
||||||
result, err := run(scan)
|
|
||||||
is.NoErr(err)
|
|
||||||
|
|
||||||
t.Log(result.valuePT1)
|
|
||||||
is.Equal(result.valuePT1, 80)
|
|
||||||
|
|
||||||
t.Log(result.valuePT2)
|
|
||||||
is.Equal(result.valuePT2, 10)
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestInput(t *testing.T) {
|
func TestInput(t *testing.T) {
|
||||||
is := is.New(t)
|
is := is.New(t)
|
||||||
scan := bufio.NewScanner(bytes.NewReader(input))
|
scan := bufio.NewScanner(bytes.NewReader(input))
|
||||||
|
@ -105,11 +37,8 @@ func TestInput(t *testing.T) {
|
||||||
is.NoErr(err)
|
is.NoErr(err)
|
||||||
|
|
||||||
t.Log(result.valuePT1)
|
t.Log(result.valuePT1)
|
||||||
t.Log(result.valuePT1 != 51)
|
is.Equal(result.valuePT1, uint64(0))
|
||||||
is.Equal(result.valuePT1, 6649)
|
|
||||||
|
|
||||||
t.Log(result.valuePT2)
|
t.Log(result.valuePT2)
|
||||||
is.Equal(result.valuePT2, uint64(0))
|
is.Equal(result.valuePT2, uint64(0))
|
||||||
}
|
}
|
||||||
|
|
||||||
// first: 51 false
|
|
||||||
|
|
12
tools.go
12
tools.go
|
@ -5,7 +5,6 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strconv"
|
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -52,7 +51,6 @@ func Reverse[T any](arr []T) []T {
|
||||||
type integer interface {
|
type integer interface {
|
||||||
int | int8 | int16 | int32 | int64 | uint | uint8 | uint16 | uint32 | uint64
|
int | int8 | int16 | int32 | int64 | uint | uint8 | uint16 | uint32 | uint64
|
||||||
}
|
}
|
||||||
|
|
||||||
// type float interface {
|
// type float interface {
|
||||||
// complex64 | complex128 | float32 | float64
|
// complex64 | complex128 | float32 | float64
|
||||||
// }
|
// }
|
||||||
|
@ -86,13 +84,3 @@ func LCM[T integer](integers ...T) T {
|
||||||
|
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
func ReadStringToInts(fields []string) []int {
|
|
||||||
arr := make([]int, len(fields))
|
|
||||||
for i, s := range fields {
|
|
||||||
if v, err := strconv.Atoi(s); err == nil {
|
|
||||||
arr[i] = v
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return arr
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user