├── 2015 ├── day1-haskell │ ├── Justfile │ ├── Main.hs │ └── input.txt ├── day1-rust │ ├── Cargo.lock │ ├── Cargo.toml │ ├── input.txt │ └── src │ │ └── lib.rs ├── day10-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day11-rust │ ├── Cargo.lock │ ├── Cargo.toml │ ├── input.txt │ ├── src │ │ └── lib.rs │ └── test.txt ├── day12-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day13-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day14-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day15-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day16-rust │ ├── Cargo.lock │ ├── Cargo.toml │ ├── input.txt │ ├── src │ │ └── lib.rs │ └── test.txt ├── day17-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day18-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day19-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day2-haskell │ ├── Justfile │ ├── Main.hs │ └── input.txt ├── day2-rust │ ├── Cargo.lock │ ├── Cargo.toml │ ├── input.txt │ ├── src │ │ └── lib.rs │ └── test.txt ├── day20-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day21-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day22-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day23-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ └── main_test.go ├── day24-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day25-go │ ├── go.mod │ ├── go.sum │ ├── main.go │ └── main_test.go ├── day3-haskell │ ├── Justfile │ ├── Main.hs │ └── input.txt ├── day3-rust │ ├── Cargo.lock │ ├── Cargo.toml │ ├── input.txt │ └── src │ │ └── lib.rs ├── day4-rust │ ├── Cargo.lock │ ├── Cargo.toml │ ├── input.txt │ ├── src │ │ └── lib.rs │ └── test.txt ├── day5-rust │ ├── Cargo.lock │ ├── Cargo.toml │ ├── input.txt │ └── src │ │ └── lib.rs ├── day6-rust │ ├── Cargo.lock │ ├── Cargo.toml │ ├── input.txt │ ├── src │ │ └── lib.rs │ └── test.txt ├── day7-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day8-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt └── day9-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── 2016 ├── day1-haskell │ ├── Justfile │ ├── Main.hs │ └── input.txt ├── day1-rust │ ├── Cargo.lock │ ├── Cargo.toml │ ├── input.txt │ └── src │ │ └── lib.rs ├── day10-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day11-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── input2.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day12-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day13-rust │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── day14-rust │ ├── Cargo.lock │ ├── Cargo.toml │ ├── input.txt │ ├── src │ │ └── lib.rs │ └── test.txt ├── day15-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day16-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day17-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day18-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day19-go │ ├── go.mod │ ├── go.sum │ ├── main.go │ └── main_test.go ├── day2-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day2-haskell │ ├── Justfile │ ├── Main.hs │ └── input.txt ├── day20-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day21-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day22-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day23-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── input2.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day24-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day25-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day3-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ └── main_test.go ├── day4-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day5-rust │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── day6-rust │ ├── Cargo.lock │ ├── Cargo.toml │ ├── input.txt │ ├── src │ │ └── lib.rs │ └── test.txt ├── day7-rust │ ├── Cargo.lock │ ├── Cargo.toml │ ├── input.txt │ ├── src │ │ └── lib.rs │ └── test.txt ├── day8-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt └── day9-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ └── main_test.go ├── 2017 ├── day1-rust │ ├── Cargo.lock │ ├── Cargo.toml │ ├── input.txt │ ├── src │ │ └── lib.rs │ └── test.txt ├── day10-go │ ├── go.mod │ ├── go.sum │ ├── main.go │ └── main_test.go ├── day11-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day12-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day13-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day14-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day15-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day16-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day17-go │ ├── go.mod │ ├── go.sum │ ├── main.go │ └── main_test.go ├── day18-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day19-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day2-rust │ ├── Cargo.lock │ ├── Cargo.toml │ ├── input.txt │ ├── src │ │ └── lib.rs │ ├── test.txt │ └── test2.txt ├── day20-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day21-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day22-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day23-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day24-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day25-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day3-rust │ ├── Cargo.lock │ ├── Cargo.toml │ ├── input.txt │ ├── src │ │ └── lib.rs │ └── test.txt ├── day4-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day5-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day5-rust │ ├── Cargo.lock │ ├── Cargo.toml │ ├── input.txt │ ├── src │ │ └── lib.rs │ └── test.txt ├── day6-rust │ ├── Cargo.lock │ ├── Cargo.toml │ ├── input.txt │ ├── src │ │ └── lib.rs │ └── test.txt ├── day7-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day8-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt └── day9-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── 2018 ├── day1-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day10-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day11-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day12-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day13-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day14-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day15-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day16-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day17-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ ├── test.txt │ ├── unit.txt │ └── unit2.txt ├── day18-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day19-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day2-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day20-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day21-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day22-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day23-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day24-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day25-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ └── main_test.go ├── day3-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day4-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day5-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day6-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day7-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day8-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt └── day9-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── 2019 ├── day1-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day10-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day11-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day12-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day13-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day14-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ └── main_test.go ├── day15-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day16-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day17-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day18-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── input2.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day19-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day2-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ └── main_test.go ├── day20-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day21-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day22-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day23-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day24-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day25-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day3-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day4-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day5-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ └── main_test.go ├── day6-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day7-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day8-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt └── day9-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── 2020 ├── day1-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day1-haskell │ ├── .gitignore │ ├── CHANGELOG.md │ ├── Justfile │ ├── LICENSE │ ├── README.md │ ├── Setup.hs │ ├── app │ │ └── Main.hs │ ├── day1-haskell.cabal │ ├── input.txt │ ├── package.yaml │ ├── src │ │ ├── Conversions.hs │ │ ├── Directions.hs │ │ ├── Inputs.hs │ │ ├── Lib.hs │ │ ├── Lists.hs │ │ └── Strings.hs │ ├── stack.yaml │ ├── stack.yaml.lock │ └── test │ │ └── Spec.hs ├── day10-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ └── main_test.go ├── day11-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day12-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day13-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day14-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day15-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day16-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day17-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day18-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day19-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── input2.txt │ ├── main.go │ ├── main_test.go │ ├── test.txt │ └── test2.txt ├── day2-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day20-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day21-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day22-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day23-go │ ├── go.mod │ ├── go.sum │ ├── main.go │ └── main_test.go ├── day24-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day25-go │ ├── go.mod │ ├── go.sum │ ├── main.go │ └── main_test.go ├── day25-rust │ ├── Cargo.lock │ ├── Cargo.toml │ ├── input.txt │ ├── src │ │ └── lib.rs │ └── test.txt ├── day3-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day4-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day5-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day6-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day7-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day8-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt └── day9-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── 2021 ├── day1-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day1-haskell │ ├── Justfile │ ├── Lib │ │ ├── Directions.hs │ │ ├── Inputs.hs │ │ ├── Lists.hs │ │ └── Strings.hs │ ├── Main.hs │ └── input.txt ├── day10-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day11-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day12-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day13-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day14-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day15-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day16-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ └── main_test.go ├── day17-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day18-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day19-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day2-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day2-haskell │ ├── Justfile │ ├── Lib │ │ ├── Directions.hs │ │ ├── Inputs.hs │ │ ├── Lists.hs │ │ └── Strings.hs │ ├── Main.hs │ └── input.txt ├── day20-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day21-go │ ├── go.mod │ ├── go.sum │ ├── main.go │ └── main_test.go ├── day22-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ ├── test.txt │ └── test2.txt ├── day23-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── input2.txt │ ├── main.go │ ├── main_test.go │ ├── test.txt │ └── test2.txt ├── day24-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day25-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day3-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day3-haskell │ ├── Justfile │ ├── Lib │ │ ├── Conversions.hs │ │ ├── Directions.hs │ │ ├── Inputs.hs │ │ ├── Lists.hs │ │ └── Strings.hs │ ├── Main.hs │ └── input.txt ├── day4-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day5-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day5-haskell │ ├── Justfile │ ├── Lib │ │ ├── Conversions.hs │ │ ├── Directions.hs │ │ ├── Inputs.hs │ │ ├── Lists.hs │ │ └── Strings.hs │ ├── Main.hs │ └── input.txt ├── day6-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day6-haskell │ ├── Justfile │ ├── Lib │ │ ├── Conversions.hs │ │ ├── Directions.hs │ │ ├── Inputs.hs │ │ ├── Lists.hs │ │ └── Strings.hs │ ├── Main.hs │ └── input.txt ├── day7-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day7-haskell │ ├── .gitignore │ ├── CHANGELOG.md │ ├── Justfile │ ├── LICENSE │ ├── README.md │ ├── Setup.hs │ ├── app │ │ └── Main.hs │ ├── day7-haskell.cabal │ ├── input.txt │ ├── package.yaml │ ├── src │ │ ├── Conversions.hs │ │ ├── Directions.hs │ │ ├── Inputs.hs │ │ ├── Lib.hs │ │ ├── Lists.hs │ │ └── Strings.hs │ ├── stack.yaml │ ├── stack.yaml.lock │ └── test │ │ └── Spec.hs ├── day8-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day8-haskell │ ├── .gitignore │ ├── CHANGELOG.md │ ├── Justfile │ ├── LICENSE │ ├── README.md │ ├── Setup.hs │ ├── app │ │ └── Main.hs │ ├── day8-haskell.cabal │ ├── input.txt │ ├── package.yaml │ ├── src │ │ ├── Conversions.hs │ │ ├── Directions.hs │ │ ├── Inputs.hs │ │ ├── Lib.hs │ │ ├── Lists.hs │ │ └── Strings.hs │ ├── stack.yaml │ ├── stack.yaml.lock │ └── test │ │ └── Spec.hs └── day9-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── 2022 ├── day1-rust │ ├── Cargo.lock │ ├── Cargo.toml │ ├── input.txt │ ├── src │ │ └── lib.rs │ └── test.txt ├── day10-rust │ ├── Cargo.lock │ ├── Cargo.toml │ ├── input.txt │ ├── src │ │ └── lib.rs │ └── test.txt ├── day11-rust │ ├── Cargo.lock │ ├── Cargo.toml │ ├── input.txt │ ├── src │ │ └── lib.rs │ └── test.txt ├── day12-rust │ ├── Cargo.lock │ ├── Cargo.toml │ ├── input.txt │ ├── src │ │ └── lib.rs │ └── test.txt ├── day13-rust │ ├── Cargo.lock │ ├── Cargo.toml │ ├── input.txt │ ├── src │ │ └── lib.rs │ └── test.txt ├── day14-rust │ ├── Cargo.lock │ ├── Cargo.toml │ ├── input.txt │ ├── src │ │ └── lib.rs │ └── test.txt ├── day15-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day15-rust │ ├── Cargo.lock │ ├── Cargo.toml │ ├── input.txt │ ├── src │ │ └── lib.rs │ └── test.txt ├── day16-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day17-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day18-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day18-rust │ ├── Cargo.lock │ ├── Cargo.toml │ ├── input.txt │ ├── src │ │ └── lib.rs │ └── test.txt ├── day19-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day19-rust │ ├── Cargo.lock │ ├── Cargo.toml │ ├── input.txt │ ├── src │ │ └── lib.rs │ └── test.txt ├── day2-rust │ ├── Cargo.lock │ ├── Cargo.toml │ ├── input.txt │ ├── src │ │ └── lib.rs │ └── test.txt ├── day20-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day21-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day22-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day23-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day24-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ ├── test.txt │ └── unit.txt ├── day25-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day3-rust │ ├── Cargo.lock │ ├── Cargo.toml │ ├── input.txt │ ├── src │ │ └── lib.rs │ └── test.txt ├── day4-rust │ ├── Cargo.lock │ ├── Cargo.toml │ ├── input.txt │ ├── src │ │ └── lib.rs │ └── test.txt ├── day5-rust │ ├── Cargo.lock │ ├── Cargo.toml │ ├── input.txt │ ├── src │ │ └── lib.rs │ └── test.txt ├── day6-rust │ ├── Cargo.lock │ ├── Cargo.toml │ ├── input.txt │ └── src │ │ └── lib.rs ├── day7-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day7-rust │ ├── Cargo.lock │ ├── Cargo.toml │ ├── input.txt │ ├── src │ │ └── lib.rs │ └── test.txt ├── day8-rust │ ├── Cargo.lock │ ├── Cargo.toml │ ├── input.txt │ ├── src │ │ └── lib.rs │ └── test.txt └── day9-rust │ ├── Cargo.lock │ ├── Cargo.toml │ ├── input.txt │ ├── larger_test.txt │ ├── src │ └── lib.rs │ └── test.txt ├── 2023 ├── day1-haskell │ ├── Justfile │ ├── Main.hs │ └── input.txt ├── day1-rust │ ├── Cargo.lock │ ├── Cargo.toml │ ├── input.txt │ ├── src │ │ └── lib.rs │ ├── test.txt │ └── test2.txt ├── day10-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day11-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day12-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day13-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day14-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day15-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day16-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day17-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day18-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ ├── res.txt │ └── test.txt ├── day19-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day2-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day2-haskell │ ├── Justfile │ ├── Main.hs │ └── input.txt ├── day2-python │ ├── input.txt │ ├── main.py │ ├── test.txt │ └── test_main.py ├── day20-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ ├── test.txt │ └── test2.txt ├── day21-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day22-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day23-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day24-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day25-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day3-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day3-haskell │ ├── Justfile │ ├── Lib │ │ └── Inputs.hs │ ├── Main.hs │ └── input.txt ├── day4-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day4-haskell │ ├── Justfile │ ├── Lib │ │ └── Inputs.hs │ ├── Main.hs │ └── input.txt ├── day5-go │ ├── README.md │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day6-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main_test.go │ └── test.txt ├── day6-haskell │ ├── Justfile │ ├── Lib │ │ ├── Inputs.hs │ │ └── Strings.hs │ ├── Main.hs │ └── input.txt ├── day7-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day7-haskell │ ├── Justfile │ ├── Lib │ │ ├── Inputs.hs │ │ └── Strings.hs │ ├── Main.hs │ └── input.txt ├── day8-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ └── main_test.go ├── day8-haskell │ ├── Justfile │ ├── Lib │ │ ├── Directions.hs │ │ ├── Inputs.hs │ │ └── Strings.hs │ ├── Main.hs │ └── input.txt └── day9-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── 2024 ├── day1-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day10-go │ ├── go.mod │ ├── go.sum │ ├── go │ │ ├── main.go │ │ ├── main_test.go │ │ └── test.txt │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day11-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day12-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day13-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ ├── test.txt │ └── test2.txt ├── day14-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day15-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ ├── test_large.txt │ └── test_small.txt ├── day16-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ ├── test1.txt │ └── test2.txt ├── day17-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ ├── test.txt │ └── test2.txt ├── day18-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day19-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day2-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day20-go │ ├── all.txt │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day21-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day22-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ ├── test.txt │ └── test2.txt ├── day23-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day24-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day25-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day3-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ ├── test.txt │ └── test2.txt ├── day4-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day5-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day6-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day7-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── day8-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ ├── test.txt │ └── test2.txt └── day9-go │ ├── go.mod │ ├── go.sum │ ├── input.txt │ ├── main.go │ ├── main_test.go │ └── test.txt ├── .gitattributes ├── .gitignore ├── LICENSE ├── README.md ├── cmd ├── Main.hs ├── go.mod ├── go.sum └── stats.go ├── justfile ├── post.png └── templates ├── go ├── main.go ├── main_test.go └── test.txt ├── haskell ├── Justfile ├── Lib │ ├── Conversions.hs │ ├── Directions.hs │ ├── Inputs.hs │ ├── Lib.hs │ ├── Lists.hs │ └── Strings.hs └── Main.hs ├── python ├── main.py └── test_main.py └── rust ├── Cargo.lock ├── Cargo.toml ├── input.txt ├── src └── lib.rs └── test.txt /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | **/target 3 | **/vendor 4 | **/venv 5 | **.iml 6 | Main 7 | Main.hi 8 | Main.o 9 | *.hi 10 | *.o 11 | -------------------------------------------------------------------------------- /2015/day1-haskell/Justfile: -------------------------------------------------------------------------------- 1 | build: 2 | ghcid --command="stack ghci Main.hs" --test=":main" -------------------------------------------------------------------------------- /2015/day1-rust/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "day1-rust" 7 | version = "0.1.0" 8 | -------------------------------------------------------------------------------- /2015/day1-rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "day1-rust" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /2015/day10-go/go.mod: -------------------------------------------------------------------------------- 1 | module template-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2015/day10-go/input.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2015/day10-go/input.txt -------------------------------------------------------------------------------- /2015/day10-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2015/day10-go/test.txt -------------------------------------------------------------------------------- /2015/day11-rust/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "template-rust" 7 | version = "0.1.0" 8 | -------------------------------------------------------------------------------- /2015/day11-rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "template-rust" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /2015/day11-rust/input.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2015/day11-rust/input.txt -------------------------------------------------------------------------------- /2015/day11-rust/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2015/day11-rust/test.txt -------------------------------------------------------------------------------- /2015/day12-go/go.mod: -------------------------------------------------------------------------------- 1 | module template-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2015/day12-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2015/day12-go/test.txt -------------------------------------------------------------------------------- /2015/day13-go/go.mod: -------------------------------------------------------------------------------- 1 | module template-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2015/day14-go/go.mod: -------------------------------------------------------------------------------- 1 | module template-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2015/day14-go/test.txt: -------------------------------------------------------------------------------- 1 | Comet can fly 14 km/s for 10 seconds, but then must rest for 127 seconds. 2 | Dancer can fly 16 km/s for 11 seconds, but then must rest for 162 seconds. -------------------------------------------------------------------------------- /2015/day15-go/go.mod: -------------------------------------------------------------------------------- 1 | module template-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2015/day15-go/input.txt: -------------------------------------------------------------------------------- 1 | Frosting: capacity 4, durability -2, flavor 0, texture 0, calories 5 2 | Candy: capacity 0, durability 5, flavor -1, texture 0, calories 8 3 | Butterscotch: capacity -1, durability 0, flavor 5, texture 0, calories 6 4 | Sugar: capacity 0, durability 0, flavor -2, texture 2, calories 1 -------------------------------------------------------------------------------- /2015/day15-go/test.txt: -------------------------------------------------------------------------------- 1 | Butterscotch: capacity -1, durability -2, flavor 6, texture 3, calories 8 2 | Cinnamon: capacity 2, durability 3, flavor -2, texture -1, calories 3 -------------------------------------------------------------------------------- /2015/day16-rust/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "template-rust" 7 | version = "0.1.0" 8 | -------------------------------------------------------------------------------- /2015/day16-rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "template-rust" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /2015/day16-rust/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2015/day16-rust/test.txt -------------------------------------------------------------------------------- /2015/day17-go/go.mod: -------------------------------------------------------------------------------- 1 | module template-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2015/day17-go/input.txt: -------------------------------------------------------------------------------- 1 | 11 2 | 30 3 | 47 4 | 31 5 | 32 6 | 36 7 | 3 8 | 1 9 | 5 10 | 3 11 | 32 12 | 36 13 | 15 14 | 11 15 | 46 16 | 26 17 | 28 18 | 1 19 | 19 20 | 3 -------------------------------------------------------------------------------- /2015/day17-go/test.txt: -------------------------------------------------------------------------------- 1 | 20 2 | 15 3 | 10 4 | 5 5 | 5 -------------------------------------------------------------------------------- /2015/day18-go/go.mod: -------------------------------------------------------------------------------- 1 | module template-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2015/day18-go/test.txt: -------------------------------------------------------------------------------- 1 | .#.#.# 2 | ...##. 3 | #....# 4 | ..#... 5 | #.#..# 6 | ####.. -------------------------------------------------------------------------------- /2015/day19-go/go.mod: -------------------------------------------------------------------------------- 1 | module template-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2015/day19-go/test.txt: -------------------------------------------------------------------------------- 1 | H => HO 2 | H => OH 3 | O => HH 4 | 5 | HOH -------------------------------------------------------------------------------- /2015/day2-haskell/Justfile: -------------------------------------------------------------------------------- 1 | build: 2 | ghcid --command="stack ghci Main.hs" --test=":main" -------------------------------------------------------------------------------- /2015/day2-rust/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "template-rust" 7 | version = "0.1.0" 8 | -------------------------------------------------------------------------------- /2015/day2-rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "template-rust" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /2015/day2-rust/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2015/day2-rust/test.txt -------------------------------------------------------------------------------- /2015/day20-go/go.mod: -------------------------------------------------------------------------------- 1 | module template-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2015/day20-go/input.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2015/day20-go/input.txt -------------------------------------------------------------------------------- /2015/day20-go/main_test.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/stretchr/testify/assert" 7 | ) 8 | 9 | func TestFs1Input(t *testing.T) { 10 | v := fs1(29000000) 11 | assert.Equal(t, 665280, v) 12 | } 13 | 14 | func TestFs2Input(t *testing.T) { 15 | v := fs2(29000000, 50) 16 | assert.Equal(t, 42, v) 17 | } 18 | -------------------------------------------------------------------------------- /2015/day20-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2015/day20-go/test.txt -------------------------------------------------------------------------------- /2015/day21-go/go.mod: -------------------------------------------------------------------------------- 1 | module template-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2015/day21-go/input.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2015/day21-go/input.txt -------------------------------------------------------------------------------- /2015/day21-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2015/day21-go/test.txt -------------------------------------------------------------------------------- /2015/day22-go/go.mod: -------------------------------------------------------------------------------- 1 | module template-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2015/day22-go/input.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2015/day22-go/input.txt -------------------------------------------------------------------------------- /2015/day22-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2015/day22-go/test.txt -------------------------------------------------------------------------------- /2015/day23-go/go.mod: -------------------------------------------------------------------------------- 1 | module template-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2015/day24-go/go.mod: -------------------------------------------------------------------------------- 1 | module template-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2015/day24-go/input.txt: -------------------------------------------------------------------------------- 1 | 1 2 | 2 3 | 3 4 | 7 5 | 11 6 | 13 7 | 17 8 | 19 9 | 23 10 | 31 11 | 37 12 | 41 13 | 43 14 | 47 15 | 53 16 | 59 17 | 61 18 | 67 19 | 71 20 | 73 21 | 79 22 | 83 23 | 89 24 | 97 25 | 101 26 | 103 27 | 107 28 | 109 29 | 113 -------------------------------------------------------------------------------- /2015/day24-go/test.txt: -------------------------------------------------------------------------------- 1 | 1 2 | 3 3 | 4 4 | 5 5 | 7 6 | 10 7 | 8 8 | 2 9 | 9 10 | 11 -------------------------------------------------------------------------------- /2015/day25-go/go.mod: -------------------------------------------------------------------------------- 1 | module template-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2015/day25-go/main_test.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/stretchr/testify/assert" 7 | ) 8 | 9 | func TestFs1Input(t *testing.T) { 10 | v := fs1(3010, 3019) 11 | assert.Equal(t, "42", v) 12 | } 13 | -------------------------------------------------------------------------------- /2015/day3-haskell/Justfile: -------------------------------------------------------------------------------- 1 | build: 2 | ghcid --command="stack ghci Main.hs" --test=":main" -------------------------------------------------------------------------------- /2015/day3-rust/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "template-rust" 7 | version = "0.1.0" 8 | -------------------------------------------------------------------------------- /2015/day3-rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "template-rust" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /2015/day4-rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "template-rust" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | md5 = "0.7.0" 10 | -------------------------------------------------------------------------------- /2015/day4-rust/input.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2015/day4-rust/input.txt -------------------------------------------------------------------------------- /2015/day4-rust/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2015/day4-rust/test.txt -------------------------------------------------------------------------------- /2015/day5-rust/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "template-rust" 7 | version = "0.1.0" 8 | -------------------------------------------------------------------------------- /2015/day5-rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "template-rust" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /2015/day6-rust/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "template-rust" 7 | version = "0.1.0" 8 | -------------------------------------------------------------------------------- /2015/day6-rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "template-rust" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /2015/day6-rust/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2015/day6-rust/test.txt -------------------------------------------------------------------------------- /2015/day7-go/go.mod: -------------------------------------------------------------------------------- 1 | module template-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2015/day7-go/test.txt: -------------------------------------------------------------------------------- 1 | x LSHIFT 2 -> f 2 | 123 -> x 3 | 456 -> y 4 | x AND y -> d 5 | x OR y -> e 6 | y RSHIFT 2 -> g 7 | NOT x -> h 8 | NOT y -> i -------------------------------------------------------------------------------- /2015/day8-go/go.mod: -------------------------------------------------------------------------------- 1 | module template-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2015/day8-go/test.txt: -------------------------------------------------------------------------------- 1 | "" 2 | "abc" 3 | "aaa\"aaa" 4 | "\x27" -------------------------------------------------------------------------------- /2015/day9-go/go.mod: -------------------------------------------------------------------------------- 1 | module template-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2015/day9-go/test.txt: -------------------------------------------------------------------------------- 1 | London to Dublin = 464 2 | London to Belfast = 518 3 | Dublin to Belfast = 141 -------------------------------------------------------------------------------- /2016/day1-haskell/Justfile: -------------------------------------------------------------------------------- 1 | build: 2 | ghcid --command="stack ghci Main.hs" --test=":main" -------------------------------------------------------------------------------- /2016/day1-rust/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "template-rust" 7 | version = "0.1.0" 8 | -------------------------------------------------------------------------------- /2016/day1-rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "template-rust" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /2016/day10-go/go.mod: -------------------------------------------------------------------------------- 1 | module template-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2016/day10-go/test.txt: -------------------------------------------------------------------------------- 1 | value 5 goes to bot 2 2 | bot 2 gives low to bot 1 and high to bot 0 3 | value 3 goes to bot 1 4 | bot 1 gives low to output 1 and high to bot 0 5 | bot 0 gives low to output 2 and high to output 0 6 | value 2 goes to bot 2 -------------------------------------------------------------------------------- /2016/day11-go/go.mod: -------------------------------------------------------------------------------- 1 | module template-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2016/day11-go/input.txt: -------------------------------------------------------------------------------- 1 | polonium-generator,thulium-generator,thulium-microchip,promethium-generator,ruthenium-generator,ruthenium-microchip,cobalt-generator,cobalt-microchip 2 | polonium-microchip,promethium-microchip 3 | - 4 | - -------------------------------------------------------------------------------- /2016/day11-go/input2.txt: -------------------------------------------------------------------------------- 1 | polonium-generator,thulium-generator,thulium-microchip,promethium-generator,ruthenium-generator,ruthenium-microchip,cobalt-generator,cobalt-microchip 2 | polonium-microchip,promethium-microchip,elerium-generator,elerium-microchip,dilithium-generator,dilithium-microchip 3 | - 4 | - -------------------------------------------------------------------------------- /2016/day11-go/test.txt: -------------------------------------------------------------------------------- 1 | hydrogen-microchip,lithium-microchip 2 | hydrogen-generator 3 | lithium-generator 4 | - -------------------------------------------------------------------------------- /2016/day12-go/go.mod: -------------------------------------------------------------------------------- 1 | module template-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2016/day12-go/input.txt: -------------------------------------------------------------------------------- 1 | cpy 1 a 2 | cpy 1 b 3 | cpy 26 d 4 | jnz c 2 5 | jnz 1 5 6 | cpy 7 c 7 | inc d 8 | dec c 9 | jnz c -2 10 | cpy a c 11 | inc a 12 | dec b 13 | jnz b -2 14 | cpy c b 15 | dec d 16 | jnz d -6 17 | cpy 16 c 18 | cpy 12 d 19 | inc a 20 | dec d 21 | jnz d -2 22 | dec c 23 | jnz c -5 -------------------------------------------------------------------------------- /2016/day12-go/test.txt: -------------------------------------------------------------------------------- 1 | cpy 41 a 2 | inc a 3 | inc a 4 | dec a 5 | jnz a 2 6 | dec a -------------------------------------------------------------------------------- /2016/day13-rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "template-rust" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | queues = "1.1.0" 10 | -------------------------------------------------------------------------------- /2016/day14-rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "template-rust" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | md5 = "0.7.0" 10 | -------------------------------------------------------------------------------- /2016/day14-rust/input.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2016/day14-rust/input.txt -------------------------------------------------------------------------------- /2016/day14-rust/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2016/day14-rust/test.txt -------------------------------------------------------------------------------- /2016/day15-go/go.mod: -------------------------------------------------------------------------------- 1 | module template-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2016/day15-go/input.txt: -------------------------------------------------------------------------------- 1 | Disc #1 has 17 positions; at time=0, it is at position 5. 2 | Disc #2 has 19 positions; at time=0, it is at position 8. 3 | Disc #3 has 7 positions; at time=0, it is at position 1. 4 | Disc #4 has 13 positions; at time=0, it is at position 7. 5 | Disc #5 has 5 positions; at time=0, it is at position 1. 6 | Disc #6 has 3 positions; at time=0, it is at position 0. -------------------------------------------------------------------------------- /2016/day15-go/test.txt: -------------------------------------------------------------------------------- 1 | Disc #1 has 5 positions; at time=0, it is at position 4. 2 | Disc #2 has 2 positions; at time=0, it is at position 1. -------------------------------------------------------------------------------- /2016/day16-go/go.mod: -------------------------------------------------------------------------------- 1 | module template-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2016/day16-go/input.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2016/day16-go/input.txt -------------------------------------------------------------------------------- /2016/day16-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2016/day16-go/test.txt -------------------------------------------------------------------------------- /2016/day17-go/go.mod: -------------------------------------------------------------------------------- 1 | module template-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2016/day17-go/input.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2016/day17-go/input.txt -------------------------------------------------------------------------------- /2016/day17-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2016/day17-go/test.txt -------------------------------------------------------------------------------- /2016/day18-go/go.mod: -------------------------------------------------------------------------------- 1 | module template-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2016/day18-go/input.txt: -------------------------------------------------------------------------------- 1 | .^^^.^.^^^.^.......^^.^^^^.^^^^..^^^^^.^.^^^..^^.^.^^..^.^..^^...^.^^.^^^...^^.^.^^^..^^^^.....^.... -------------------------------------------------------------------------------- /2016/day18-go/test.txt: -------------------------------------------------------------------------------- 1 | .^^.^.^^^^ -------------------------------------------------------------------------------- /2016/day19-go/go.mod: -------------------------------------------------------------------------------- 1 | module template-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2016/day2-go/go.mod: -------------------------------------------------------------------------------- 1 | module template-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2016/day2-go/test.txt: -------------------------------------------------------------------------------- 1 | ULL 2 | RRDDD 3 | LURDL 4 | UUUUD -------------------------------------------------------------------------------- /2016/day2-haskell/Justfile: -------------------------------------------------------------------------------- 1 | build: 2 | ghcid --command="stack ghci Main.hs" --test=":main" -------------------------------------------------------------------------------- /2016/day20-go/go.mod: -------------------------------------------------------------------------------- 1 | module template-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2016/day20-go/test.txt: -------------------------------------------------------------------------------- 1 | 5-8 2 | 0-2 3 | 4-7 -------------------------------------------------------------------------------- /2016/day21-go/go.mod: -------------------------------------------------------------------------------- 1 | module template-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2016/day21-go/test.txt: -------------------------------------------------------------------------------- 1 | swap position 4 with position 0 2 | swap letter d with letter b 3 | reverse positions 0 through 4 4 | rotate left 1 step 5 | move position 1 to position 4 6 | move position 3 to position 0 7 | rotate based on position of letter b 8 | rotate based on position of letter d -------------------------------------------------------------------------------- /2016/day22-go/go.mod: -------------------------------------------------------------------------------- 1 | module template-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2016/day23-go/go.mod: -------------------------------------------------------------------------------- 1 | module template-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2016/day23-go/input.txt: -------------------------------------------------------------------------------- 1 | cpy a b 2 | dec b 3 | cpy a d 4 | cpy 0 a 5 | cpy b c 6 | inc a 7 | dec c 8 | jnz c -2 9 | dec d 10 | jnz d -5 11 | dec b 12 | cpy b c 13 | cpy c d 14 | dec d 15 | inc c 16 | jnz d -2 17 | tgl c 18 | cpy -16 c 19 | jnz 1 c 20 | cpy 73 c 21 | jnz 79 d 22 | inc a 23 | inc d 24 | jnz d -2 25 | inc c 26 | jnz c -5 -------------------------------------------------------------------------------- /2016/day23-go/input2.txt: -------------------------------------------------------------------------------- 1 | cpy a b 2 | dec b 3 | cpy a d 4 | cpy 0 a 5 | cpy b c 6 | inc a 7 | dec c 8 | jnz c -2 9 | dec d 10 | jnz d -5 11 | dec b 12 | cpy b c 13 | cpy c d 14 | dec d 15 | inc c 16 | jnz d -2 17 | tgl c 18 | cpy -16 c 19 | jnz 1 c 20 | cpy 73 c 21 | jnz 79 d 22 | inc a 23 | inc d 24 | jnz d -2 25 | inc c 26 | jnz c -5 -------------------------------------------------------------------------------- /2016/day23-go/test.txt: -------------------------------------------------------------------------------- 1 | cpy 2 a 2 | tgl a 3 | tgl a 4 | tgl a 5 | cpy 1 a 6 | dec a 7 | dec a -------------------------------------------------------------------------------- /2016/day24-go/go.mod: -------------------------------------------------------------------------------- 1 | module template-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2016/day24-go/test.txt: -------------------------------------------------------------------------------- 1 | ########### 2 | #0.1.....2# 3 | #.#######.# 4 | #4.......3# 5 | ########### -------------------------------------------------------------------------------- /2016/day25-go/go.mod: -------------------------------------------------------------------------------- 1 | module template-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2016/day25-go/input.txt: -------------------------------------------------------------------------------- 1 | cpy a d 2 | cpy 11 c 3 | cpy 231 b 4 | inc d 5 | dec b 6 | jnz b -2 7 | dec c 8 | jnz c -5 9 | cpy d a 10 | jnz 0 0 11 | cpy a b 12 | cpy 0 a 13 | cpy 2 c 14 | jnz b 2 15 | jnz 1 6 16 | dec b 17 | dec c 18 | jnz c -4 19 | inc a 20 | jnz 1 -7 21 | cpy 2 b 22 | jnz c 2 23 | jnz 1 4 24 | dec b 25 | dec c 26 | jnz 1 -4 27 | jnz 0 0 28 | out b 29 | jnz a -19 30 | jnz 1 -21 -------------------------------------------------------------------------------- /2016/day25-go/main_test.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "os" 5 | "testing" 6 | 7 | "github.com/stretchr/testify/assert" 8 | "github.com/stretchr/testify/require" 9 | ) 10 | 11 | func TestFs1Input(t *testing.T) { 12 | f, err := os.Open("input.txt") 13 | require.NoError(t, err) 14 | v, err := fs1(f) 15 | require.NoError(t, err) 16 | assert.Equal(t, 42, v) 17 | } 18 | -------------------------------------------------------------------------------- /2016/day25-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2016/day25-go/test.txt -------------------------------------------------------------------------------- /2016/day3-go/go.mod: -------------------------------------------------------------------------------- 1 | module template-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2016/day4-go/go.mod: -------------------------------------------------------------------------------- 1 | module template-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2016/day4-go/test.txt: -------------------------------------------------------------------------------- 1 | aaaaa-bbb-z-y-x-123[abxyz] 2 | a-b-c-d-e-f-g-h-987[abcde] 3 | not-a-real-room-404[oarel] 4 | totally-real-room-200[decoy] -------------------------------------------------------------------------------- /2016/day5-rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "template-rust" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | md5 = "0.7.0" 10 | -------------------------------------------------------------------------------- /2016/day6-rust/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "template-rust" 7 | version = "0.1.0" 8 | -------------------------------------------------------------------------------- /2016/day6-rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "template-rust" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /2016/day6-rust/test.txt: -------------------------------------------------------------------------------- 1 | eedadn 2 | drvtee 3 | eandsr 4 | raavrd 5 | atevrs 6 | tsrnev 7 | sdttsa 8 | rasrtv 9 | nssdts 10 | ntnada 11 | svetve 12 | tesnvt 13 | vntsnd 14 | vrdear 15 | dvrsen 16 | enarar -------------------------------------------------------------------------------- /2016/day7-rust/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "template-rust" 7 | version = "0.1.0" 8 | -------------------------------------------------------------------------------- /2016/day7-rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "template-rust" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /2016/day7-rust/test.txt: -------------------------------------------------------------------------------- 1 | aba[bab]xyz 2 | xyx[xyx]xyx 3 | aaa[kek]eke 4 | zazbz[bzb]cdb -------------------------------------------------------------------------------- /2016/day8-go/go.mod: -------------------------------------------------------------------------------- 1 | module template-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2016/day8-go/test.txt: -------------------------------------------------------------------------------- 1 | rect 3x2 2 | rotate column x=1 by 1 3 | rotate row y=0 by 4 4 | rotate column x=1 by 1 -------------------------------------------------------------------------------- /2016/day9-go/go.mod: -------------------------------------------------------------------------------- 1 | module template-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2017/day1-rust/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "template-rust" 7 | version = "0.1.0" 8 | -------------------------------------------------------------------------------- /2017/day1-rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "template-rust" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /2017/day1-rust/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2017/day1-rust/test.txt -------------------------------------------------------------------------------- /2017/day10-go/go.mod: -------------------------------------------------------------------------------- 1 | module day10-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.0-20230118153418-e8d7f1761878 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2017/day11-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2017/day11-go/test.txt -------------------------------------------------------------------------------- /2017/day12-go/test.txt: -------------------------------------------------------------------------------- 1 | 0 <-> 2 2 | 1 <-> 1 3 | 2 <-> 0, 3, 4 4 | 3 <-> 2, 4 5 | 4 <-> 2, 3, 6 6 | 5 <-> 6 7 | 6 <-> 4, 5 -------------------------------------------------------------------------------- /2017/day13-go/go.mod: -------------------------------------------------------------------------------- 1 | module day13-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/stretchr/testify v1.8.1 7 | github.com/teivah/advent-of-code v0.0.2 8 | ) 9 | 10 | require ( 11 | github.com/davecgh/go-spew v1.1.1 // indirect 12 | github.com/pmezard/go-difflib v1.0.0 // indirect 13 | gopkg.in/yaml.v3 v3.0.1 // indirect 14 | ) 15 | -------------------------------------------------------------------------------- /2017/day13-go/test.txt: -------------------------------------------------------------------------------- 1 | 0: 3 2 | 1: 2 3 | 4: 4 4 | 6: 4 -------------------------------------------------------------------------------- /2017/day14-go/go.mod: -------------------------------------------------------------------------------- 1 | module day14-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.2 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2017/day14-go/input.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2017/day14-go/input.txt -------------------------------------------------------------------------------- /2017/day14-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2017/day14-go/test.txt -------------------------------------------------------------------------------- /2017/day15-go/go.mod: -------------------------------------------------------------------------------- 1 | module day15-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.2 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2017/day15-go/input.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2017/day15-go/input.txt -------------------------------------------------------------------------------- /2017/day15-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2017/day15-go/test.txt -------------------------------------------------------------------------------- /2017/day16-go/go.mod: -------------------------------------------------------------------------------- 1 | module day16-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.2 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2017/day16-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2017/day16-go/test.txt -------------------------------------------------------------------------------- /2017/day17-go/go.mod: -------------------------------------------------------------------------------- 1 | module day17-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.2 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2017/day17-go/main_test.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/stretchr/testify/assert" 7 | ) 8 | 9 | func TestFs1Test(t *testing.T) { 10 | assert.Equal(t, 638, fs1(3, 2017)) 11 | } 12 | 13 | func TestFs1Input(t *testing.T) { 14 | assert.Equal(t, 1914, fs1(343, 2017)) 15 | } 16 | 17 | func TestFs2Input(t *testing.T) { 18 | assert.Equal(t, 0, fs2(343, 50000000)) 19 | } 20 | -------------------------------------------------------------------------------- /2017/day18-go/go.mod: -------------------------------------------------------------------------------- 1 | module day18-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.3 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2017/day18-go/test.txt: -------------------------------------------------------------------------------- 1 | set a 1 2 | add a 2 3 | mul a a 4 | mod a 5 5 | snd a 6 | set a 0 7 | rcv a 8 | jgz a -1 9 | set a 1 10 | jgz a -2 -------------------------------------------------------------------------------- /2017/day19-go/go.mod: -------------------------------------------------------------------------------- 1 | module day19-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.3 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2017/day19-go/test.txt: -------------------------------------------------------------------------------- 1 | | 2 | | +--+ 3 | A | C 4 | F---|----E|--+ 5 | | | | D 6 | +B-+ +--+ -------------------------------------------------------------------------------- /2017/day2-rust/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "template-rust" 7 | version = "0.1.0" 8 | -------------------------------------------------------------------------------- /2017/day2-rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "template-rust" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /2017/day2-rust/test.txt: -------------------------------------------------------------------------------- 1 | 5 1 9 5 2 | 7 5 3 3 | 2 4 6 8 -------------------------------------------------------------------------------- /2017/day2-rust/test2.txt: -------------------------------------------------------------------------------- 1 | 5 9 2 8 2 | 9 4 7 3 3 | 3 8 6 5 -------------------------------------------------------------------------------- /2017/day20-go/go.mod: -------------------------------------------------------------------------------- 1 | module day20-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.3 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2017/day20-go/test.txt: -------------------------------------------------------------------------------- 1 | p=<3,0,0>, v=<2,0,0>, a=<-1,0,0> 2 | p=<4,0,0>, v=<0,0,0>, a=<-2,0,0> -------------------------------------------------------------------------------- /2017/day21-go/go.mod: -------------------------------------------------------------------------------- 1 | module day21-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.3 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2017/day21-go/test.txt: -------------------------------------------------------------------------------- 1 | ../.# => ##./#../... 2 | .#./..#/### => #..#/..../..../#..# -------------------------------------------------------------------------------- /2017/day22-go/go.mod: -------------------------------------------------------------------------------- 1 | module day22-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.3 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2017/day22-go/test.txt: -------------------------------------------------------------------------------- 1 | ..# 2 | #.. 3 | ... -------------------------------------------------------------------------------- /2017/day23-go/go.mod: -------------------------------------------------------------------------------- 1 | module day23-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.3 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2017/day23-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2017/day23-go/test.txt -------------------------------------------------------------------------------- /2017/day24-go/go.mod: -------------------------------------------------------------------------------- 1 | module day24-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.3 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2017/day24-go/test.txt: -------------------------------------------------------------------------------- 1 | 0/2 2 | 2/2 3 | 2/3 4 | 3/4 5 | 3/5 6 | 0/1 7 | 10/1 8 | 9/10 -------------------------------------------------------------------------------- /2017/day25-go/go.mod: -------------------------------------------------------------------------------- 1 | module day25-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.3 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2017/day3-rust/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "template-rust" 7 | version = "0.1.0" 8 | -------------------------------------------------------------------------------- /2017/day3-rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "template-rust" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /2017/day3-rust/input.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2017/day3-rust/input.txt -------------------------------------------------------------------------------- /2017/day3-rust/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2017/day3-rust/test.txt -------------------------------------------------------------------------------- /2017/day4-go/go.mod: -------------------------------------------------------------------------------- 1 | module day4-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2017/day4-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2017/day4-go/test.txt -------------------------------------------------------------------------------- /2017/day5-go/test.txt: -------------------------------------------------------------------------------- 1 | 0 2 | 3 3 | 0 4 | 1 5 | -3 -------------------------------------------------------------------------------- /2017/day5-rust/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "template-rust" 7 | version = "0.1.0" 8 | -------------------------------------------------------------------------------- /2017/day5-rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "template-rust" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /2017/day5-rust/test.txt: -------------------------------------------------------------------------------- 1 | 0 2 | 3 3 | 0 4 | 1 5 | -3 -------------------------------------------------------------------------------- /2017/day6-rust/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "template-rust" 7 | version = "0.1.0" 8 | -------------------------------------------------------------------------------- /2017/day6-rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "template-rust" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /2017/day6-rust/input.txt: -------------------------------------------------------------------------------- 1 | 11 11 13 7 0 15 5 5 4 4 1 1 7 1 15 11 -------------------------------------------------------------------------------- /2017/day6-rust/test.txt: -------------------------------------------------------------------------------- 1 | 0 2 7 0 -------------------------------------------------------------------------------- /2017/day7-go/test.txt: -------------------------------------------------------------------------------- 1 | pbga (66) 2 | xhth (57) 3 | ebii (61) 4 | havc (66) 5 | ktlj (57) 6 | fwft (72) -> ktlj, cntj, xhth 7 | qoyq (66) 8 | padx (45) -> pbga, havc, qoyq 9 | tknk (41) -> ugml, padx, fwft 10 | jptl (61) 11 | ugml (68) -> gyxo, ebii, jptl 12 | gyxo (61) 13 | cntj (57) -------------------------------------------------------------------------------- /2017/day8-go/go.mod: -------------------------------------------------------------------------------- 1 | module day8-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/stretchr/testify v1.8.1 7 | github.com/teivah/advent-of-code v0.0.0-20230118114410-e0871416c125 8 | ) 9 | 10 | require ( 11 | github.com/davecgh/go-spew v1.1.1 // indirect 12 | github.com/pmezard/go-difflib v1.0.0 // indirect 13 | gopkg.in/yaml.v3 v3.0.1 // indirect 14 | ) 15 | -------------------------------------------------------------------------------- /2017/day8-go/test.txt: -------------------------------------------------------------------------------- 1 | b inc 5 if a > 1 2 | a inc 1 if b < 5 3 | c dec -10 if a >= 1 4 | c inc -20 if c == 10 -------------------------------------------------------------------------------- /2017/day9-go/go.mod: -------------------------------------------------------------------------------- 1 | module day9-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/stretchr/testify v1.8.1 7 | github.com/teivah/advent-of-code v0.0.0-20230118114410-e0871416c125 8 | ) 9 | 10 | require ( 11 | github.com/davecgh/go-spew v1.1.1 // indirect 12 | github.com/pmezard/go-difflib v1.0.0 // indirect 13 | gopkg.in/yaml.v3 v3.0.1 // indirect 14 | ) 15 | -------------------------------------------------------------------------------- /2017/day9-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2017/day9-go/test.txt -------------------------------------------------------------------------------- /2018/day1-go/go.mod: -------------------------------------------------------------------------------- 1 | module day1-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.3 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2018/day1-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2018/day1-go/test.txt -------------------------------------------------------------------------------- /2018/day10-go/go.mod: -------------------------------------------------------------------------------- 1 | module day10-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.6 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2018/day10-go/main_test.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "os" 5 | "testing" 6 | 7 | "github.com/stretchr/testify/require" 8 | ) 9 | 10 | func TestFs1Test(t *testing.T) { 11 | f, err := os.Open("test.txt") 12 | require.NoError(t, err) 13 | fs1(f, 4) 14 | } 15 | 16 | func TestFs1Input(t *testing.T) { 17 | f, err := os.Open("input.txt") 18 | require.NoError(t, err) 19 | fs1(f, 100000) 20 | } 21 | -------------------------------------------------------------------------------- /2018/day11-go/go.mod: -------------------------------------------------------------------------------- 1 | module day11-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.6 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2018/day11-go/input.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2018/day11-go/input.txt -------------------------------------------------------------------------------- /2018/day11-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2018/day11-go/test.txt -------------------------------------------------------------------------------- /2018/day12-go/go.mod: -------------------------------------------------------------------------------- 1 | module day12-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.6 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2018/day12-go/test.txt: -------------------------------------------------------------------------------- 1 | initial state: #..#.#..##......###...### 2 | 3 | ...## => # 4 | ..#.. => # 5 | .#... => # 6 | .#.#. => # 7 | .#.## => # 8 | .##.. => # 9 | .#### => # 10 | #.#.# => # 11 | #.### => # 12 | ##.#. => # 13 | ##.## => # 14 | ###.. => # 15 | ###.# => # 16 | ####. => # -------------------------------------------------------------------------------- /2018/day13-go/go.mod: -------------------------------------------------------------------------------- 1 | module day13-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.6 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2018/day13-go/test.txt: -------------------------------------------------------------------------------- 1 | /->-\ 2 | | | /----\ 3 | | /-+--+-\ | 4 | | | | | v | 5 | \-+-/ \-+--/ 6 | \------/ -------------------------------------------------------------------------------- /2018/day14-go/go.mod: -------------------------------------------------------------------------------- 1 | module day14-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.6 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2018/day14-go/input.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2018/day14-go/input.txt -------------------------------------------------------------------------------- /2018/day14-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2018/day14-go/test.txt -------------------------------------------------------------------------------- /2018/day15-go/go.mod: -------------------------------------------------------------------------------- 1 | module day15-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.6 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2018/day15-go/test.txt: -------------------------------------------------------------------------------- 1 | ####### 2 | #.G...# 3 | #...EG# 4 | #.#.#G# 5 | #..G#E# 6 | #.....# 7 | ####### -------------------------------------------------------------------------------- /2018/day16-go/go.mod: -------------------------------------------------------------------------------- 1 | module day16-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.6 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2018/day16-go/test.txt: -------------------------------------------------------------------------------- 1 | Before: [3, 2, 1, 1] 2 | 9 2 1 2 3 | After: [3, 2, 2, 1] 4 | 5 | -------------------------------------------------------------------------------- /2018/day17-go/go.mod: -------------------------------------------------------------------------------- 1 | module day17-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.6 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2018/day17-go/test.txt: -------------------------------------------------------------------------------- 1 | x=495, y=2..7 2 | y=7, x=495..501 3 | x=501, y=3..7 4 | x=498, y=2..4 5 | x=506, y=1..2 6 | x=498, y=10..13 7 | x=504, y=10..13 8 | y=13, x=498..504 -------------------------------------------------------------------------------- /2018/day17-go/unit.txt: -------------------------------------------------------------------------------- 1 | x=499..501, y=5 2 | x=495..505, y=10 3 | x=495, y=9..10 4 | x=505, y=8..10 -------------------------------------------------------------------------------- /2018/day17-go/unit2.txt: -------------------------------------------------------------------------------- 1 | x=493..508, y=9 2 | x=493, y=5..9 3 | x=508, y=5..9 4 | x=495..505, y=7 5 | -------------------------------------------------------------------------------- /2018/day18-go/go.mod: -------------------------------------------------------------------------------- 1 | module day18-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.6 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2018/day18-go/test.txt: -------------------------------------------------------------------------------- 1 | .#.#...|#. 2 | .....#|##| 3 | .|..|...#. 4 | ..|#.....# 5 | #.#|||#|#| 6 | ...#.||... 7 | .|....|... 8 | ||...#|.#| 9 | |.||||..|. 10 | ...#.|..|. -------------------------------------------------------------------------------- /2018/day19-go/go.mod: -------------------------------------------------------------------------------- 1 | module day19-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.6 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2018/day19-go/test.txt: -------------------------------------------------------------------------------- 1 | #ip 0 2 | seti 5 0 1 3 | seti 6 0 2 4 | addi 0 1 0 5 | addr 1 2 3 6 | setr 1 0 0 7 | seti 8 0 4 8 | seti 9 0 5 -------------------------------------------------------------------------------- /2018/day2-go/go.mod: -------------------------------------------------------------------------------- 1 | module day2-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.4 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2018/day2-go/test.txt: -------------------------------------------------------------------------------- 1 | abcdef 2 | bababc 3 | abbcde 4 | abcccd 5 | aabcdd 6 | abcdee 7 | ababab -------------------------------------------------------------------------------- /2018/day20-go/go.mod: -------------------------------------------------------------------------------- 1 | module day20-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.6 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2018/day20-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2018/day20-go/test.txt -------------------------------------------------------------------------------- /2018/day21-go/go.mod: -------------------------------------------------------------------------------- 1 | module day21-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.6 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2018/day21-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2018/day21-go/test.txt -------------------------------------------------------------------------------- /2018/day22-go/go.mod: -------------------------------------------------------------------------------- 1 | module day22-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.6 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2018/day22-go/input.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2018/day22-go/input.txt -------------------------------------------------------------------------------- /2018/day22-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2018/day22-go/test.txt -------------------------------------------------------------------------------- /2018/day23-go/go.mod: -------------------------------------------------------------------------------- 1 | module day23-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.6 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2018/day23-go/test.txt: -------------------------------------------------------------------------------- 1 | pos=<0,0,0>, r=4 2 | pos=<1,0,0>, r=1 3 | pos=<4,0,0>, r=3 4 | pos=<0,2,0>, r=1 5 | pos=<0,5,0>, r=3 6 | pos=<0,0,3>, r=1 7 | pos=<1,1,1>, r=1 8 | pos=<1,1,2>, r=1 9 | pos=<1,3,1>, r=1 -------------------------------------------------------------------------------- /2018/day24-go/go.mod: -------------------------------------------------------------------------------- 1 | module day24-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.6 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2018/day25-go/go.mod: -------------------------------------------------------------------------------- 1 | module day25-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.6 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2018/day3-go/go.mod: -------------------------------------------------------------------------------- 1 | module day3-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.5 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2018/day3-go/test.txt: -------------------------------------------------------------------------------- 1 | #1 @ 1,3: 4x4 2 | #2 @ 3,1: 4x4 3 | #3 @ 5,5: 2x2 -------------------------------------------------------------------------------- /2018/day4-go/go.mod: -------------------------------------------------------------------------------- 1 | module day4-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.5 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2018/day5-go/go.mod: -------------------------------------------------------------------------------- 1 | module day5-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.5 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2018/day5-go/test.txt: -------------------------------------------------------------------------------- 1 | dabAcCaCBAcCcaDA -------------------------------------------------------------------------------- /2018/day6-go/go.mod: -------------------------------------------------------------------------------- 1 | module day6-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.5 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2018/day6-go/test.txt: -------------------------------------------------------------------------------- 1 | 1, 1 2 | 1, 6 3 | 8, 3 4 | 3, 4 5 | 5, 5 6 | 8, 9 -------------------------------------------------------------------------------- /2018/day7-go/go.mod: -------------------------------------------------------------------------------- 1 | module day7-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.5 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2018/day7-go/test.txt: -------------------------------------------------------------------------------- 1 | Step C must be finished before step A can begin. 2 | Step C must be finished before step F can begin. 3 | Step A must be finished before step B can begin. 4 | Step A must be finished before step D can begin. 5 | Step B must be finished before step E can begin. 6 | Step D must be finished before step E can begin. 7 | Step F must be finished before step E can begin. -------------------------------------------------------------------------------- /2018/day8-go/go.mod: -------------------------------------------------------------------------------- 1 | module day8-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.5 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2018/day8-go/test.txt: -------------------------------------------------------------------------------- 1 | 2 3 0 3 10 11 12 1 1 0 1 99 2 1 1 2 -------------------------------------------------------------------------------- /2018/day9-go/go.mod: -------------------------------------------------------------------------------- 1 | module day9-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.5 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2018/day9-go/input.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2018/day9-go/input.txt -------------------------------------------------------------------------------- /2018/day9-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2018/day9-go/test.txt -------------------------------------------------------------------------------- /2019/day1-go/go.mod: -------------------------------------------------------------------------------- 1 | module day1-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.6 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2019/day1-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2019/day1-go/test.txt -------------------------------------------------------------------------------- /2019/day10-go/go.mod: -------------------------------------------------------------------------------- 1 | module day10-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/stretchr/testify v1.8.1 7 | github.com/teivah/advent-of-code v0.0.10 8 | ) 9 | 10 | require ( 11 | github.com/davecgh/go-spew v1.1.1 // indirect 12 | github.com/pmezard/go-difflib v1.0.0 // indirect 13 | gopkg.in/yaml.v3 v3.0.1 // indirect 14 | ) 15 | -------------------------------------------------------------------------------- /2019/day10-go/test.txt: -------------------------------------------------------------------------------- 1 | #.. 2 | .#. 3 | ..# -------------------------------------------------------------------------------- /2019/day11-go/go.mod: -------------------------------------------------------------------------------- 1 | module day11-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.12 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2019/day11-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2019/day11-go/test.txt -------------------------------------------------------------------------------- /2019/day12-go/go.mod: -------------------------------------------------------------------------------- 1 | module day12-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.12 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2019/day12-go/input.txt: -------------------------------------------------------------------------------- 1 | 5,4,4 2 | -11,-11,-3 3 | 0,7,0 4 | -13,2,10 -------------------------------------------------------------------------------- /2019/day12-go/test.txt: -------------------------------------------------------------------------------- 1 | -1,0,2 2 | 2,-10,-7 3 | 4,-8,8 4 | 3,5,-1 -------------------------------------------------------------------------------- /2019/day13-go/go.mod: -------------------------------------------------------------------------------- 1 | module day13-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.12 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2019/day13-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2019/day13-go/test.txt -------------------------------------------------------------------------------- /2019/day14-go/go.mod: -------------------------------------------------------------------------------- 1 | module day14-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.12 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2019/day15-go/go.mod: -------------------------------------------------------------------------------- 1 | module day15-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.13 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2019/day15-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2019/day15-go/test.txt -------------------------------------------------------------------------------- /2019/day16-go/go.mod: -------------------------------------------------------------------------------- 1 | module day16-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.14 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2019/day16-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2019/day16-go/test.txt -------------------------------------------------------------------------------- /2019/day17-go/go.mod: -------------------------------------------------------------------------------- 1 | module day17-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.14 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2019/day17-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2019/day17-go/test.txt -------------------------------------------------------------------------------- /2019/day18-go/go.mod: -------------------------------------------------------------------------------- 1 | module day18-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/emirpasic/gods v1.18.1 7 | github.com/stretchr/testify v1.8.1 8 | github.com/teivah/advent-of-code v0.0.14 9 | ) 10 | 11 | require ( 12 | github.com/davecgh/go-spew v1.1.1 // indirect 13 | github.com/pmezard/go-difflib v1.0.0 // indirect 14 | gopkg.in/yaml.v3 v3.0.1 // indirect 15 | ) 16 | -------------------------------------------------------------------------------- /2019/day18-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2019/day18-go/test.txt -------------------------------------------------------------------------------- /2019/day19-go/go.mod: -------------------------------------------------------------------------------- 1 | module day19-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.14 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2019/day19-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2019/day19-go/test.txt -------------------------------------------------------------------------------- /2019/day2-go/go.mod: -------------------------------------------------------------------------------- 1 | module day2-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.6 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2019/day2-go/input.txt: -------------------------------------------------------------------------------- 1 | 1,0,0,3,1,1,2,3,1,3,4,3,1,5,0,3,2,9,1,19,1,5,19,23,2,9,23,27,1,27,5,31,2,31,13,35,1,35,9,39,1,39,10,43,2,43,9,47,1,47,5,51,2,13,51,55,1,9,55,59,1,5,59,63,2,6,63,67,1,5,67,71,1,6,71,75,2,9,75,79,1,79,13,83,1,83,13,87,1,87,5,91,1,6,91,95,2,95,13,99,2,13,99,103,1,5,103,107,1,107,10,111,1,111,13,115,1,10,115,119,1,9,119,123,2,6,123,127,1,5,127,131,2,6,131,135,1,135,2,139,1,139,9,0,99,2,14,0,0 -------------------------------------------------------------------------------- /2019/day20-go/go.mod: -------------------------------------------------------------------------------- 1 | module day20-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.14 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2019/day20-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2019/day20-go/test.txt -------------------------------------------------------------------------------- /2019/day21-go/go.mod: -------------------------------------------------------------------------------- 1 | module day21-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.14 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2019/day21-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2019/day21-go/test.txt -------------------------------------------------------------------------------- /2019/day22-go/go.mod: -------------------------------------------------------------------------------- 1 | module day22-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.14 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2019/day22-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2019/day22-go/test.txt -------------------------------------------------------------------------------- /2019/day23-go/go.mod: -------------------------------------------------------------------------------- 1 | module day23-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.14 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2019/day23-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2019/day23-go/test.txt -------------------------------------------------------------------------------- /2019/day24-go/go.mod: -------------------------------------------------------------------------------- 1 | module day24-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.14 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2019/day24-go/input.txt: -------------------------------------------------------------------------------- 1 | ##.#. 2 | #..#. 3 | ..... 4 | ....# 5 | #.### -------------------------------------------------------------------------------- /2019/day24-go/test.txt: -------------------------------------------------------------------------------- 1 | ....# 2 | #..#. 3 | #..## 4 | ..#.. 5 | #.... -------------------------------------------------------------------------------- /2019/day25-go/go.mod: -------------------------------------------------------------------------------- 1 | module day25-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.14 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2019/day25-go/main_test.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "os" 5 | "testing" 6 | 7 | "github.com/stretchr/testify/require" 8 | ) 9 | 10 | func TestFs1Input(t *testing.T) { 11 | f, err := os.Open("input.txt") 12 | require.NoError(t, err) 13 | fs(f) 14 | } 15 | -------------------------------------------------------------------------------- /2019/day25-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2019/day25-go/test.txt -------------------------------------------------------------------------------- /2019/day3-go/go.mod: -------------------------------------------------------------------------------- 1 | module day3-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/stretchr/testify v1.8.1 7 | github.com/teivah/advent-of-code v0.0.8 8 | ) 9 | 10 | require ( 11 | github.com/davecgh/go-spew v1.1.1 // indirect 12 | github.com/pmezard/go-difflib v1.0.0 // indirect 13 | gopkg.in/yaml.v3 v3.0.1 // indirect 14 | ) 15 | -------------------------------------------------------------------------------- /2019/day3-go/test.txt: -------------------------------------------------------------------------------- 1 | R8,U5,L5,D3 2 | U7,R6,D4,L4 -------------------------------------------------------------------------------- /2019/day4-go/go.mod: -------------------------------------------------------------------------------- 1 | module day4-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.8 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2019/day4-go/input.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2019/day4-go/input.txt -------------------------------------------------------------------------------- /2019/day4-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2019/day4-go/test.txt -------------------------------------------------------------------------------- /2019/day5-go/go.mod: -------------------------------------------------------------------------------- 1 | module day5-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.8 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2019/day6-go/go.mod: -------------------------------------------------------------------------------- 1 | module day6-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.8 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2019/day6-go/test.txt: -------------------------------------------------------------------------------- 1 | COM)B 2 | B)C 3 | C)D 4 | D)E 5 | E)F 6 | B)G 7 | G)H 8 | D)I 9 | E)J 10 | J)K 11 | K)L -------------------------------------------------------------------------------- /2019/day7-go/go.mod: -------------------------------------------------------------------------------- 1 | module day7-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.8 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2019/day7-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2019/day7-go/test.txt -------------------------------------------------------------------------------- /2019/day8-go/go.mod: -------------------------------------------------------------------------------- 1 | module day8-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.9 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2019/day8-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2019/day8-go/test.txt -------------------------------------------------------------------------------- /2019/day9-go/go.mod: -------------------------------------------------------------------------------- 1 | module day9-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.9 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2019/day9-go/test.txt: -------------------------------------------------------------------------------- 1 | 109,1,204,-1,1001,100,1,100,1008,100,16,101,1006,101,0,99 -------------------------------------------------------------------------------- /2020/day1-go/go.mod: -------------------------------------------------------------------------------- 1 | module day1-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.15 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2020/day1-go/test.txt: -------------------------------------------------------------------------------- 1 | 1721 2 | 979 3 | 366 4 | 299 5 | 675 6 | 1456 -------------------------------------------------------------------------------- /2020/day1-haskell/.gitignore: -------------------------------------------------------------------------------- 1 | .stack-work/ 2 | *~ -------------------------------------------------------------------------------- /2020/day1-haskell/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog for `day1-haskell` 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 6 | and this project adheres to the 7 | [Haskell Package Versioning Policy](https://pvp.haskell.org/). 8 | 9 | ## Unreleased 10 | 11 | ## 0.1.0.0 - YYYY-MM-DD 12 | -------------------------------------------------------------------------------- /2020/day1-haskell/Justfile: -------------------------------------------------------------------------------- 1 | indent: 2 | hindent app/Main.hs 3 | hindent src/Lib.hs 4 | 5 | dev: 6 | ghcid -W --command="stack ghci" --test=":main" 7 | 8 | build: 9 | stack build 10 | 11 | run: 12 | just build 13 | stack exec day1-haskell-exe 14 | 15 | time: 16 | time stack exec day7-haskell-exe 17 | -------------------------------------------------------------------------------- /2020/day1-haskell/README.md: -------------------------------------------------------------------------------- 1 | # day1-haskell 2 | -------------------------------------------------------------------------------- /2020/day1-haskell/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /2020/day1-haskell/app/Main.hs: -------------------------------------------------------------------------------- 1 | import Lib 2 | import System.IO 3 | 4 | main :: IO () 5 | main = do 6 | handle <- openFile "input.txt" ReadMode 7 | contents <- hGetContents handle 8 | let linesList = lines contents 9 | let res = fn1 linesList 10 | print res 11 | let res = fn2 linesList 12 | print res 13 | -------------------------------------------------------------------------------- /2020/day1-haskell/src/Conversions.hs: -------------------------------------------------------------------------------- 1 | module Conversions 2 | ( binaryToDecimal 3 | ) where 4 | 5 | import Data.Char (digitToInt) 6 | import Numeric (readInt) 7 | 8 | binaryToDecimal :: String -> Int 9 | binaryToDecimal binaryString = 10 | case readInt 2 (`elem` "01") digitToInt binaryString of 11 | [(decimalValue, _)] -> decimalValue 12 | _ -> error "Invalid binary string" 13 | -------------------------------------------------------------------------------- /2020/day1-haskell/src/Lists.hs: -------------------------------------------------------------------------------- 1 | module Lists 2 | ( sublist 3 | ) where 4 | 5 | sublist :: Int -> Int -> [a] -> [a] 6 | sublist start end xs = take (end - start) $ drop start xs 7 | -------------------------------------------------------------------------------- /2020/day1-haskell/test/Spec.hs: -------------------------------------------------------------------------------- 1 | main :: IO () 2 | main = putStrLn "Test suite not yet implemented" 3 | -------------------------------------------------------------------------------- /2020/day10-go/go.mod: -------------------------------------------------------------------------------- 1 | module day10-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.17 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2020/day11-go/go.mod: -------------------------------------------------------------------------------- 1 | module day11-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.20 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2020/day11-go/test.txt: -------------------------------------------------------------------------------- 1 | L.LL.LL.LL 2 | LLLLLLL.LL 3 | L.L.L..L.. 4 | LLLL.LL.LL 5 | L.LL.LL.LL 6 | L.LLLLL.LL 7 | ..L.L..... 8 | LLLLLLLLLL 9 | L.LLLLLL.L 10 | L.LLLLL.LL -------------------------------------------------------------------------------- /2020/day12-go/go.mod: -------------------------------------------------------------------------------- 1 | module day12-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.20 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2020/day12-go/test.txt: -------------------------------------------------------------------------------- 1 | F10 2 | N3 3 | F7 4 | R90 5 | F11 -------------------------------------------------------------------------------- /2020/day13-go/go.mod: -------------------------------------------------------------------------------- 1 | module day13-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.22 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2020/day13-go/input.txt: -------------------------------------------------------------------------------- 1 | 1000390 2 | 23,x,x,x,x,x,x,x,x,x,x,x,x,41,x,x,x,x,x,x,x,x,x,383,x,x,x,x,x,x,x,x,x,x,x,x,13,17,x,x,x,x,19,x,x,x,x,x,x,x,x,x,29,x,503,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,37 -------------------------------------------------------------------------------- /2020/day13-go/test.txt: -------------------------------------------------------------------------------- 1 | 939 2 | 7,13,x,x,59,x,31,19 -------------------------------------------------------------------------------- /2020/day14-go/go.mod: -------------------------------------------------------------------------------- 1 | module day14-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.23 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2020/day14-go/test.txt: -------------------------------------------------------------------------------- 1 | mask = XXXXXXXXXXXXXXXXXXXXXXXXXXXXX1XXXX0X 2 | mem[8] = 11 3 | mem[7] = 101 4 | mem[8] = 0 -------------------------------------------------------------------------------- /2020/day15-go/go.mod: -------------------------------------------------------------------------------- 1 | module day15-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.23 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2020/day15-go/input.txt: -------------------------------------------------------------------------------- 1 | 12,1,16,3,11,0 -------------------------------------------------------------------------------- /2020/day15-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2020/day15-go/test.txt -------------------------------------------------------------------------------- /2020/day16-go/go.mod: -------------------------------------------------------------------------------- 1 | module day16-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.23 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2020/day16-go/test.txt: -------------------------------------------------------------------------------- 1 | class: 1-3 or 5-7 2 | row: 6-11 or 33-44 3 | seat: 13-40 or 45-50 4 | 5 | your ticket: 6 | 7,1,14 7 | 8 | nearby tickets: 9 | 7,3,47 10 | 40,4,50 11 | 55,2,20 12 | 38,6,12 -------------------------------------------------------------------------------- /2020/day17-go/go.mod: -------------------------------------------------------------------------------- 1 | module day17-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.23 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2020/day17-go/input.txt: -------------------------------------------------------------------------------- 1 | ##..#.#. 2 | #####.## 3 | #######. 4 | #..#..#. 5 | #.#...## 6 | ..#....# 7 | ....#..# 8 | ..##.#.. -------------------------------------------------------------------------------- /2020/day17-go/test.txt: -------------------------------------------------------------------------------- 1 | .#. 2 | ..# 3 | ### -------------------------------------------------------------------------------- /2020/day18-go/go.mod: -------------------------------------------------------------------------------- 1 | module day18-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.23 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2020/day18-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2020/day18-go/test.txt -------------------------------------------------------------------------------- /2020/day19-go/go.mod: -------------------------------------------------------------------------------- 1 | module day19-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.23 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2020/day19-go/test.txt: -------------------------------------------------------------------------------- 1 | 0: 4 1 5 2 | 1: 2 3 | 3 2 3 | 2: 4 4 | 5 5 4 | 3: 4 5 | 5 4 5 | 4: "a" 6 | 5: "b" 7 | 8 | ababbb 9 | bababa 10 | abbbab 11 | aaabbb 12 | aaaabbb -------------------------------------------------------------------------------- /2020/day2-go/go.mod: -------------------------------------------------------------------------------- 1 | module day2-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.15 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2020/day2-go/test.txt: -------------------------------------------------------------------------------- 1 | 1-3 a: abcde 2 | 1-3 b: cdefg 3 | 2-9 c: ccccccccc -------------------------------------------------------------------------------- /2020/day20-go/go.mod: -------------------------------------------------------------------------------- 1 | module day20-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.23 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2020/day21-go/go.mod: -------------------------------------------------------------------------------- 1 | module day21-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.23 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2020/day21-go/test.txt: -------------------------------------------------------------------------------- 1 | mxmxvkd kfcds sqjhc nhms (contains dairy, fish) 2 | trh fvjkl sbzzf mxmxvkd (contains dairy) 3 | sqjhc fvjkl (contains soy) 4 | sqjhc mxmxvkd sbzzf (contains fish) -------------------------------------------------------------------------------- /2020/day22-go/go.mod: -------------------------------------------------------------------------------- 1 | module day22-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.23 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2020/day22-go/test.txt: -------------------------------------------------------------------------------- 1 | Player 1: 2 | 9 3 | 2 4 | 6 5 | 3 6 | 1 7 | 8 | Player 2: 9 | 5 10 | 8 11 | 4 12 | 7 13 | 10 -------------------------------------------------------------------------------- /2020/day23-go/go.mod: -------------------------------------------------------------------------------- 1 | module day23-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.23 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2020/day24-go/go.mod: -------------------------------------------------------------------------------- 1 | module day24-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.23 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2020/day25-go/go.mod: -------------------------------------------------------------------------------- 1 | module day25-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.23 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2020/day25-rust/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "template-rust" 7 | version = "0.1.0" 8 | -------------------------------------------------------------------------------- /2020/day25-rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "template-rust" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /2020/day25-rust/input.txt: -------------------------------------------------------------------------------- 1 | 11349501 2 | 5107328 -------------------------------------------------------------------------------- /2020/day25-rust/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2020/day25-rust/test.txt -------------------------------------------------------------------------------- /2020/day3-go/go.mod: -------------------------------------------------------------------------------- 1 | module day3-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.15 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2020/day3-go/test.txt: -------------------------------------------------------------------------------- 1 | ..##....... 2 | #...#...#.. 3 | .#....#..#. 4 | ..#.#...#.# 5 | .#...##..#. 6 | ..#.##..... 7 | .#.#.#....# 8 | .#........# 9 | #.##...#... 10 | #...##....# 11 | .#..#...#.# -------------------------------------------------------------------------------- /2020/day4-go/go.mod: -------------------------------------------------------------------------------- 1 | module day4-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.16 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2020/day4-go/test.txt: -------------------------------------------------------------------------------- 1 | ecl:gry pid:860033327 eyr:2020 hcl:#fffffd 2 | byr:1937 iyr:2017 cid:147 hgt:183cm 3 | 4 | iyr:2013 ecl:amb cid:350 eyr:2023 pid:028048884 5 | hcl:#cfa07d byr:1929 6 | 7 | hcl:#ae17e1 iyr:2013 8 | eyr:2024 9 | ecl:brn pid:760753108 byr:1931 10 | hgt:179cm 11 | 12 | hcl:#cfa07d eyr:2025 pid:166559648 13 | iyr:2011 ecl:brn hgt:59in -------------------------------------------------------------------------------- /2020/day5-go/go.mod: -------------------------------------------------------------------------------- 1 | module day5-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.16 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2020/day5-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2020/day5-go/test.txt -------------------------------------------------------------------------------- /2020/day6-go/go.mod: -------------------------------------------------------------------------------- 1 | module day6-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.16 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2020/day6-go/test.txt: -------------------------------------------------------------------------------- 1 | abc 2 | 3 | a 4 | b 5 | c 6 | 7 | ab 8 | ac 9 | 10 | a 11 | a 12 | a 13 | a 14 | 15 | b -------------------------------------------------------------------------------- /2020/day7-go/go.mod: -------------------------------------------------------------------------------- 1 | module day7-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.17 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2020/day8-go/go.mod: -------------------------------------------------------------------------------- 1 | module day8-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.17 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2020/day8-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2020/day8-go/test.txt -------------------------------------------------------------------------------- /2020/day9-go/go.mod: -------------------------------------------------------------------------------- 1 | module day9-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.18 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2020/day9-go/test.txt: -------------------------------------------------------------------------------- 1 | 35 2 | 20 3 | 15 4 | 25 5 | 47 6 | 40 7 | 62 8 | 55 9 | 65 10 | 95 11 | 102 12 | 117 13 | 150 14 | 182 15 | 127 16 | 219 17 | 299 18 | 277 19 | 309 20 | 576 -------------------------------------------------------------------------------- /2021/day1-go/go.mod: -------------------------------------------------------------------------------- 1 | module day1-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.23 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2021/day1-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2021/day1-go/test.txt -------------------------------------------------------------------------------- /2021/day1-haskell/Justfile: -------------------------------------------------------------------------------- 1 | dev: 2 | ghcid --command="stack ghci Main.hs" --test=":main" 3 | 4 | build: 5 | ghc -O Main.hs 6 | 7 | build1: 8 | ghc -O1 Main.hs 9 | 10 | build2: 11 | ghc -O2 Main.hs 12 | 13 | run: 14 | ./Main 15 | 16 | time: 17 | time ./Main 18 | -------------------------------------------------------------------------------- /2021/day1-haskell/Lib/Directions.hs: -------------------------------------------------------------------------------- 1 | module Lib.Directions 2 | ( Direction(..) 3 | ) where 4 | 5 | data Direction = DirUp | DirDown | DirLeft | DirRight 6 | deriving (Show, Eq) 7 | -------------------------------------------------------------------------------- /2021/day1-haskell/Lib/Lists.hs: -------------------------------------------------------------------------------- 1 | module Lib.Lists 2 | ( sublist 3 | ) where 4 | 5 | sublist :: Int -> Int -> [a] -> [a] 6 | sublist start end xs = take (end - start) $ drop start xs 7 | -------------------------------------------------------------------------------- /2021/day10-go/go.mod: -------------------------------------------------------------------------------- 1 | module day10-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.27 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2021/day10-go/test.txt: -------------------------------------------------------------------------------- 1 | [({(<(())[]>[[{[]{<()<>> 2 | [(()[<>])]({[<{<<[]>>( 3 | {([(<{}[<>[]}>{[]{[(<()> 4 | (((({<>}<{<{<>}{[]{[]{} 5 | [[<[([]))<([[{}[[()]]] 6 | [{[{({}]{}}([{[{{{}}([] 7 | {<[[]]>}<{[{[{[]{()[[[] 8 | [<(<(<(<{}))><([]([]() 9 | <{([([[(<>()){}]>(<<{{ 10 | <{([{{}}[<[[[<>{}]]]>[]] -------------------------------------------------------------------------------- /2021/day11-go/go.mod: -------------------------------------------------------------------------------- 1 | module day11-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.27 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2021/day11-go/input.txt: -------------------------------------------------------------------------------- 1 | 2478668324 2 | 4283474125 3 | 1663463374 4 | 1738271323 5 | 4285744861 6 | 3551311515 7 | 8574335438 8 | 7843525826 9 | 1366237577 10 | 3554687226 -------------------------------------------------------------------------------- /2021/day11-go/test.txt: -------------------------------------------------------------------------------- 1 | 5483143223 2 | 2745854711 3 | 5264556173 4 | 6141336146 5 | 6357385478 6 | 4167524645 7 | 2176841721 8 | 6882881134 9 | 4846848554 10 | 5283751526 -------------------------------------------------------------------------------- /2021/day12-go/go.mod: -------------------------------------------------------------------------------- 1 | module day12-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.27 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2021/day12-go/input.txt: -------------------------------------------------------------------------------- 1 | ex-NL 2 | ex-um 3 | ql-wv 4 | VF-fo 5 | VF-ql 6 | start-VF 7 | end-tg 8 | wv-ZQ 9 | wv-um 10 | NL-start 11 | lx-ex 12 | ex-wv 13 | ex-fo 14 | sb-start 15 | um-end 16 | fo-ql 17 | NL-sb 18 | NL-fo 19 | tg-NL 20 | VF-sb 21 | fo-wv 22 | ex-VF 23 | ql-sb 24 | end-wv -------------------------------------------------------------------------------- /2021/day12-go/test.txt: -------------------------------------------------------------------------------- 1 | start-A 2 | start-b 3 | A-c 4 | A-b 5 | b-d 6 | A-end 7 | b-end -------------------------------------------------------------------------------- /2021/day13-go/go.mod: -------------------------------------------------------------------------------- 1 | module day13-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.27 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2021/day13-go/test.txt: -------------------------------------------------------------------------------- 1 | 6,10 2 | 0,14 3 | 9,10 4 | 0,3 5 | 10,4 6 | 4,11 7 | 6,0 8 | 6,12 9 | 4,1 10 | 0,13 11 | 10,12 12 | 3,4 13 | 3,0 14 | 8,4 15 | 1,10 16 | 2,14 17 | 8,10 18 | 9,0 19 | 20 | fold along y=7 21 | fold along x=5 -------------------------------------------------------------------------------- /2021/day14-go/go.mod: -------------------------------------------------------------------------------- 1 | module day14-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.27 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2021/day14-go/test.txt: -------------------------------------------------------------------------------- 1 | NNCB 2 | 3 | CH -> B 4 | HH -> N 5 | CB -> H 6 | NH -> C 7 | HB -> C 8 | HC -> B 9 | HN -> C 10 | NN -> C 11 | BH -> H 12 | NC -> B 13 | NB -> B 14 | BN -> B 15 | BB -> N 16 | BC -> B 17 | CC -> N 18 | CN -> C -------------------------------------------------------------------------------- /2021/day15-go/go.mod: -------------------------------------------------------------------------------- 1 | module day15-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/emirpasic/gods v1.18.1 7 | github.com/stretchr/testify v1.8.1 8 | github.com/teivah/advent-of-code v0.0.27 9 | ) 10 | 11 | require ( 12 | github.com/davecgh/go-spew v1.1.1 // indirect 13 | github.com/pmezard/go-difflib v1.0.0 // indirect 14 | gopkg.in/yaml.v3 v3.0.1 // indirect 15 | ) 16 | -------------------------------------------------------------------------------- /2021/day15-go/test.txt: -------------------------------------------------------------------------------- 1 | 1163751742 2 | 1381373672 3 | 2136511328 4 | 3694931569 5 | 7463417111 6 | 1319128137 7 | 1359912421 8 | 3125421639 9 | 1293138521 10 | 2311944581 -------------------------------------------------------------------------------- /2021/day16-go/go.mod: -------------------------------------------------------------------------------- 1 | module day16-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.27 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2021/day17-go/go.mod: -------------------------------------------------------------------------------- 1 | module day17-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.27 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2021/day17-go/input.txt: -------------------------------------------------------------------------------- 1 | Puzzle inputs differ by user. Please log in to get your puzzle input. -------------------------------------------------------------------------------- /2021/day17-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2021/day17-go/test.txt -------------------------------------------------------------------------------- /2021/day18-go/go.mod: -------------------------------------------------------------------------------- 1 | module day18-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.27 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2021/day18-go/test.txt: -------------------------------------------------------------------------------- 1 | [[[0,[4,5]],[0,0]],[[[4,5],[2,6]],[9,5]]] 2 | [7,[[[3,7],[4,3]],[[6,3],[8,8]]]] 3 | [[2,[[0,8],[3,4]]],[[[6,7],1],[7,[1,6]]]] 4 | [[[[2,4],7],[6,[0,5]]],[[[6,8],[2,8]],[[2,1],[4,5]]]] 5 | [7,[5,[[3,8],[1,4]]]] 6 | [[2,[2,2]],[8,[8,1]]] 7 | [2,9] 8 | [1,[[[9,3],9],[[9,0],[0,7]]]] 9 | [[[5,[7,4]],7],1] 10 | [[[[4,2],2],6],[8,7]] -------------------------------------------------------------------------------- /2021/day19-go/go.mod: -------------------------------------------------------------------------------- 1 | module day19-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.27 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2021/day2-go/go.mod: -------------------------------------------------------------------------------- 1 | module day2-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.23 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2021/day2-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2021/day2-go/test.txt -------------------------------------------------------------------------------- /2021/day2-haskell/Justfile: -------------------------------------------------------------------------------- 1 | dev: 2 | ghcid --command="stack ghci Main.hs" --test=":main" 3 | 4 | build: 5 | ghc -O Main.hs 6 | 7 | build1: 8 | ghc -O1 Main.hs 9 | 10 | build2: 11 | ghc -O2 Main.hs 12 | 13 | run: 14 | ./Main 15 | 16 | time: 17 | time ./Main 18 | -------------------------------------------------------------------------------- /2021/day2-haskell/Lib/Lists.hs: -------------------------------------------------------------------------------- 1 | module Lib.Lists 2 | ( sublist 3 | ) where 4 | 5 | sublist :: Int -> Int -> [a] -> [a] 6 | sublist start end xs = take (end - start) $ drop start xs 7 | -------------------------------------------------------------------------------- /2021/day20-go/go.mod: -------------------------------------------------------------------------------- 1 | module day20-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.27 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2021/day21-go/go.mod: -------------------------------------------------------------------------------- 1 | module day21-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.27 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2021/day22-go/go.mod: -------------------------------------------------------------------------------- 1 | module day22-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.27 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2021/day23-go/go.mod: -------------------------------------------------------------------------------- 1 | module day23-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.27 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2021/day23-go/input.txt: -------------------------------------------------------------------------------- 1 | ############# 2 | #...........# 3 | ###D#A#C#A### 4 | #D#C#B#B# 5 | ######### -------------------------------------------------------------------------------- /2021/day23-go/input2.txt: -------------------------------------------------------------------------------- 1 | ############# 2 | #...........# 3 | ###D#A#C#A### 4 | #D#C#B#A# 5 | #D#B#A#C# 6 | #D#C#B#B# 7 | ######### -------------------------------------------------------------------------------- /2021/day23-go/test.txt: -------------------------------------------------------------------------------- 1 | ############# 2 | #...........# 3 | ###B#C#B#D### 4 | #A#D#C#A# 5 | ######### -------------------------------------------------------------------------------- /2021/day23-go/test2.txt: -------------------------------------------------------------------------------- 1 | ############# 2 | #...........# 3 | ###B#C#B#D### 4 | #D#C#B#A# 5 | #D#B#A#C# 6 | #A#D#C#A# 7 | ######### -------------------------------------------------------------------------------- /2021/day24-go/go.mod: -------------------------------------------------------------------------------- 1 | module day24-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.27 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2021/day24-go/test.txt: -------------------------------------------------------------------------------- 1 | inp z 2 | inp x 3 | mul z 3 4 | eql z x -------------------------------------------------------------------------------- /2021/day25-go/go.mod: -------------------------------------------------------------------------------- 1 | module day25-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.27 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2021/day25-go/test.txt: -------------------------------------------------------------------------------- 1 | v...>>.vv> 2 | .vv>>.vv.. 3 | >>.>v>...v 4 | >>v>>.>.v. 5 | v>v.vv.v.. 6 | >.>>..v... 7 | .vv..>.>v. 8 | v.v..>>v.v 9 | ....v..v.> -------------------------------------------------------------------------------- /2021/day3-go/go.mod: -------------------------------------------------------------------------------- 1 | module day3-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.23 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2021/day3-go/test.txt: -------------------------------------------------------------------------------- 1 | 00100 2 | 11110 3 | 10110 4 | 10111 5 | 10101 6 | 01111 7 | 00111 8 | 11100 9 | 10000 10 | 11001 11 | 00010 12 | 01010 -------------------------------------------------------------------------------- /2021/day3-haskell/Justfile: -------------------------------------------------------------------------------- 1 | dev: 2 | ghcid --command="stack ghci Main.hs" --test=":main" 3 | 4 | build: 5 | ghc -O Main.hs 6 | 7 | build1: 8 | ghc -O1 Main.hs 9 | 10 | build2: 11 | ghc -O2 Main.hs 12 | 13 | run: 14 | ./Main 15 | 16 | time: 17 | time ./Main 18 | -------------------------------------------------------------------------------- /2021/day3-haskell/Lib/Conversions.hs: -------------------------------------------------------------------------------- 1 | module Lib.Conversions 2 | ( binaryToDecimal 3 | ) where 4 | 5 | import Data.Char (digitToInt) 6 | import Numeric (readInt) 7 | 8 | binaryToDecimal :: String -> Int 9 | binaryToDecimal binaryString = 10 | case readInt 2 (`elem` "01") digitToInt binaryString of 11 | [(decimalValue, _)] -> decimalValue 12 | _ -> error "Invalid binary string" 13 | -------------------------------------------------------------------------------- /2021/day3-haskell/Lib/Directions.hs: -------------------------------------------------------------------------------- 1 | module Lib.Directions 2 | ( Direction(..) 3 | ) where 4 | 5 | data Direction = DirUp | DirDown | DirLeft | DirRight 6 | deriving (Show, Eq) 7 | -------------------------------------------------------------------------------- /2021/day3-haskell/Lib/Lists.hs: -------------------------------------------------------------------------------- 1 | module Lib.Lists 2 | ( sublist 3 | ) where 4 | 5 | sublist :: Int -> Int -> [a] -> [a] 6 | sublist start end xs = take (end - start) $ drop start xs 7 | -------------------------------------------------------------------------------- /2021/day4-go/go.mod: -------------------------------------------------------------------------------- 1 | module day4-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.26 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2021/day4-go/test.txt: -------------------------------------------------------------------------------- 1 | 7,4,9,5,11,17,23,2,0,14,21,24,10,16,13,6,15,25,12,22,18,20,8,19,3,26,1 2 | 3 | 22 13 17 11 0 4 | 8 2 23 4 24 5 | 21 9 14 16 7 6 | 6 10 3 18 5 7 | 1 12 20 15 19 8 | 9 | 3 15 0 2 22 10 | 9 18 13 17 5 11 | 19 8 7 25 23 12 | 20 11 10 24 4 13 | 14 21 16 12 6 14 | 15 | 14 21 17 24 4 16 | 10 16 15 9 19 17 | 18 8 23 26 20 18 | 22 11 13 6 5 19 | 2 0 12 3 7 -------------------------------------------------------------------------------- /2021/day5-go/go.mod: -------------------------------------------------------------------------------- 1 | module day5-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.27 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2021/day5-go/test.txt: -------------------------------------------------------------------------------- 1 | 0,9 -> 5,9 2 | 8,0 -> 0,8 3 | 9,4 -> 3,4 4 | 2,2 -> 2,1 5 | 7,0 -> 7,4 6 | 6,4 -> 2,0 7 | 0,9 -> 2,9 8 | 3,4 -> 1,4 9 | 0,0 -> 8,8 10 | 5,5 -> 8,2 -------------------------------------------------------------------------------- /2021/day5-haskell/Justfile: -------------------------------------------------------------------------------- 1 | dev: 2 | ghcid --command="stack ghci Main.hs" --test=":main" 3 | 4 | build: 5 | ghc -O Main.hs 6 | 7 | build1: 8 | ghc -O1 Main.hs 9 | 10 | build2: 11 | ghc -O2 Main.hs 12 | 13 | run: 14 | ./Main 15 | 16 | time: 17 | time ./Main 18 | -------------------------------------------------------------------------------- /2021/day5-haskell/Lib/Conversions.hs: -------------------------------------------------------------------------------- 1 | module Lib.Conversions 2 | ( binaryToDecimal 3 | ) where 4 | 5 | import Data.Char (digitToInt) 6 | import Numeric (readInt) 7 | 8 | binaryToDecimal :: String -> Int 9 | binaryToDecimal binaryString = 10 | case readInt 2 (`elem` "01") digitToInt binaryString of 11 | [(decimalValue, _)] -> decimalValue 12 | _ -> error "Invalid binary string" 13 | -------------------------------------------------------------------------------- /2021/day5-haskell/Lib/Lists.hs: -------------------------------------------------------------------------------- 1 | module Lib.Lists 2 | ( sublist 3 | ) where 4 | 5 | sublist :: Int -> Int -> [a] -> [a] 6 | sublist start end xs = take (end - start) $ drop start xs 7 | -------------------------------------------------------------------------------- /2021/day6-go/go.mod: -------------------------------------------------------------------------------- 1 | module day6-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.27 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2021/day6-go/test.txt: -------------------------------------------------------------------------------- 1 | 3,4,3,1,2 -------------------------------------------------------------------------------- /2021/day6-haskell/Justfile: -------------------------------------------------------------------------------- 1 | dev: 2 | ghcid --command="stack ghci Main.hs" --test=":main" 3 | 4 | build: 5 | ghc -O Main.hs 6 | 7 | build1: 8 | ghc -O1 Main.hs 9 | 10 | build2: 11 | ghc -O2 Main.hs 12 | 13 | run: 14 | ./Main 15 | 16 | time: 17 | time ./Main 18 | -------------------------------------------------------------------------------- /2021/day6-haskell/Lib/Conversions.hs: -------------------------------------------------------------------------------- 1 | module Lib.Conversions 2 | ( binaryToDecimal 3 | ) where 4 | 5 | import Data.Char (digitToInt) 6 | import Numeric (readInt) 7 | 8 | binaryToDecimal :: String -> Int 9 | binaryToDecimal binaryString = 10 | case readInt 2 (`elem` "01") digitToInt binaryString of 11 | [(decimalValue, _)] -> decimalValue 12 | _ -> error "Invalid binary string" 13 | -------------------------------------------------------------------------------- /2021/day6-haskell/Lib/Lists.hs: -------------------------------------------------------------------------------- 1 | module Lib.Lists 2 | ( sublist 3 | ) where 4 | 5 | sublist :: Int -> Int -> [a] -> [a] 6 | sublist start end xs = take (end - start) $ drop start xs 7 | -------------------------------------------------------------------------------- /2021/day7-go/go.mod: -------------------------------------------------------------------------------- 1 | module day7-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.27 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2021/day7-go/test.txt: -------------------------------------------------------------------------------- 1 | 16,1,2,0,4,2,7,1,2,14 -------------------------------------------------------------------------------- /2021/day7-haskell/.gitignore: -------------------------------------------------------------------------------- 1 | .stack-work/ 2 | *~ -------------------------------------------------------------------------------- /2021/day7-haskell/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog for `day7-haskell` 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 6 | and this project adheres to the 7 | [Haskell Package Versioning Policy](https://pvp.haskell.org/). 8 | 9 | ## Unreleased 10 | 11 | ## 0.1.0.0 - YYYY-MM-DD 12 | -------------------------------------------------------------------------------- /2021/day7-haskell/Justfile: -------------------------------------------------------------------------------- 1 | indent: 2 | hindent app/Main.hs 3 | hindent src/Lib.hs 4 | 5 | dev: 6 | ghcid -W --command="stack ghci" --test=":main" 7 | 8 | build: 9 | stack build 10 | 11 | run: 12 | just build 13 | stack exec day7-haskell-exe 14 | 15 | time: 16 | time stack exec day7-haskell-exe 17 | -------------------------------------------------------------------------------- /2021/day7-haskell/README.md: -------------------------------------------------------------------------------- 1 | # day7-haskell 2 | -------------------------------------------------------------------------------- /2021/day7-haskell/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /2021/day7-haskell/app/Main.hs: -------------------------------------------------------------------------------- 1 | import Lib 2 | import System.IO 3 | 4 | main :: IO () 5 | main = do 6 | handle <- openFile "input.txt" ReadMode 7 | contents <- hGetContents handle 8 | let linesList = lines contents 9 | let res = fn1 $ linesList !! 0 10 | print res 11 | -------------------------------------------------------------------------------- /2021/day7-haskell/src/Conversions.hs: -------------------------------------------------------------------------------- 1 | module Conversions 2 | ( binaryToDecimal 3 | ) where 4 | 5 | import Data.Char (digitToInt) 6 | import Numeric (readInt) 7 | 8 | binaryToDecimal :: String -> Int 9 | binaryToDecimal binaryString = 10 | case readInt 2 (`elem` "01") digitToInt binaryString of 11 | [(decimalValue, _)] -> decimalValue 12 | _ -> error "Invalid binary string" 13 | -------------------------------------------------------------------------------- /2021/day7-haskell/src/Lists.hs: -------------------------------------------------------------------------------- 1 | module Lists 2 | ( sublist 3 | ) where 4 | 5 | sublist :: Int -> Int -> [a] -> [a] 6 | sublist start end xs = take (end - start) $ drop start xs 7 | -------------------------------------------------------------------------------- /2021/day7-haskell/test/Spec.hs: -------------------------------------------------------------------------------- 1 | main :: IO () 2 | main = putStrLn "Test suite not yet implemented" 3 | -------------------------------------------------------------------------------- /2021/day8-go/go.mod: -------------------------------------------------------------------------------- 1 | module day8-go 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.27 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2021/day8-haskell/.gitignore: -------------------------------------------------------------------------------- 1 | .stack-work/ 2 | *~ -------------------------------------------------------------------------------- /2021/day8-haskell/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog for `day8-haskell` 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 6 | and this project adheres to the 7 | [Haskell Package Versioning Policy](https://pvp.haskell.org/). 8 | 9 | ## Unreleased 10 | 11 | ## 0.1.0.0 - YYYY-MM-DD 12 | -------------------------------------------------------------------------------- /2021/day8-haskell/Justfile: -------------------------------------------------------------------------------- 1 | indent: 2 | hindent app/Main.hs 3 | hindent src/Lib.hs 4 | 5 | dev: 6 | ghcid -W --command="stack ghci" --test=":main" 7 | 8 | build: 9 | stack build 10 | 11 | run: 12 | just build 13 | stack exec day8-haskell-exe 14 | 15 | time: 16 | time stack exec day7-haskell-exe 17 | -------------------------------------------------------------------------------- /2021/day8-haskell/README.md: -------------------------------------------------------------------------------- 1 | # day8-haskell 2 | -------------------------------------------------------------------------------- /2021/day8-haskell/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /2021/day8-haskell/app/Main.hs: -------------------------------------------------------------------------------- 1 | import Lib 2 | import System.IO 3 | 4 | main :: IO () 5 | main = do 6 | handle <- openFile "input.txt" ReadMode 7 | contents <- hGetContents handle 8 | let linesList = lines contents 9 | let res = fn1 linesList 10 | print res 11 | let res = fn2 linesList 12 | print res 13 | -------------------------------------------------------------------------------- /2021/day8-haskell/src/Conversions.hs: -------------------------------------------------------------------------------- 1 | module Conversions 2 | ( binaryToDecimal 3 | ) where 4 | 5 | import Data.Char (digitToInt) 6 | import Numeric (readInt) 7 | 8 | binaryToDecimal :: String -> Int 9 | binaryToDecimal binaryString = 10 | case readInt 2 (`elem` "01") digitToInt binaryString of 11 | [(decimalValue, _)] -> decimalValue 12 | _ -> error "Invalid binary string" 13 | -------------------------------------------------------------------------------- /2021/day8-haskell/src/Lists.hs: -------------------------------------------------------------------------------- 1 | module Lists 2 | ( sublist 3 | ) where 4 | 5 | sublist :: Int -> Int -> [a] -> [a] 6 | sublist start end xs = take (end - start) $ drop start xs 7 | -------------------------------------------------------------------------------- /2021/day8-haskell/test/Spec.hs: -------------------------------------------------------------------------------- 1 | main :: IO () 2 | main = putStrLn "Test suite not yet implemented" 3 | -------------------------------------------------------------------------------- /2021/day9-go/go.mod: -------------------------------------------------------------------------------- 1 | module day9-go 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/pmezard/go-difflib v1.0.0 // indirect 8 | github.com/stretchr/objx v0.5.0 // indirect 9 | github.com/stretchr/testify v1.8.1 // indirect 10 | github.com/teivah/advent-of-code v0.0.27 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2021/day9-go/test.txt: -------------------------------------------------------------------------------- 1 | 2199943210 2 | 3987894921 3 | 9856789892 4 | 8767896789 5 | 9899965678 -------------------------------------------------------------------------------- /2022/day1-rust/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "day1" 7 | version = "0.1.0" 8 | -------------------------------------------------------------------------------- /2022/day1-rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "day1" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /2022/day1-rust/test.txt: -------------------------------------------------------------------------------- 1 | 1000 2 | 2000 3 | 3000 4 | 5 | 4000 6 | 7 | 5000 8 | 6000 9 | 10 | 7000 11 | 8000 12 | 9000 13 | 14 | 10000 -------------------------------------------------------------------------------- /2022/day10-rust/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "day10-rust" 7 | version = "0.1.0" 8 | -------------------------------------------------------------------------------- /2022/day10-rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "day10-rust" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /2022/day11-rust/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "day11-rust" 7 | version = "0.1.0" 8 | -------------------------------------------------------------------------------- /2022/day11-rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "day11-rust" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /2022/day12-rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "day12-rust" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | priority-queue = "1.3.0" 10 | -------------------------------------------------------------------------------- /2022/day12-rust/test.txt: -------------------------------------------------------------------------------- 1 | Sabqponm 2 | abcryxxl 3 | accszExk 4 | acctuvwj 5 | abdefghi -------------------------------------------------------------------------------- /2022/day13-rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "day13-rust" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | either = "1.8.0" 10 | -------------------------------------------------------------------------------- /2022/day13-rust/test.txt: -------------------------------------------------------------------------------- 1 | [] 2 | [[]] 3 | [[[]]] 4 | [1,1,3,1,1] 5 | [1,1,5,1,1] 6 | [[1],[2,3,4]] 7 | [1,[2,[3,[4,[5,6,0]]]],8,9] 8 | [1,[2,[3,[4,[5,6,7]]]],8,9] 9 | [[1],4] 10 | [[2]] 11 | [3] 12 | [[4,4],4,4] 13 | [[4,4],4,4,4] 14 | [[6]] 15 | [7,7,7] 16 | [7,7,7,7] 17 | [[8,7,6]] 18 | [9] -------------------------------------------------------------------------------- /2022/day14-rust/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "day14-rust" 7 | version = "0.1.0" 8 | -------------------------------------------------------------------------------- /2022/day14-rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "day14-rust" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /2022/day14-rust/test.txt: -------------------------------------------------------------------------------- 1 | 498,4 -> 498,6 -> 496,6 2 | 503,4 -> 502,4 -> 502,9 -> 494,9 -------------------------------------------------------------------------------- /2022/day15-go/go.mod: -------------------------------------------------------------------------------- 1 | module day15-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2022/day15-rust/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "day15-rust" 7 | version = "0.1.0" 8 | -------------------------------------------------------------------------------- /2022/day15-rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "day15-rust" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /2022/day16-go/go.mod: -------------------------------------------------------------------------------- 1 | module day16-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2022/day17-go/go.mod: -------------------------------------------------------------------------------- 1 | module day17-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2022/day17-go/test.txt: -------------------------------------------------------------------------------- 1 | >>><<><>><<<>><>>><<<>>><<<><<<>><>><<>> -------------------------------------------------------------------------------- /2022/day18-go/go.mod: -------------------------------------------------------------------------------- 1 | module day18-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2022/day18-go/test.txt: -------------------------------------------------------------------------------- 1 | 2,2,2 2 | 1,2,2 3 | 3,2,2 4 | 2,1,2 5 | 2,3,2 6 | 2,2,1 7 | 2,2,3 8 | 2,2,4 9 | 2,2,6 10 | 1,2,5 11 | 3,2,5 12 | 2,1,5 13 | 2,3,5 -------------------------------------------------------------------------------- /2022/day18-rust/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "day18-rust" 7 | version = "0.1.0" 8 | -------------------------------------------------------------------------------- /2022/day18-rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "day18-rust" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /2022/day18-rust/test.txt: -------------------------------------------------------------------------------- 1 | 2,2,2 2 | 1,2,2 3 | 3,2,2 4 | 2,1,2 5 | 2,3,2 6 | 2,2,1 7 | 2,2,3 8 | 2,2,4 9 | 2,2,6 10 | 1,2,5 11 | 3,2,5 12 | 2,1,5 13 | 2,3,5 -------------------------------------------------------------------------------- /2022/day19-go/go.mod: -------------------------------------------------------------------------------- 1 | module day19-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2022/day19-go/test.txt: -------------------------------------------------------------------------------- 1 | Blueprint 1: Each ore robot costs 4 ore. Each clay robot costs 2 ore. Each obsidian robot costs 3 ore and 14 clay. Each geode robot costs 2 ore and 7 obsidian. 2 | Blueprint 2: Each ore robot costs 2 ore. Each clay robot costs 3 ore. Each obsidian robot costs 3 ore and 8 clay. Each geode robot costs 3 ore and 12 obsidian. -------------------------------------------------------------------------------- /2022/day19-rust/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "day19-rust" 7 | version = "0.1.0" 8 | -------------------------------------------------------------------------------- /2022/day19-rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "day19-rust" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /2022/day19-rust/test.txt: -------------------------------------------------------------------------------- 1 | Blueprint 1: Each ore robot costs 4 ore. Each clay robot costs 2 ore. Each obsidian robot costs 3 ore and 14 clay. Each geode robot costs 2 ore and 7 obsidian. 2 | Blueprint 2: Each ore robot costs 2 ore. Each clay robot costs 3 ore. Each obsidian robot costs 3 ore and 8 clay. Each geode robot costs 3 ore and 12 obsidian. -------------------------------------------------------------------------------- /2022/day2-rust/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "day2" 7 | version = "0.1.0" 8 | -------------------------------------------------------------------------------- /2022/day2-rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "day2" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /2022/day2-rust/test.txt: -------------------------------------------------------------------------------- 1 | A Y 2 | B X 3 | C Z -------------------------------------------------------------------------------- /2022/day20-go/go.mod: -------------------------------------------------------------------------------- 1 | module day20-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2022/day20-go/test.txt: -------------------------------------------------------------------------------- 1 | 1 2 | 2 3 | -3 4 | 3 5 | -2 6 | 0 7 | 4 -------------------------------------------------------------------------------- /2022/day21-go/go.mod: -------------------------------------------------------------------------------- 1 | module day21-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2022/day21-go/test.txt: -------------------------------------------------------------------------------- 1 | root: pppw + sjmn 2 | dbpl: 5 3 | cczh: sllz + lgvd 4 | zczc: 2 5 | ptdq: humn - dvpt 6 | dvpt: 3 7 | lfqf: 4 8 | humn: 5 9 | ljgn: 2 10 | sjmn: drzm * dbpl 11 | sllz: 4 12 | pppw: cczh / lfqf 13 | lgvd: ljgn * ptdq 14 | drzm: hmdt - zczc 15 | hmdt: 32 -------------------------------------------------------------------------------- /2022/day22-go/go.mod: -------------------------------------------------------------------------------- 1 | module day22-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2022/day22-go/test.txt: -------------------------------------------------------------------------------- 1 | ...# 2 | .#.. 3 | #... 4 | .... 5 | ...#.......# 6 | ........#... 7 | ..#....#.... 8 | ..........#. 9 | ...#.... 10 | .....#.. 11 | .#...... 12 | ......#. 13 | 14 | 10R5L5R10L4R5L5 -------------------------------------------------------------------------------- /2022/day23-go/go.mod: -------------------------------------------------------------------------------- 1 | module day23-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2022/day23-go/test.txt: -------------------------------------------------------------------------------- 1 | ....#.. 2 | ..###.# 3 | #...#.# 4 | .#...## 5 | #.###.. 6 | ##.#.## 7 | .#..#.. -------------------------------------------------------------------------------- /2022/day24-go/go.mod: -------------------------------------------------------------------------------- 1 | module day24-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2022/day24-go/test.txt: -------------------------------------------------------------------------------- 1 | #.###### 2 | #>>.<^<# 3 | #.<..<<# 4 | #>v.><># 5 | #<^v^^># 6 | ######.# -------------------------------------------------------------------------------- /2022/day24-go/unit.txt: -------------------------------------------------------------------------------- 1 | #.##### 2 | #.....# 3 | #>....# 4 | #.....# 5 | #...v.# 6 | #.....# 7 | #####.# -------------------------------------------------------------------------------- /2022/day25-go/go.mod: -------------------------------------------------------------------------------- 1 | module day25-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2022/day25-go/test.txt: -------------------------------------------------------------------------------- 1 | 1=-0-2 2 | 12111 3 | 2=0= 4 | 21 5 | 2=01 6 | 111 7 | 20012 8 | 112 9 | 1=-1= 10 | 1-12 11 | 12 12 | 1= 13 | 122 -------------------------------------------------------------------------------- /2022/day3-rust/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "day3" 7 | version = "0.1.0" 8 | -------------------------------------------------------------------------------- /2022/day3-rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "day3" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /2022/day3-rust/test.txt: -------------------------------------------------------------------------------- 1 | vJrwpWtwJgWrhcsFMMfFFhFp 2 | jqHRNqRjqzjGDLGLrsFMfFZSrLrFZsSL 3 | PmmdzqPrVvPwwTWBwg 4 | wMqvLMZHhHMvwLHjbvcjnnSBnvTQFn 5 | ttgJtRGJQctTZtZT 6 | CrZsJsPPZsGzwwsLwLmpwMDw -------------------------------------------------------------------------------- /2022/day4-rust/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "day4" 7 | version = "0.1.0" 8 | -------------------------------------------------------------------------------- /2022/day4-rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "day4" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /2022/day4-rust/test.txt: -------------------------------------------------------------------------------- 1 | 2-4,6-8 2 | 2-3,4-5 3 | 5-7,7-9 4 | 2-8,3-7 5 | 6-6,4-6 6 | 2-6,4-8 -------------------------------------------------------------------------------- /2022/day5-rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "day5" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | regex = "1" -------------------------------------------------------------------------------- /2022/day5-rust/test.txt: -------------------------------------------------------------------------------- 1 | [D] 2 | [N] [C] 3 | [Z] [M] [P] 4 | 1 2 3 5 | 6 | move 1 from 2 to 1 7 | move 3 from 1 to 3 8 | move 2 from 2 to 1 9 | move 1 from 1 to 2 -------------------------------------------------------------------------------- /2022/day6-rust/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "day6" 7 | version = "0.1.0" 8 | -------------------------------------------------------------------------------- /2022/day6-rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "day6" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /2022/day7-go/go.mod: -------------------------------------------------------------------------------- 1 | module day7-go 2 | 3 | go 1.18 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /2022/day7-go/test.txt: -------------------------------------------------------------------------------- 1 | $ cd / 2 | $ ls 3 | dir a 4 | 14848514 b.txt 5 | 8504156 c.dat 6 | dir d 7 | $ cd a 8 | $ ls 9 | dir e 10 | 29116 f 11 | 2557 g 12 | 62596 h.lst 13 | $ cd e 14 | $ ls 15 | 584 i 16 | $ cd .. 17 | $ cd .. 18 | $ cd d 19 | $ ls 20 | 4060174 j 21 | 8033020 d.log 22 | 5626152 d.ext 23 | 7214296 k -------------------------------------------------------------------------------- /2022/day7-rust/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "day7" 7 | version = "0.1.0" 8 | -------------------------------------------------------------------------------- /2022/day7-rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "day7" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /2022/day7-rust/test.txt: -------------------------------------------------------------------------------- 1 | $ cd / 2 | $ ls 3 | dir a 4 | 14848514 b.txt 5 | 8504156 c.dat 6 | dir d 7 | $ cd a 8 | $ ls 9 | dir e 10 | 29116 f 11 | 2557 g 12 | 62596 h.lst 13 | $ cd e 14 | $ ls 15 | 584 i 16 | $ cd .. 17 | $ cd .. 18 | $ cd d 19 | $ ls 20 | 4060174 j 21 | 8033020 d.log 22 | 5626152 d.ext 23 | 7214296 k -------------------------------------------------------------------------------- /2022/day8-rust/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "day8" 7 | version = "0.1.0" 8 | -------------------------------------------------------------------------------- /2022/day8-rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "day8" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /2022/day8-rust/test.txt: -------------------------------------------------------------------------------- 1 | 30373 2 | 25512 3 | 65332 4 | 33549 5 | 35390 -------------------------------------------------------------------------------- /2022/day9-rust/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "day9" 7 | version = "0.1.0" 8 | -------------------------------------------------------------------------------- /2022/day9-rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "day9" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /2022/day9-rust/larger_test.txt: -------------------------------------------------------------------------------- 1 | R 5 2 | U 8 3 | L 8 4 | D 3 5 | R 17 6 | D 10 7 | L 25 8 | U 20 -------------------------------------------------------------------------------- /2022/day9-rust/test.txt: -------------------------------------------------------------------------------- 1 | R 4 2 | U 4 3 | L 3 4 | D 1 5 | R 4 6 | D 1 7 | L 5 8 | R 2 -------------------------------------------------------------------------------- /2023/day1-haskell/Justfile: -------------------------------------------------------------------------------- 1 | build: 2 | ghcid --command="stack ghci Main.hs" --test=":main" -------------------------------------------------------------------------------- /2023/day1-rust/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "template-rust" 7 | version = "0.1.0" 8 | -------------------------------------------------------------------------------- /2023/day1-rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "template-rust" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /2023/day1-rust/test.txt: -------------------------------------------------------------------------------- 1 | 1abc2 2 | pqr3stu8vwx 3 | a1b2c3d4e5f 4 | treb7uchet -------------------------------------------------------------------------------- /2023/day1-rust/test2.txt: -------------------------------------------------------------------------------- 1 | two1nine 2 | eightwothree 3 | abcone2threexyz 4 | xtwone3four 5 | 4nineeightseven2 6 | zoneight234 7 | 7pqrstsixteen -------------------------------------------------------------------------------- /2023/day10-go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2023/day10-go/test.txt -------------------------------------------------------------------------------- /2023/day11-go/go.mod: -------------------------------------------------------------------------------- 1 | module day2023-9 2 | 3 | go 1.21 4 | 5 | require github.com/stretchr/testify v1.8.4 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | github.com/teivah/advent-of-code v1.1.0 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2023/day11-go/test.txt: -------------------------------------------------------------------------------- 1 | ...#...... 2 | .......#.. 3 | #......... 4 | .......... 5 | ......#... 6 | .#........ 7 | .........# 8 | .......... 9 | .......#.. 10 | #...#..... -------------------------------------------------------------------------------- /2023/day12-go/test.txt: -------------------------------------------------------------------------------- 1 | ???.### 1,1,3 2 | .??..??...?##. 1,1,3 3 | ?#?#?#?#?#?#?#? 1,3,1,6 4 | ????.#...#... 4,1,1 5 | ????.######..#####. 1,6,5 6 | ?###???????? 3,2,1 -------------------------------------------------------------------------------- /2023/day13-go/test.txt: -------------------------------------------------------------------------------- 1 | #.##..##. 2 | ..#.##.#. 3 | ##......# 4 | ##......# 5 | ..#.##.#. 6 | ..##..##. 7 | #.#.##.#. 8 | 9 | #...##..# 10 | #....#..# 11 | ..##..### 12 | #####.##. 13 | #####.##. 14 | ..##..### 15 | #....#..# -------------------------------------------------------------------------------- /2023/day14-go/go.mod: -------------------------------------------------------------------------------- 1 | module day2023-13 2 | 3 | go 1.21 4 | 5 | require github.com/stretchr/testify v1.8.4 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | github.com/teivah/advent-of-code v1.1.1 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2023/day14-go/test.txt: -------------------------------------------------------------------------------- 1 | O....#.... 2 | O.OO#....# 3 | .....##... 4 | OO.#O....O 5 | .O.....O#. 6 | O.#..O.#.# 7 | ..O..#O..O 8 | .......O.. 9 | #....###.. 10 | #OO..#.... -------------------------------------------------------------------------------- /2023/day15-go/test.txt: -------------------------------------------------------------------------------- 1 | rn=1,cm-,qp=3,cm=2,qp-,pc=4,ot=9,ab=5,pc-,pc=6,ot=7 -------------------------------------------------------------------------------- /2023/day16-go/go.mod: -------------------------------------------------------------------------------- 1 | module day2023-16 2 | 3 | go 1.21 4 | 5 | require ( 6 | github.com/stretchr/testify v1.8.4 7 | github.com/teivah/advent-of-code v1.5.3 8 | golang.org/x/sync v0.5.0 9 | ) 10 | 11 | require ( 12 | github.com/davecgh/go-spew v1.1.1 // indirect 13 | github.com/pmezard/go-difflib v1.0.0 // indirect 14 | gopkg.in/yaml.v3 v3.0.1 // indirect 15 | ) 16 | -------------------------------------------------------------------------------- /2023/day16-go/test.txt: -------------------------------------------------------------------------------- 1 | .|...\.... 2 | |.-.\..... 3 | .....|-... 4 | ........|. 5 | .......... 6 | .........\ 7 | ..../.\\.. 8 | .-.-/..|.. 9 | .|....-|.\ 10 | ..//.|.... -------------------------------------------------------------------------------- /2023/day17-go/test.txt: -------------------------------------------------------------------------------- 1 | 2413432311323 2 | 3215453535623 3 | 3255245654254 4 | 3446585845452 5 | 4546657867536 6 | 1438598798454 7 | 4457876987766 8 | 3637877979653 9 | 4654967986887 10 | 4564679986453 11 | 1224686865563 12 | 2546548887735 13 | 4322674655533 -------------------------------------------------------------------------------- /2023/day18-go/test.txt: -------------------------------------------------------------------------------- 1 | R 6 (#70c710) 2 | D 5 (#0dc571) 3 | L 2 (#5713f0) 4 | D 2 (#d2c081) 5 | R 2 (#59c680) 6 | D 2 (#411b91) 7 | L 5 (#8ceee2) 8 | U 2 (#caa173) 9 | L 1 (#1b58a2) 10 | U 2 (#caa171) 11 | R 2 (#7807d2) 12 | U 3 (#a77fa3) 13 | L 2 (#015232) 14 | U 2 (#7a21e3) -------------------------------------------------------------------------------- /2023/day19-go/go.mod: -------------------------------------------------------------------------------- 1 | module day2023-19 2 | 3 | go 1.21 4 | 5 | require ( 6 | github.com/stretchr/testify v1.8.4 7 | github.com/teivah/advent-of-code v1.8.3 8 | ) 9 | 10 | require ( 11 | github.com/davecgh/go-spew v1.1.1 // indirect 12 | github.com/pmezard/go-difflib v1.0.0 // indirect 13 | gopkg.in/yaml.v3 v3.0.1 // indirect 14 | ) 15 | -------------------------------------------------------------------------------- /2023/day2-go/test.txt: -------------------------------------------------------------------------------- 1 | Game 1: 3 blue, 4 red; 1 red, 2 green, 6 blue; 2 green 2 | Game 2: 1 blue, 2 green; 3 green, 4 blue, 1 red; 1 green, 1 blue 3 | Game 3: 8 green, 6 blue, 20 red; 5 blue, 4 red, 13 green; 5 green, 1 red 4 | Game 4: 1 green, 3 red, 6 blue; 3 green, 6 red; 3 green, 15 blue, 14 red 5 | Game 5: 6 red, 1 blue, 3 green; 2 blue, 1 red, 2 green -------------------------------------------------------------------------------- /2023/day2-haskell/Justfile: -------------------------------------------------------------------------------- 1 | build: 2 | ghcid --command="stack ghci Main.hs" --test=":main" -------------------------------------------------------------------------------- /2023/day2-python/test.txt: -------------------------------------------------------------------------------- 1 | Game 1: 3 blue, 4 red; 1 red, 2 green, 6 blue; 2 green 2 | Game 2: 1 blue, 2 green; 3 green, 4 blue, 1 red; 1 green, 1 blue 3 | Game 3: 8 green, 6 blue, 20 red; 5 blue, 4 red, 13 green; 5 green, 1 red 4 | Game 4: 1 green, 3 red, 6 blue; 3 green, 6 red; 3 green, 15 blue, 14 red 5 | Game 5: 6 red, 1 blue, 3 green; 2 blue, 1 red, 2 green -------------------------------------------------------------------------------- /2023/day20-go/test.txt: -------------------------------------------------------------------------------- 1 | broadcaster -> a, b, c 2 | %a -> b 3 | %b -> c 4 | %c -> inv 5 | &inv -> a -------------------------------------------------------------------------------- /2023/day20-go/test2.txt: -------------------------------------------------------------------------------- 1 | broadcaster -> a 2 | %a -> inv, con 3 | &inv -> b 4 | %b -> con 5 | &con -> output -------------------------------------------------------------------------------- /2023/day21-go/test.txt: -------------------------------------------------------------------------------- 1 | ........... 2 | .....###.#. 3 | .###.##..#. 4 | ..#.#...#.. 5 | ....#.#.... 6 | .##..S####. 7 | .##..#...#. 8 | .......##.. 9 | .##.#.####. 10 | .##..##.##. 11 | ........... -------------------------------------------------------------------------------- /2023/day22-go/test.txt: -------------------------------------------------------------------------------- 1 | 1,0,1~1,2,1 2 | 0,0,2~2,0,2 3 | 0,2,3~2,2,3 4 | 0,0,4~0,2,4 5 | 2,0,5~2,2,5 6 | 0,1,6~2,1,6 7 | 1,1,8~1,1,9 -------------------------------------------------------------------------------- /2023/day24-go/test.txt: -------------------------------------------------------------------------------- 1 | 19, 13, 30 @ -2, 1, -2 2 | 18, 19, 22 @ -1, -1, -2 3 | 20, 25, 34 @ -2, -2, -4 4 | 12, 31, 28 @ -1, -2, -1 5 | 20, 19, 15 @ 1, -5, -3 -------------------------------------------------------------------------------- /2023/day25-go/main_test.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "os" 5 | "testing" 6 | 7 | "github.com/stretchr/testify/assert" 8 | "github.com/stretchr/testify/require" 9 | ) 10 | 11 | func TestFs1Input(t *testing.T) { 12 | f, err := os.Open("input.txt") 13 | require.NoError(t, err) 14 | assert.Equal(t, 591890, fs1(f)) 15 | } 16 | -------------------------------------------------------------------------------- /2023/day25-go/test.txt: -------------------------------------------------------------------------------- 1 | jqt: rhn xhk nvd 2 | rsh: frs pzl lsr 3 | xhk: hfx 4 | cmg: qnr nvd lhk bvb 5 | rhn: xhk bvb hfx 6 | bvb: xhk hfx 7 | pzl: lsr hfx nvd 8 | qnr: nvd 9 | ntq: jqt hfx bvb xhk 10 | nvd: lhk 11 | lsr: lhk 12 | rzs: qnr cmg lsr rsh 13 | frs: qnr lhk lsr -------------------------------------------------------------------------------- /2023/day3-go/test.txt: -------------------------------------------------------------------------------- 1 | 467..114.. 2 | ...*...... 3 | ..35..633. 4 | ......#... 5 | 617*...... 6 | .....+.58. 7 | ..592..... 8 | ......755. 9 | ...$.*.... 10 | .664.598.. -------------------------------------------------------------------------------- /2023/day3-haskell/Justfile: -------------------------------------------------------------------------------- 1 | build: 2 | ghcid --command="stack ghci Main.hs" --test=":main" 3 | 4 | format: 5 | hindent Main.hs -------------------------------------------------------------------------------- /2023/day4-go/test.txt: -------------------------------------------------------------------------------- 1 | Card 1: 41 48 83 86 17 | 83 86 6 31 17 9 48 53 2 | Card 2: 13 32 20 16 61 | 61 30 68 82 17 32 24 19 3 | Card 3: 1 21 53 59 44 | 69 82 63 72 16 21 14 1 4 | Card 4: 41 92 73 84 69 | 59 84 76 51 58 5 54 83 5 | Card 5: 87 83 26 28 32 | 88 30 70 12 93 22 82 36 6 | Card 6: 31 18 13 56 72 | 74 77 10 23 35 67 36 11 -------------------------------------------------------------------------------- /2023/day4-haskell/Justfile: -------------------------------------------------------------------------------- 1 | build: 2 | ghcid --command="stack ghci Main.hs" --test=":main" -------------------------------------------------------------------------------- /2023/day6-go/input.txt: -------------------------------------------------------------------------------- 1 | Time: 55 82 64 90 2 | Distance: 246 1441 1012 1111 -------------------------------------------------------------------------------- /2023/day6-go/test.txt: -------------------------------------------------------------------------------- 1 | Time: 7 15 30 2 | Distance: 9 40 200 -------------------------------------------------------------------------------- /2023/day6-haskell/Justfile: -------------------------------------------------------------------------------- 1 | dev: 2 | ghcid --command="stack ghci Main.hs" --test=":main" 3 | 4 | build: 5 | ghc -O Main.hs 6 | 7 | build1: 8 | ghc -O1 Main.hs 9 | 10 | build2: 11 | ghc -O2 Main.hs 12 | 13 | run: 14 | ./Main 15 | 16 | time: 17 | time ./Main 18 | -------------------------------------------------------------------------------- /2023/day6-haskell/input.txt: -------------------------------------------------------------------------------- 1 | Time: 55 82 64 90 2 | Distance: 246 1441 1012 1111 -------------------------------------------------------------------------------- /2023/day7-go/test.txt: -------------------------------------------------------------------------------- 1 | 32T3K 765 2 | T55J5 684 3 | KK677 28 4 | KTJJT 220 5 | QQQJA 483 -------------------------------------------------------------------------------- /2023/day7-haskell/Justfile: -------------------------------------------------------------------------------- 1 | dev: 2 | ghcid --command="stack ghci Main.hs" --test=":main" 3 | 4 | build: 5 | ghc -O Main.hs 6 | 7 | build1: 8 | ghc -O1 Main.hs 9 | 10 | build2: 11 | ghc -O2 Main.hs 12 | 13 | run: 14 | ./Main 15 | 16 | time: 17 | time ./Main 18 | -------------------------------------------------------------------------------- /2023/day8-haskell/Justfile: -------------------------------------------------------------------------------- 1 | dev: 2 | ghcid --command="stack ghci Main.hs" --test=":main" 3 | 4 | build: 5 | ghc -O Main.hs 6 | 7 | build1: 8 | ghc -O1 Main.hs 9 | 10 | build2: 11 | ghc -O2 Main.hs 12 | 13 | run: 14 | ./Main 15 | 16 | time: 17 | time ./Main 18 | -------------------------------------------------------------------------------- /2023/day8-haskell/Lib/Directions.hs: -------------------------------------------------------------------------------- 1 | module Lib.Directions 2 | ( Direction(..) 3 | ) where 4 | 5 | data Direction = DirUp | DirDown | DirLeft | DirRight 6 | deriving (Show, Eq) 7 | -------------------------------------------------------------------------------- /2023/day9-go/go.mod: -------------------------------------------------------------------------------- 1 | module day2023-9 2 | 3 | go 1.21 4 | 5 | require github.com/stretchr/testify v1.8.4 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | github.com/teivah/advent-of-code v1.1.0 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 // indirect 12 | ) 13 | -------------------------------------------------------------------------------- /2023/day9-go/test.txt: -------------------------------------------------------------------------------- 1 | 0 3 6 9 12 15 2 | 1 3 6 10 15 21 3 | 10 13 16 21 30 45 -------------------------------------------------------------------------------- /2024/day1-go/go.mod: -------------------------------------------------------------------------------- 1 | module day2024-1 2 | 3 | go 1.22.0 4 | 5 | toolchain go1.22.1 6 | 7 | require ( 8 | github.com/stretchr/testify v1.10.0 9 | github.com/teivah/advent-of-code v1.9.1 10 | ) 11 | 12 | require ( 13 | github.com/davecgh/go-spew v1.1.1 // indirect 14 | github.com/pmezard/go-difflib v1.0.0 // indirect 15 | gopkg.in/yaml.v3 v3.0.1 // indirect 16 | ) 17 | -------------------------------------------------------------------------------- /2024/day1-go/test.txt: -------------------------------------------------------------------------------- 1 | 3 4 2 | 4 3 3 | 2 5 4 | 1 3 5 | 3 9 6 | 3 3 -------------------------------------------------------------------------------- /2024/day10-go/go.mod: -------------------------------------------------------------------------------- 1 | module day2024-10 2 | 3 | go 1.23.3 4 | 5 | require github.com/stretchr/testify v1.10.0 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | github.com/teivah/go-aoc v1.0.1 // indirect 11 | golang.org/x/exp v0.0.0-20241204233417-43b7b7cde48d // indirect 12 | gopkg.in/yaml.v3 v3.0.1 // indirect 13 | ) 14 | -------------------------------------------------------------------------------- /2024/day10-go/go/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "io" 5 | 6 | "github.com/teivah/go-aoc" 7 | ) 8 | 9 | func fs1(input io.Reader) int { 10 | _ = aoc.ReaderToStrings(input) 11 | return 42 12 | } 13 | 14 | func fs2(input io.Reader) int { 15 | _ = aoc.ReaderToStrings(input) 16 | return 42 17 | } 18 | -------------------------------------------------------------------------------- /2024/day10-go/go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/2024/day10-go/go/test.txt -------------------------------------------------------------------------------- /2024/day10-go/test.txt: -------------------------------------------------------------------------------- 1 | 89010123 2 | 78121874 3 | 87430965 4 | 96549874 5 | 45678903 6 | 32019012 7 | 01329801 8 | 10456732 -------------------------------------------------------------------------------- /2024/day11-go/go.mod: -------------------------------------------------------------------------------- 1 | module day2024-11 2 | 3 | go 1.23.3 4 | 5 | require ( 6 | github.com/stretchr/testify v1.10.0 7 | github.com/teivah/go-aoc v1.0.2 8 | ) 9 | 10 | require ( 11 | github.com/davecgh/go-spew v1.1.1 // indirect 12 | github.com/pmezard/go-difflib v1.0.0 // indirect 13 | golang.org/x/exp v0.0.0-20241210194714-1829a127f884 // indirect 14 | gopkg.in/yaml.v3 v3.0.1 // indirect 15 | ) 16 | -------------------------------------------------------------------------------- /2024/day11-go/input.txt: -------------------------------------------------------------------------------- 1 | 4189 413 82070 61 655813 7478611 0 8 -------------------------------------------------------------------------------- /2024/day11-go/test.txt: -------------------------------------------------------------------------------- 1 | 125 17 -------------------------------------------------------------------------------- /2024/day12-go/go.mod: -------------------------------------------------------------------------------- 1 | module day2024-12 2 | 3 | go 1.23.3 4 | 5 | require ( 6 | github.com/stretchr/testify v1.10.0 7 | github.com/teivah/go-aoc v1.0.4 8 | ) 9 | 10 | require ( 11 | github.com/davecgh/go-spew v1.1.1 // indirect 12 | github.com/pmezard/go-difflib v1.0.0 // indirect 13 | golang.org/x/exp v0.0.0-20241210194714-1829a127f884 // indirect 14 | gopkg.in/yaml.v3 v3.0.1 // indirect 15 | ) 16 | -------------------------------------------------------------------------------- /2024/day12-go/test.txt: -------------------------------------------------------------------------------- 1 | RRRRIICCFF 2 | RRRRIICCCF 3 | VVRRRCCFFF 4 | VVRCCCJFFF 5 | VVVVCJJCFE 6 | VVIVCCJJEE 7 | VVIIICJJEE 8 | MIIIIIJJEE 9 | MIIISIJEEE 10 | MMMISSJEEE -------------------------------------------------------------------------------- /2024/day13-go/go.mod: -------------------------------------------------------------------------------- 1 | module day2024-13 2 | 3 | go 1.23.3 4 | 5 | require ( 6 | github.com/stretchr/testify v1.10.0 7 | github.com/teivah/go-aoc v1.0.4 8 | ) 9 | 10 | require ( 11 | github.com/davecgh/go-spew v1.1.1 // indirect 12 | github.com/pmezard/go-difflib v1.0.0 // indirect 13 | golang.org/x/exp v0.0.0-20241210194714-1829a127f884 // indirect 14 | gopkg.in/yaml.v3 v3.0.1 // indirect 15 | ) 16 | -------------------------------------------------------------------------------- /2024/day13-go/test.txt: -------------------------------------------------------------------------------- 1 | Button A: X+94, Y+34 2 | Button B: X+22, Y+67 3 | Prize: X=8400, Y=5400 4 | 5 | Button A: X+26, Y+66 6 | Button B: X+67, Y+21 7 | Prize: X=12748, Y=12176 8 | 9 | Button A: X+17, Y+86 10 | Button B: X+84, Y+37 11 | Prize: X=7870, Y=6450 12 | 13 | Button A: X+69, Y+23 14 | Button B: X+27, Y+71 15 | Prize: X=18641, Y=10279 -------------------------------------------------------------------------------- /2024/day14-go/go.mod: -------------------------------------------------------------------------------- 1 | module day2024-14 2 | 3 | go 1.23 4 | 5 | require ( 6 | github.com/stretchr/testify v1.10.0 7 | github.com/teivah/go-aoc v1.0.7 8 | ) 9 | 10 | require ( 11 | github.com/davecgh/go-spew v1.1.1 // indirect 12 | github.com/pmezard/go-difflib v1.0.0 // indirect 13 | golang.org/x/exp v0.0.0-20241210194714-1829a127f884 // indirect 14 | gopkg.in/yaml.v3 v3.0.1 // indirect 15 | ) 16 | -------------------------------------------------------------------------------- /2024/day14-go/test.txt: -------------------------------------------------------------------------------- 1 | p=0,4 v=3,-3 2 | p=6,3 v=-1,-3 3 | p=10,3 v=-1,2 4 | p=2,0 v=2,-1 5 | p=0,0 v=1,3 6 | p=3,0 v=-2,-2 7 | p=7,6 v=-1,-3 8 | p=3,0 v=-1,-2 9 | p=9,3 v=2,3 10 | p=7,3 v=-1,2 11 | p=2,4 v=2,-3 12 | p=9,5 v=-3,-3 -------------------------------------------------------------------------------- /2024/day15-go/go.mod: -------------------------------------------------------------------------------- 1 | module day2024-15 2 | 3 | go 1.23.3 4 | 5 | require ( 6 | github.com/stretchr/testify v1.10.0 7 | github.com/teivah/go-aoc v1.0.7 8 | ) 9 | 10 | require ( 11 | github.com/davecgh/go-spew v1.1.1 // indirect 12 | github.com/pmezard/go-difflib v1.0.0 // indirect 13 | golang.org/x/exp v0.0.0-20241210194714-1829a127f884 // indirect 14 | gopkg.in/yaml.v3 v3.0.1 // indirect 15 | ) 16 | -------------------------------------------------------------------------------- /2024/day15-go/test_small.txt: -------------------------------------------------------------------------------- 1 | ######## 2 | #..O.O.# 3 | ##@.O..# 4 | #...O..# 5 | #.#.O..# 6 | #...O..# 7 | #......# 8 | ######## 9 | 10 | <^^>>>vv>v<< -------------------------------------------------------------------------------- /2024/day16-go/go.mod: -------------------------------------------------------------------------------- 1 | module day2024-16 2 | 3 | go 1.23.3 4 | 5 | require ( 6 | github.com/stretchr/testify v1.10.0 7 | github.com/teivah/go-aoc v1.0.9 8 | ) 9 | 10 | require ( 11 | github.com/davecgh/go-spew v1.1.1 // indirect 12 | github.com/pmezard/go-difflib v1.0.0 // indirect 13 | golang.org/x/exp v0.0.0-20241215155358-4a5509556b9e // indirect 14 | gopkg.in/yaml.v3 v3.0.1 // indirect 15 | ) 16 | -------------------------------------------------------------------------------- /2024/day16-go/test1.txt: -------------------------------------------------------------------------------- 1 | ############### 2 | #.......#....E# 3 | #.#.###.#.###.# 4 | #.....#.#...#.# 5 | #.###.#####.#.# 6 | #.#.#.......#.# 7 | #.#.#####.###.# 8 | #...........#.# 9 | ###.#.#####.#.# 10 | #...#.....#.#.# 11 | #.#.#.###.#.#.# 12 | #.....#...#.#.# 13 | #.###.#.#.#.#.# 14 | #S..#.....#...# 15 | ############### -------------------------------------------------------------------------------- /2024/day16-go/test2.txt: -------------------------------------------------------------------------------- 1 | ################# 2 | #...#...#...#..E# 3 | #.#.#.#.#.#.#.#.# 4 | #.#.#.#...#...#.# 5 | #.#.#.#.###.#.#.# 6 | #...#.#.#.....#.# 7 | #.#.#.#.#.#####.# 8 | #.#...#.#.#.....# 9 | #.#.#####.#.###.# 10 | #.#.#.......#...# 11 | #.#.###.#####.### 12 | #.#.#...#.....#.# 13 | #.#.#.#####.###.# 14 | #.#.#.........#.# 15 | #.#.#.#########.# 16 | #S#.............# 17 | ################# -------------------------------------------------------------------------------- /2024/day17-go/input.txt: -------------------------------------------------------------------------------- 1 | Register A: 51571418 2 | Register B: 0 3 | Register C: 0 4 | 5 | Program: 2,4,1,1,7,5,0,3,1,4,4,5,5,5,3,0 -------------------------------------------------------------------------------- /2024/day17-go/test.txt: -------------------------------------------------------------------------------- 1 | Register A: 729 2 | Register B: 0 3 | Register C: 0 4 | 5 | Program: 0,1,5,4,3,0 -------------------------------------------------------------------------------- /2024/day17-go/test2.txt: -------------------------------------------------------------------------------- 1 | Register A: 2024 2 | Register B: 0 3 | Register C: 0 4 | 5 | Program: 0,3,5,4,3,0 -------------------------------------------------------------------------------- /2024/day18-go/go.mod: -------------------------------------------------------------------------------- 1 | module day2024-18 2 | 3 | go 1.23.3 4 | 5 | require ( 6 | github.com/stretchr/testify v1.10.0 7 | github.com/teivah/go-aoc v1.0.9 8 | ) 9 | 10 | require ( 11 | github.com/davecgh/go-spew v1.1.1 // indirect 12 | github.com/pmezard/go-difflib v1.0.0 // indirect 13 | golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 // indirect 14 | gopkg.in/yaml.v3 v3.0.1 // indirect 15 | ) 16 | -------------------------------------------------------------------------------- /2024/day18-go/test.txt: -------------------------------------------------------------------------------- 1 | 5,4 2 | 4,2 3 | 4,5 4 | 3,0 5 | 2,1 6 | 6,3 7 | 2,4 8 | 1,5 9 | 0,6 10 | 3,3 11 | 2,6 12 | 5,1 13 | 1,2 14 | 5,5 15 | 2,5 16 | 6,5 17 | 1,4 18 | 0,4 19 | 6,4 20 | 1,1 21 | 6,1 22 | 1,0 23 | 0,5 24 | 1,6 25 | 2,0 -------------------------------------------------------------------------------- /2024/day19-go/go.mod: -------------------------------------------------------------------------------- 1 | module day2024-19 2 | 3 | go 1.23.3 4 | 5 | require ( 6 | github.com/stretchr/testify v1.10.0 7 | github.com/teivah/go-aoc v1.0.9 8 | ) 9 | 10 | require ( 11 | github.com/davecgh/go-spew v1.1.1 // indirect 12 | github.com/pmezard/go-difflib v1.0.0 // indirect 13 | golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 // indirect 14 | gopkg.in/yaml.v3 v3.0.1 // indirect 15 | ) 16 | -------------------------------------------------------------------------------- /2024/day19-go/test.txt: -------------------------------------------------------------------------------- 1 | r, wr, b, g, bwu, rb, gb, br 2 | 3 | brwrr 4 | bggr 5 | gbbr 6 | rrbgbr 7 | ubwu 8 | bwurrg 9 | brgr 10 | bbrgwb -------------------------------------------------------------------------------- /2024/day2-go/test.txt: -------------------------------------------------------------------------------- 1 | 7 6 4 2 1 2 | 1 2 7 8 9 3 | 9 7 6 2 1 4 | 1 3 2 4 5 5 | 8 6 4 4 1 6 | 1 3 6 7 9 -------------------------------------------------------------------------------- /2024/day20-go/go.mod: -------------------------------------------------------------------------------- 1 | module day2024-20 2 | 3 | go 1.23.3 4 | 5 | require ( 6 | github.com/stretchr/testify v1.10.0 7 | github.com/teivah/go-aoc v1.0.11 8 | ) 9 | 10 | require ( 11 | github.com/davecgh/go-spew v1.1.1 // indirect 12 | github.com/pmezard/go-difflib v1.0.0 // indirect 13 | golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 // indirect 14 | gopkg.in/yaml.v3 v3.0.1 // indirect 15 | ) 16 | -------------------------------------------------------------------------------- /2024/day20-go/test.txt: -------------------------------------------------------------------------------- 1 | ############### 2 | #...#...#.....# 3 | #.#.#.#.#.###.# 4 | #S#...#.#.#...# 5 | #######.#.#.### 6 | #######.#.#...# 7 | #######.#.###.# 8 | ###..E#...#...# 9 | ###.#######.### 10 | #...###...#...# 11 | #.#####.#.###.# 12 | #.#...#.#.#...# 13 | #.#.#.#.#.#.### 14 | #...#...#...### 15 | ############### -------------------------------------------------------------------------------- /2024/day21-go/go.mod: -------------------------------------------------------------------------------- 1 | module day2024-21 2 | 3 | go 1.23.3 4 | 5 | require ( 6 | github.com/stretchr/testify v1.10.0 7 | github.com/teivah/go-aoc v1.0.12 8 | ) 9 | 10 | require ( 11 | github.com/davecgh/go-spew v1.1.1 // indirect 12 | github.com/pmezard/go-difflib v1.0.0 // indirect 13 | golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 // indirect 14 | gopkg.in/yaml.v3 v3.0.1 // indirect 15 | ) 16 | -------------------------------------------------------------------------------- /2024/day21-go/input.txt: -------------------------------------------------------------------------------- 1 | 780A 2 | 846A 3 | 965A 4 | 386A 5 | 638A -------------------------------------------------------------------------------- /2024/day21-go/test.txt: -------------------------------------------------------------------------------- 1 | 029A 2 | 980A 3 | 179A 4 | 456A 5 | 379A -------------------------------------------------------------------------------- /2024/day22-go/go.mod: -------------------------------------------------------------------------------- 1 | module day2024-22 2 | 3 | go 1.23.3 4 | 5 | require ( 6 | github.com/stretchr/testify v1.10.0 7 | github.com/teivah/go-aoc v1.0.11 8 | ) 9 | 10 | require ( 11 | github.com/davecgh/go-spew v1.1.1 // indirect 12 | github.com/pmezard/go-difflib v1.0.0 // indirect 13 | golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 // indirect 14 | gopkg.in/yaml.v3 v3.0.1 // indirect 15 | ) 16 | -------------------------------------------------------------------------------- /2024/day22-go/test.txt: -------------------------------------------------------------------------------- 1 | 1 2 | 10 3 | 100 4 | 2024 -------------------------------------------------------------------------------- /2024/day22-go/test2.txt: -------------------------------------------------------------------------------- 1 | 1 2 | 2 3 | 3 4 | 2024 -------------------------------------------------------------------------------- /2024/day23-go/go.mod: -------------------------------------------------------------------------------- 1 | module day2024-23 2 | 3 | go 1.23.3 4 | 5 | require ( 6 | github.com/stretchr/testify v1.10.0 7 | github.com/teivah/go-aoc v1.0.12 8 | ) 9 | 10 | require ( 11 | github.com/davecgh/go-spew v1.1.1 // indirect 12 | github.com/pmezard/go-difflib v1.0.0 // indirect 13 | golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 // indirect 14 | gopkg.in/yaml.v3 v3.0.1 // indirect 15 | ) 16 | -------------------------------------------------------------------------------- /2024/day23-go/test.txt: -------------------------------------------------------------------------------- 1 | kh-tc 2 | qp-kh 3 | de-cg 4 | ka-co 5 | yn-aq 6 | qp-ub 7 | cg-tb 8 | vc-aq 9 | tb-ka 10 | wh-tc 11 | yn-cg 12 | kh-ub 13 | ta-co 14 | de-co 15 | tc-td 16 | tb-wq 17 | wh-td 18 | ta-ka 19 | td-qp 20 | aq-cg 21 | wq-ub 22 | ub-vc 23 | de-ta 24 | wq-aq 25 | wq-vc 26 | wh-yn 27 | ka-de 28 | kh-ta 29 | co-tc 30 | wh-qp 31 | tb-vc 32 | td-yn -------------------------------------------------------------------------------- /2024/day24-go/go.mod: -------------------------------------------------------------------------------- 1 | module day2024-24 2 | 3 | go 1.23.3 4 | 5 | require ( 6 | github.com/stretchr/testify v1.10.0 7 | github.com/teivah/go-aoc v1.0.12 8 | ) 9 | 10 | require ( 11 | github.com/davecgh/go-spew v1.1.1 // indirect 12 | github.com/pmezard/go-difflib v1.0.0 // indirect 13 | golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 // indirect 14 | gopkg.in/yaml.v3 v3.0.1 // indirect 15 | ) 16 | -------------------------------------------------------------------------------- /2024/day25-go/go.mod: -------------------------------------------------------------------------------- 1 | module day2024-25 2 | 3 | go 1.23.3 4 | 5 | require ( 6 | github.com/stretchr/testify v1.10.0 7 | github.com/teivah/go-aoc v1.0.12 8 | ) 9 | 10 | require ( 11 | github.com/davecgh/go-spew v1.1.1 // indirect 12 | github.com/pmezard/go-difflib v1.0.0 // indirect 13 | golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 // indirect 14 | gopkg.in/yaml.v3 v3.0.1 // indirect 15 | ) 16 | -------------------------------------------------------------------------------- /2024/day3-go/test.txt: -------------------------------------------------------------------------------- 1 | xmul(2,4)%&mul[3,7]!@^do_not_mul(5,5)+mul(32,64]then(mul(11,8)mul(8,5)) -------------------------------------------------------------------------------- /2024/day3-go/test2.txt: -------------------------------------------------------------------------------- 1 | xmul(2,4)&mul[3,7]!^don't()_mul(5,5)+mul(32,64](mul(11,8)undo()?mul(8,5)) -------------------------------------------------------------------------------- /2024/day4-go/test.txt: -------------------------------------------------------------------------------- 1 | MMMSXXMASM 2 | MSAMXMSMSA 3 | AMXSXMAAMM 4 | MSAMASMSMX 5 | XMASAMXAMM 6 | XXAMMXXAMA 7 | SMSMSASXSS 8 | SAXAMASAAA 9 | MAMMMXMMMM 10 | MXMXAXMASX -------------------------------------------------------------------------------- /2024/day5-go/go.mod: -------------------------------------------------------------------------------- 1 | module day2024-5 2 | 3 | go 1.23.3 4 | 5 | require ( 6 | github.com/stretchr/testify v1.10.0 7 | github.com/teivah/go-aoc v1.0.0 8 | ) 9 | 10 | require ( 11 | github.com/davecgh/go-spew v1.1.1 // indirect 12 | github.com/pmezard/go-difflib v1.0.0 // indirect 13 | golang.org/x/exp v0.0.0-20241204233417-43b7b7cde48d // indirect 14 | gopkg.in/yaml.v3 v3.0.1 // indirect 15 | ) 16 | -------------------------------------------------------------------------------- /2024/day5-go/test.txt: -------------------------------------------------------------------------------- 1 | 47|53 2 | 97|13 3 | 97|61 4 | 97|47 5 | 75|29 6 | 61|13 7 | 75|53 8 | 29|13 9 | 97|29 10 | 53|29 11 | 61|53 12 | 97|53 13 | 61|29 14 | 47|13 15 | 75|47 16 | 97|75 17 | 47|61 18 | 75|61 19 | 47|29 20 | 75|13 21 | 53|13 22 | 23 | 75,47,61,53,29 24 | 97,61,53,29,13 25 | 75,29,13 26 | 75,97,47,61,53 27 | 61,13,29 28 | 97,13,75,29,47 -------------------------------------------------------------------------------- /2024/day6-go/test.txt: -------------------------------------------------------------------------------- 1 | ....#..... 2 | .........# 3 | .......... 4 | ..#....... 5 | .......#.. 6 | .......... 7 | .#..^..... 8 | ........#. 9 | #......... 10 | ......#... -------------------------------------------------------------------------------- /2024/day7-go/test.txt: -------------------------------------------------------------------------------- 1 | 190: 10 19 2 | 3267: 81 40 27 3 | 83: 17 5 4 | 156: 15 6 5 | 7290: 6 8 6 15 6 | 161011: 16 10 13 7 | 192: 17 8 14 8 | 21037: 9 7 18 13 9 | 292: 11 6 16 20 -------------------------------------------------------------------------------- /2024/day8-go/go.mod: -------------------------------------------------------------------------------- 1 | module day2024-8 2 | 3 | go 1.23.3 4 | 5 | require ( 6 | github.com/stretchr/testify v1.10.0 7 | github.com/teivah/go-aoc v1.0.0 8 | ) 9 | 10 | require ( 11 | github.com/davecgh/go-spew v1.1.1 // indirect 12 | github.com/pmezard/go-difflib v1.0.0 // indirect 13 | golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f // indirect 14 | gopkg.in/yaml.v3 v3.0.1 // indirect 15 | ) 16 | -------------------------------------------------------------------------------- /2024/day8-go/test.txt: -------------------------------------------------------------------------------- 1 | ............ 2 | ........0... 3 | .....0...... 4 | .......0.... 5 | ....0....... 6 | ......A..... 7 | ............ 8 | ............ 9 | ........A... 10 | .........A.. 11 | ............ 12 | ............ -------------------------------------------------------------------------------- /2024/day8-go/test2.txt: -------------------------------------------------------------------------------- 1 | T......... 2 | ...T...... 3 | .T........ 4 | .......... 5 | .......... 6 | .......... 7 | .......... 8 | .......... 9 | .......... 10 | .......... -------------------------------------------------------------------------------- /2024/day9-go/test.txt: -------------------------------------------------------------------------------- 1 | 2333133121414131402 -------------------------------------------------------------------------------- /cmd/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/teivah/aoc/stats 2 | 3 | go 1.21.4 4 | 5 | require github.com/teivah/advent-of-code v1.9.1 // indirect 6 | -------------------------------------------------------------------------------- /cmd/go.sum: -------------------------------------------------------------------------------- 1 | github.com/teivah/advent-of-code v1.9.1 h1:m2U+T1q2x24a37r44cP11nOPQlgNi/M73zmTI1RUCps= 2 | github.com/teivah/advent-of-code v1.9.1/go.mod h1:p1BrdH9bL5eXxtTxuLfUSW+jYtq9fYzKhzcpTePbpsw= 3 | -------------------------------------------------------------------------------- /post.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/post.png -------------------------------------------------------------------------------- /templates/go/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "io" 5 | 6 | "github.com/teivah/go-aoc" 7 | ) 8 | 9 | func fs1(input io.Reader) int { 10 | _ = aoc.ReaderToStrings(input) 11 | return 42 12 | } 13 | 14 | func fs2(input io.Reader) int { 15 | _ = aoc.ReaderToStrings(input) 16 | return 42 17 | } 18 | -------------------------------------------------------------------------------- /templates/go/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/templates/go/test.txt -------------------------------------------------------------------------------- /templates/haskell/Justfile: -------------------------------------------------------------------------------- 1 | indent: 2 | hindent app/Main.hs 3 | hindent src/Lib.hs 4 | 5 | dev: 6 | ghcid -W --command="stack ghci" --test=":main" 7 | 8 | build: 9 | stack build 10 | 11 | run: 12 | just build 13 | stack exec dayX-haskell-exe 14 | 15 | time: 16 | time stack exec day7-haskell-exe 17 | -------------------------------------------------------------------------------- /templates/haskell/Lib/Conversions.hs: -------------------------------------------------------------------------------- 1 | module Conversions 2 | ( binaryToDecimal 3 | ) where 4 | 5 | import Data.Char (digitToInt) 6 | import Numeric (readInt) 7 | 8 | binaryToDecimal :: String -> Int 9 | binaryToDecimal binaryString = 10 | case readInt 2 (`elem` "01") digitToInt binaryString of 11 | [(decimalValue, _)] -> decimalValue 12 | _ -> error "Invalid binary string" 13 | -------------------------------------------------------------------------------- /templates/haskell/Lib/Lib.hs: -------------------------------------------------------------------------------- 1 | module Lib 2 | ( fn1 3 | , fn2 4 | ) where 5 | 6 | import Data.Maybe (fromJust) 7 | import Debug.Trace 8 | import Inputs 9 | import Lists 10 | import Strings 11 | 12 | fn1 :: [String] -> Int 13 | fn1 lines = 0 14 | 15 | fn2 :: [String] -> Int 16 | fn2 lines = 0 17 | -------------------------------------------------------------------------------- /templates/haskell/Lib/Lists.hs: -------------------------------------------------------------------------------- 1 | module Lists 2 | ( sublist 3 | ) where 4 | 5 | sublist :: Int -> Int -> [a] -> [a] 6 | sublist start end xs = take (end - start) $ drop start xs 7 | -------------------------------------------------------------------------------- /templates/haskell/Main.hs: -------------------------------------------------------------------------------- 1 | import Lib 2 | import System.IO 3 | 4 | main :: IO () 5 | main = do 6 | handle <- openFile "input.txt" ReadMode 7 | contents <- hGetContents handle 8 | let linesList = lines contents 9 | let res = fn1 linesList 10 | print res 11 | let res = fn2 linesList 12 | print res 13 | -------------------------------------------------------------------------------- /templates/python/main.py: -------------------------------------------------------------------------------- 1 | from builtins import print 2 | from builtins import str 3 | 4 | 5 | def fs1(content: str): 6 | lines = content.splitlines() 7 | 8 | for line in lines: 9 | print(line) 10 | 11 | return 42 12 | 13 | 14 | def fs2(content: str): 15 | lines = content.splitlines() 16 | 17 | for line in lines: 18 | print(line) 19 | 20 | return 42 21 | -------------------------------------------------------------------------------- /templates/rust/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "template-rust" 7 | version = "0.1.0" 8 | -------------------------------------------------------------------------------- /templates/rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "template-rust" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /templates/rust/input.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/templates/rust/input.txt -------------------------------------------------------------------------------- /templates/rust/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teivah/advent-of-code/a0ab1a1ee821af6b678469241787bb967fedd2a3/templates/rust/test.txt --------------------------------------------------------------------------------