diff --git a/d01/input.txt b/2015/d01/input.txt similarity index 100% rename from d01/input.txt rename to 2015/d01/input.txt diff --git a/d01/main.go b/2015/d01/main.go similarity index 92% rename from d01/main.go rename to 2015/d01/main.go index d75f88d..c8f9f12 100644 --- a/d01/main.go +++ b/2015/d01/main.go @@ -1,7 +1,7 @@ package main import ( - "aoc2015/util" + "github.com/Magiczne/AdventOfCode/util" ) func part1(data string) int { diff --git a/d02/input.txt b/2015/d02/input.txt similarity index 100% rename from d02/input.txt rename to 2015/d02/input.txt diff --git a/d02/main.go b/2015/d02/main.go similarity index 96% rename from d02/main.go rename to 2015/d02/main.go index 1be3633..b27a0d6 100644 --- a/d02/main.go +++ b/2015/d02/main.go @@ -1,8 +1,9 @@ package main import ( - "aoc2015/util" "regexp" + + "github.com/Magiczne/AdventOfCode/util" ) type Present struct { diff --git a/d03/input.txt b/2015/d03/input.txt similarity index 100% rename from d03/input.txt rename to 2015/d03/input.txt diff --git a/d03/main.go b/2015/d03/main.go similarity index 96% rename from d03/main.go rename to 2015/d03/main.go index a586220..a959e9d 100644 --- a/d03/main.go +++ b/2015/d03/main.go @@ -1,8 +1,9 @@ package main import ( - "aoc2015/util" "fmt" + + "github.com/Magiczne/AdventOfCode/util" ) func part1(data string) int { diff --git a/d03/test-runs/0.txt b/2015/d03/test-runs/0.txt similarity index 100% rename from d03/test-runs/0.txt rename to 2015/d03/test-runs/0.txt diff --git a/d03/test-runs/1.txt b/2015/d03/test-runs/1.txt similarity index 100% rename from d03/test-runs/1.txt rename to 2015/d03/test-runs/1.txt diff --git a/d03/test-runs/2.txt b/2015/d03/test-runs/2.txt similarity index 100% rename from d03/test-runs/2.txt rename to 2015/d03/test-runs/2.txt diff --git a/d04/input.txt b/2015/d04/input.txt similarity index 100% rename from d04/input.txt rename to 2015/d04/input.txt diff --git a/d04/main.go b/2015/d04/main.go similarity index 93% rename from d04/main.go rename to 2015/d04/main.go index 0102e9a..b7ba1d5 100644 --- a/d04/main.go +++ b/2015/d04/main.go @@ -1,10 +1,11 @@ package main import ( - "aoc2015/util" "crypto/md5" "encoding/hex" "fmt" + + "github.com/Magiczne/AdventOfCode/util" ) func part1(data string) int { diff --git a/d05/input.txt b/2015/d05/input.txt similarity index 100% rename from d05/input.txt rename to 2015/d05/input.txt diff --git a/d05/main.go b/2015/d05/main.go similarity index 97% rename from d05/main.go rename to 2015/d05/main.go index 95214a0..647efa6 100644 --- a/d05/main.go +++ b/2015/d05/main.go @@ -1,10 +1,11 @@ package main import ( - "aoc2015/util" "fmt" "regexp" "strings" + + "github.com/Magiczne/AdventOfCode/util" ) func part1(data []string) int { diff --git a/d05/test-runs/0.txt b/2015/d05/test-runs/0.txt similarity index 100% rename from d05/test-runs/0.txt rename to 2015/d05/test-runs/0.txt diff --git a/d05/test-runs/1.txt b/2015/d05/test-runs/1.txt similarity index 100% rename from d05/test-runs/1.txt rename to 2015/d05/test-runs/1.txt diff --git a/d06/input.txt b/2015/d06/input.txt similarity index 100% rename from d06/input.txt rename to 2015/d06/input.txt diff --git a/d06/main.go b/2015/d06/main.go similarity index 97% rename from d06/main.go rename to 2015/d06/main.go index ff6e82d..2579a31 100644 --- a/d06/main.go +++ b/2015/d06/main.go @@ -1,8 +1,9 @@ package main import ( - "aoc2015/util" "regexp" + + "github.com/Magiczne/AdventOfCode/util" ) type Instruction struct { diff --git a/d07/input.txt b/2015/d07/input.txt similarity index 100% rename from d07/input.txt rename to 2015/d07/input.txt diff --git a/d07/main.go b/2015/d07/main.go similarity index 98% rename from d07/main.go rename to 2015/d07/main.go index 6f7b3e5..5bb7ef1 100644 --- a/d07/main.go +++ b/2015/d07/main.go @@ -1,10 +1,11 @@ package main import ( - "aoc2015/util" "fmt" "regexp" "strings" + + "github.com/Magiczne/AdventOfCode/util" ) func part1(instructions []string) uint16 { diff --git a/d08/input.txt b/2015/d08/input.txt similarity index 100% rename from d08/input.txt rename to 2015/d08/input.txt diff --git a/d08/main.go b/2015/d08/main.go similarity index 96% rename from d08/main.go rename to 2015/d08/main.go index 0169a12..69baa47 100644 --- a/d08/main.go +++ b/2015/d08/main.go @@ -1,7 +1,7 @@ package main import ( - "aoc2015/util" + "github.com/Magiczne/AdventOfCode/util" ) func part1(data []string) int { diff --git a/d08/test-runs/0.txt b/2015/d08/test-runs/0.txt similarity index 100% rename from d08/test-runs/0.txt rename to 2015/d08/test-runs/0.txt diff --git a/d09/input.txt b/2015/d09/input.txt similarity index 100% rename from d09/input.txt rename to 2015/d09/input.txt diff --git a/d09/main.go b/2015/d09/main.go similarity index 98% rename from d09/main.go rename to 2015/d09/main.go index 428af7b..9dbe2b1 100644 --- a/d09/main.go +++ b/2015/d09/main.go @@ -1,10 +1,11 @@ package main import ( - "aoc2015/util" "regexp" "slices" + "github.com/Magiczne/AdventOfCode/util" + mapset "github.com/deckarep/golang-set/v2" "github.com/dominikbraun/graph" ) diff --git a/d09/test-runs/0.txt b/2015/d09/test-runs/0.txt similarity index 100% rename from d09/test-runs/0.txt rename to 2015/d09/test-runs/0.txt diff --git a/d10/input.txt b/2015/d10/input.txt similarity index 100% rename from d10/input.txt rename to 2015/d10/input.txt diff --git a/d10/main.go b/2015/d10/main.go similarity index 95% rename from d10/main.go rename to 2015/d10/main.go index b3f85f3..c956c08 100644 --- a/d10/main.go +++ b/2015/d10/main.go @@ -1,8 +1,9 @@ package main import ( - "aoc2015/util" "fmt" + + "github.com/Magiczne/AdventOfCode/util" ) func lookAndSay(data string) string { diff --git a/d10/test-runs/0.txt b/2015/d10/test-runs/0.txt similarity index 100% rename from d10/test-runs/0.txt rename to 2015/d10/test-runs/0.txt diff --git a/d10/test-runs/1.txt b/2015/d10/test-runs/1.txt similarity index 100% rename from d10/test-runs/1.txt rename to 2015/d10/test-runs/1.txt diff --git a/d11/input.txt b/2015/d11/input.txt similarity index 100% rename from d11/input.txt rename to 2015/d11/input.txt diff --git a/d11/main.go b/2015/d11/main.go similarity index 97% rename from d11/main.go rename to 2015/d11/main.go index ae17c00..6474c31 100644 --- a/d11/main.go +++ b/2015/d11/main.go @@ -1,9 +1,10 @@ package main import ( - "aoc2015/util" "regexp" "strings" + + "github.com/Magiczne/AdventOfCode/util" ) var disallowedLettersRegex = regexp.MustCompile(`[iol]`) diff --git a/d12/input.txt b/2015/d12/input.txt similarity index 100% rename from d12/input.txt rename to 2015/d12/input.txt diff --git a/d12/main.go b/2015/d12/main.go similarity index 94% rename from d12/main.go rename to 2015/d12/main.go index 604cb20..891fb29 100644 --- a/d12/main.go +++ b/2015/d12/main.go @@ -1,10 +1,11 @@ package main import ( - "aoc2015/util" "os/exec" "regexp" "strings" + + "github.com/Magiczne/AdventOfCode/util" ) func part1(data string) int { diff --git a/d12/main.mjs b/2015/d12/main.mjs similarity index 100% rename from d12/main.mjs rename to 2015/d12/main.mjs diff --git a/d12/test-runs/1_0.txt b/2015/d12/test-runs/1_0.txt similarity index 100% rename from d12/test-runs/1_0.txt rename to 2015/d12/test-runs/1_0.txt diff --git a/d12/test-runs/1_1.txt b/2015/d12/test-runs/1_1.txt similarity index 100% rename from d12/test-runs/1_1.txt rename to 2015/d12/test-runs/1_1.txt diff --git a/d12/test-runs/1_2.txt b/2015/d12/test-runs/1_2.txt similarity index 100% rename from d12/test-runs/1_2.txt rename to 2015/d12/test-runs/1_2.txt diff --git a/d12/test-runs/1_3.txt b/2015/d12/test-runs/1_3.txt similarity index 100% rename from d12/test-runs/1_3.txt rename to 2015/d12/test-runs/1_3.txt diff --git a/d12/test-runs/2_0.txt b/2015/d12/test-runs/2_0.txt similarity index 100% rename from d12/test-runs/2_0.txt rename to 2015/d12/test-runs/2_0.txt diff --git a/d12/test-runs/2_1.txt b/2015/d12/test-runs/2_1.txt similarity index 100% rename from d12/test-runs/2_1.txt rename to 2015/d12/test-runs/2_1.txt diff --git a/d12/test-runs/2_2.txt b/2015/d12/test-runs/2_2.txt similarity index 100% rename from d12/test-runs/2_2.txt rename to 2015/d12/test-runs/2_2.txt diff --git a/d13/input.txt b/2015/d13/input.txt similarity index 100% rename from d13/input.txt rename to 2015/d13/input.txt diff --git a/d13/main.go b/2015/d13/main.go similarity index 97% rename from d13/main.go rename to 2015/d13/main.go index 0152a18..f4daaf2 100644 --- a/d13/main.go +++ b/2015/d13/main.go @@ -1,10 +1,11 @@ package main import ( - "aoc2015/util" "maps" "regexp" "slices" + + "github.com/Magiczne/AdventOfCode/util" ) func calculateMaxHappiness(data map[string]map[string]int) int { diff --git a/d13/test-runs/0.txt b/2015/d13/test-runs/0.txt similarity index 100% rename from d13/test-runs/0.txt rename to 2015/d13/test-runs/0.txt diff --git a/d14/input.txt b/2015/d14/input.txt similarity index 100% rename from d14/input.txt rename to 2015/d14/input.txt diff --git a/d14/main.go b/2015/d14/main.go similarity index 96% rename from d14/main.go rename to 2015/d14/main.go index 01711b5..bdc6350 100644 --- a/d14/main.go +++ b/2015/d14/main.go @@ -1,9 +1,10 @@ package main import ( - "aoc2015/util" "regexp" "slices" + + "github.com/Magiczne/AdventOfCode/util" ) type Reindeer struct { diff --git a/d14/test-runs/0.txt b/2015/d14/test-runs/0.txt similarity index 100% rename from d14/test-runs/0.txt rename to 2015/d14/test-runs/0.txt diff --git a/d15/input.txt b/2015/d15/input.txt similarity index 100% rename from d15/input.txt rename to 2015/d15/input.txt diff --git a/d15/main.go b/2015/d15/main.go similarity index 98% rename from d15/main.go rename to 2015/d15/main.go index 2930df2..815edde 100644 --- a/d15/main.go +++ b/2015/d15/main.go @@ -1,9 +1,10 @@ package main import ( - "aoc2015/util" "regexp" "slices" + + "github.com/Magiczne/AdventOfCode/util" ) type Ingredient struct { diff --git a/d15/test-runs/0.txt b/2015/d15/test-runs/0.txt similarity index 100% rename from d15/test-runs/0.txt rename to 2015/d15/test-runs/0.txt diff --git a/d16/input.txt b/2015/d16/input.txt similarity index 100% rename from d16/input.txt rename to 2015/d16/input.txt diff --git a/d16/main.go b/2015/d16/main.go similarity index 97% rename from d16/main.go rename to 2015/d16/main.go index 13f3744..61c222d 100644 --- a/d16/main.go +++ b/2015/d16/main.go @@ -1,10 +1,11 @@ package main import ( - "aoc2015/util" "maps" "regexp" "strings" + + "github.com/Magiczne/AdventOfCode/util" ) type Aunt = map[string]int diff --git a/d17/input.txt b/2015/d17/input.txt similarity index 100% rename from d17/input.txt rename to 2015/d17/input.txt diff --git a/d17/main.go b/2015/d17/main.go similarity index 96% rename from d17/main.go rename to 2015/d17/main.go index 02314e4..e060a62 100644 --- a/d17/main.go +++ b/2015/d17/main.go @@ -1,9 +1,10 @@ package main import ( - "aoc2015/util" "slices" + "github.com/Magiczne/AdventOfCode/util" + comb "github.com/mxschmitt/golang-combinations" ) diff --git a/d17/test-runs/0.txt b/2015/d17/test-runs/0.txt similarity index 100% rename from d17/test-runs/0.txt rename to 2015/d17/test-runs/0.txt diff --git a/d18/input.txt b/2015/d18/input.txt similarity index 100% rename from d18/input.txt rename to 2015/d18/input.txt diff --git a/d18/main.go b/2015/d18/main.go similarity index 98% rename from d18/main.go rename to 2015/d18/main.go index c33d8f8..62147b5 100644 --- a/d18/main.go +++ b/2015/d18/main.go @@ -1,8 +1,9 @@ package main import ( - "aoc2015/util" "strings" + + "github.com/Magiczne/AdventOfCode/util" ) func getEnabledNeighbors(neighbors []string) int { diff --git a/d18/test-runs/0.txt b/2015/d18/test-runs/0.txt similarity index 100% rename from d18/test-runs/0.txt rename to 2015/d18/test-runs/0.txt diff --git a/d19/input.txt b/2015/d19/input.txt similarity index 100% rename from d19/input.txt rename to 2015/d19/input.txt diff --git a/d19/main.go b/2015/d19/main.go similarity index 96% rename from d19/main.go rename to 2015/d19/main.go index e91b0ef..0b9b8aa 100644 --- a/d19/main.go +++ b/2015/d19/main.go @@ -1,10 +1,11 @@ package main import ( - "aoc2015/util" "regexp" "strings" + "github.com/Magiczne/AdventOfCode/util" + mapset "github.com/deckarep/golang-set/v2" ) diff --git a/d19/test-runs/0.txt b/2015/d19/test-runs/0.txt similarity index 100% rename from d19/test-runs/0.txt rename to 2015/d19/test-runs/0.txt diff --git a/d19/test-runs/1.txt b/2015/d19/test-runs/1.txt similarity index 100% rename from d19/test-runs/1.txt rename to 2015/d19/test-runs/1.txt diff --git a/d19/test-runs/pb.txt b/2015/d19/test-runs/pb.txt similarity index 100% rename from d19/test-runs/pb.txt rename to 2015/d19/test-runs/pb.txt diff --git a/d20/input.txt b/2015/d20/input.txt similarity index 100% rename from d20/input.txt rename to 2015/d20/input.txt diff --git a/d20/main.go b/2015/d20/main.go similarity index 95% rename from d20/main.go rename to 2015/d20/main.go index 44eb95a..01b1134 100644 --- a/d20/main.go +++ b/2015/d20/main.go @@ -1,7 +1,7 @@ package main import ( - "aoc2015/util" + "github.com/Magiczne/AdventOfCode/util" ) // Brute force is my best friend. diff --git a/d21/input.txt b/2015/d21/input.txt similarity index 100% rename from d21/input.txt rename to 2015/d21/input.txt diff --git a/d21/main.go b/2015/d21/main.go similarity index 99% rename from d21/main.go rename to 2015/d21/main.go index 36b1dde..dac6804 100644 --- a/d21/main.go +++ b/2015/d21/main.go @@ -1,9 +1,10 @@ package main import ( - "aoc2015/util" "math" "strings" + + "github.com/Magiczne/AdventOfCode/util" ) type Entity struct { diff --git a/d22/input.txt b/2015/d22/input.txt similarity index 100% rename from d22/input.txt rename to 2015/d22/input.txt diff --git a/d22/main.go b/2015/d22/main.go similarity index 99% rename from d22/main.go rename to 2015/d22/main.go index 9126a0a..467709f 100644 --- a/d22/main.go +++ b/2015/d22/main.go @@ -1,10 +1,11 @@ package main import ( - "aoc2015/util" "math" "slices" "strings" + + "github.com/Magiczne/AdventOfCode/util" ) type Boss struct { diff --git a/d23/cpu/cpu.go b/2015/d23/cpu/cpu.go similarity index 100% rename from d23/cpu/cpu.go rename to 2015/d23/cpu/cpu.go diff --git a/d23/input.txt b/2015/d23/input.txt similarity index 100% rename from d23/input.txt rename to 2015/d23/input.txt diff --git a/d23/main.go b/2015/d23/main.go similarity index 89% rename from d23/main.go rename to 2015/d23/main.go index f0d0a2b..efc5cae 100644 --- a/d23/main.go +++ b/2015/d23/main.go @@ -1,9 +1,11 @@ package main import ( - d23 "aoc2015/d23/cpu" - "aoc2015/util" "regexp" + + d23 "github.com/Magiczne/AdventOfCode/d23/cpu" + + "github.com/Magiczne/AdventOfCode/util" ) func part1(instructions []d23.Instruction) int { diff --git a/d23/test-runs/0.txt b/2015/d23/test-runs/0.txt similarity index 100% rename from d23/test-runs/0.txt rename to 2015/d23/test-runs/0.txt diff --git a/d24/input.txt b/2015/d24/input.txt similarity index 100% rename from d24/input.txt rename to 2015/d24/input.txt diff --git a/d24/main.go b/2015/d24/main.go similarity index 97% rename from d24/main.go rename to 2015/d24/main.go index 861b9aa..9df2ad5 100644 --- a/d24/main.go +++ b/2015/d24/main.go @@ -1,9 +1,10 @@ package main import ( - "aoc2015/util" "sort" + "github.com/Magiczne/AdventOfCode/util" + comb "github.com/mxschmitt/golang-combinations" ) diff --git a/d24/test-runs/0.txt b/2015/d24/test-runs/0.txt similarity index 100% rename from d24/test-runs/0.txt rename to 2015/d24/test-runs/0.txt diff --git a/go.mod b/2015/go.mod similarity index 90% rename from go.mod rename to 2015/go.mod index 992d1fb..4621a55 100644 --- a/go.mod +++ b/2015/go.mod @@ -1,4 +1,4 @@ -module aoc2015 +module github.com/Magiczne/AdventOfCode go 1.23.2 diff --git a/go.sum b/2015/go.sum similarity index 100% rename from go.sum rename to 2015/go.sum diff --git a/util/aoc.go b/2015/util/aoc.go similarity index 100% rename from util/aoc.go rename to 2015/util/aoc.go diff --git a/util/array.go b/2015/util/array.go similarity index 100% rename from util/array.go rename to 2015/util/array.go diff --git a/util/combinatorics.go b/2015/util/combinatorics.go similarity index 100% rename from util/combinatorics.go rename to 2015/util/combinatorics.go diff --git a/util/conversion.go b/2015/util/conversion.go similarity index 100% rename from util/conversion.go rename to 2015/util/conversion.go diff --git a/util/error.go b/2015/util/error.go similarity index 100% rename from util/error.go rename to 2015/util/error.go diff --git a/util/file.go b/2015/util/file.go similarity index 100% rename from util/file.go rename to 2015/util/file.go diff --git a/util/math.go b/2015/util/math.go similarity index 100% rename from util/math.go rename to 2015/util/math.go diff --git a/util/matrix.go b/2015/util/matrix.go similarity index 100% rename from util/matrix.go rename to 2015/util/matrix.go diff --git a/util/string.go b/2015/util/string.go similarity index 100% rename from util/string.go rename to 2015/util/string.go