From 4955687b539a01aa9c90b3e8b947fd56d1e1fbea Mon Sep 17 00:00:00 2001 From: Adam Millerchip Date: Sun, 27 Nov 2022 15:57:52 +0900 Subject: [PATCH] Gave up on zig 2020, restore just the elixir version --- 2020/{elixir => }/README.md | 0 2020/{elixir => }/day1/README | 0 2020/{elixir => }/day1/day1part1.exs | 0 2020/{elixir => }/day1/day1part2.exs | 0 2020/{elixir => }/day1/day1refactored.exs | 0 2020/{elixir => }/day1/input | 0 2020/{elixir => }/day10/README | 0 2020/{elixir => }/day10/day10part1.exs | 0 .../day10/day10part2-refactored.exs | 0 2020/{elixir => }/day10/day10part2.exs | 0 2020/{elixir => }/day10/input | 0 2020/{elixir => }/day11/README | 0 2020/{elixir => }/day11/day11part1.exs | 0 2020/{elixir => }/day11/day11part2.exs | 0 2020/{elixir => }/day11/input | 0 2020/{elixir => }/day12/README | 0 2020/{elixir => }/day12/day12part1.exs | 0 2020/{elixir => }/day12/day12part2.exs | 0 2020/{elixir => }/day12/input | 0 2020/{elixir => }/day13/README | 0 2020/{elixir => }/day13/day13part1.exs | 0 .../day13/day13part2-cheating.exs | 0 2020/{elixir => }/day13/day13part2.exs | 0 2020/{elixir => }/day13/input | 0 2020/{elixir => }/day14/README | 0 2020/{elixir => }/day14/day14part1.exs | 0 2020/{elixir => }/day14/day14part2.exs | 0 2020/{elixir => }/day14/input | 0 2020/{elixir => }/day15/README | 0 2020/{elixir => }/day15/day15.exs | 0 2020/{elixir => }/day16/README | 0 2020/{elixir => }/day16/day16part1.exs | 0 .../day16/day16part2-simpler-transpose.exs | 0 2020/{elixir => }/day16/day16part2.exs | 0 2020/{elixir => }/day16/input | 0 2020/{elixir => }/day17/README | 0 2020/{elixir => }/day17/day17part1.exs | 0 2020/{elixir => }/day17/day17part2.exs | 0 2020/{elixir => }/day17/input | 0 2020/{elixir => }/day18/README | 0 2020/{elixir => }/day18/day18part1.exs | 0 2020/{elixir => }/day18/day18part2.exs | 0 2020/{elixir => }/day18/input | 0 2020/{elixir => }/day2/README | 0 2020/{elixir => }/day2/day2part1.exs | 0 2020/{elixir => }/day2/day2part2.exs | 0 2020/{elixir => }/day2/input | 0 2020/{elixir => }/day21/README | 0 2020/{elixir => }/day21/day21part1.exs | 0 2020/{elixir => }/day21/day21part2.exs | 0 2020/{elixir => }/day21/input | 0 2020/{elixir => }/day23/README | 0 2020/{elixir => }/day23/day23part1.exs | 0 2020/{elixir => }/day23/day23part2.exs | 0 2020/{elixir => }/day24/README | 0 2020/{elixir => }/day24/day24part1.exs | 0 2020/{elixir => }/day24/day24part2.exs | 0 2020/{elixir => }/day24/input | 0 2020/{elixir => }/day25/README | 0 2020/{elixir => }/day25/day25part1.exs | 0 2020/{elixir => }/day25/input | 0 2020/{elixir => }/day3/README | 0 2020/{elixir => }/day3/day3part1.exs | 0 2020/{elixir => }/day3/day3part2.exs | 0 2020/{elixir => }/day3/input | 0 2020/{elixir => }/day4/README | 0 2020/{elixir => }/day4/day4part1.exs | 0 2020/{elixir => }/day4/day4part2.exs | 0 2020/{elixir => }/day4/input | 0 2020/{elixir => }/day5/README | 0 .../{elixir => }/day5/day5part1-bitstring.exs | 0 2020/{elixir => }/day5/day5part1.exs | 0 .../{elixir => }/day5/day5part2-bitstring.exs | 0 2020/{elixir => }/day5/day5part2.exs | 0 2020/{elixir => }/day5/input | 0 2020/{elixir => }/day6/README | 0 2020/{elixir => }/day6/day6part1.exs | 0 2020/{elixir => }/day6/day6part2.exs | 0 2020/{elixir => }/day6/input | 0 2020/{elixir => }/day7/README | 0 2020/{elixir => }/day7/day7part1.exs | 0 2020/{elixir => }/day7/day7part2.exs | 0 2020/{elixir => }/day7/input | 0 2020/{elixir => }/day8/README | 0 2020/{elixir => }/day8/day8part1.exs | 0 2020/{elixir => }/day8/day8part2.exs | 0 2020/{elixir => }/day8/input | 0 2020/{elixir => }/day9/README | 0 2020/{elixir => }/day9/day9part1.exs | 0 2020/{elixir => }/day9/day9part2.exs | 0 2020/{elixir => }/day9/input | 0 2020/zig/.gitattributes | 16 -- 2020/zig/.gitignore | 5 - 2020/zig/LICENSE | 20 --- 2020/zig/README.md | 32 ---- 2020/zig/build.zig | 146 ------------------ 2020/zig/src/day01.zig | 48 ------ 2020/zig/src/day02.zig | 62 -------- 2020/zig/src/day03.zig | 46 ------ 2020/zig/src/day04.zig | 69 --------- 2020/zig/src/day05.zig | 44 ------ 2020/zig/src/day06.zig | 44 ------ 2020/zig/src/day07.zig | 44 ------ 2020/zig/src/day08.zig | 44 ------ 2020/zig/src/day09.zig | 44 ------ 2020/zig/src/day10.zig | 44 ------ 2020/zig/src/day11.zig | 44 ------ 2020/zig/src/day12.zig | 44 ------ 2020/zig/src/day13.zig | 44 ------ 2020/zig/src/day14.zig | 44 ------ 2020/zig/src/day15.zig | 44 ------ 2020/zig/src/day16.zig | 44 ------ 2020/zig/src/day17.zig | 44 ------ 2020/zig/src/day18.zig | 44 ------ 2020/zig/src/day19.zig | 44 ------ 2020/zig/src/day20.zig | 44 ------ 2020/zig/src/day21.zig | 44 ------ 2020/zig/src/day22.zig | 44 ------ 2020/zig/src/day23.zig | 44 ------ 2020/zig/src/day24.zig | 44 ------ 2020/zig/src/day25.zig | 44 ------ 2020/zig/src/test_all.zig | 29 ---- 2020/zig/src/util.zig | 41 ----- README.md | 3 +- 124 files changed, 1 insertion(+), 1440 deletions(-) rename 2020/{elixir => }/README.md (100%) rename 2020/{elixir => }/day1/README (100%) rename 2020/{elixir => }/day1/day1part1.exs (100%) rename 2020/{elixir => }/day1/day1part2.exs (100%) rename 2020/{elixir => }/day1/day1refactored.exs (100%) rename 2020/{elixir => }/day1/input (100%) rename 2020/{elixir => }/day10/README (100%) rename 2020/{elixir => }/day10/day10part1.exs (100%) rename 2020/{elixir => }/day10/day10part2-refactored.exs (100%) rename 2020/{elixir => }/day10/day10part2.exs (100%) rename 2020/{elixir => }/day10/input (100%) rename 2020/{elixir => }/day11/README (100%) rename 2020/{elixir => }/day11/day11part1.exs (100%) rename 2020/{elixir => }/day11/day11part2.exs (100%) rename 2020/{elixir => }/day11/input (100%) rename 2020/{elixir => }/day12/README (100%) rename 2020/{elixir => }/day12/day12part1.exs (100%) rename 2020/{elixir => }/day12/day12part2.exs (100%) rename 2020/{elixir => }/day12/input (100%) rename 2020/{elixir => }/day13/README (100%) rename 2020/{elixir => }/day13/day13part1.exs (100%) rename 2020/{elixir => }/day13/day13part2-cheating.exs (100%) rename 2020/{elixir => }/day13/day13part2.exs (100%) rename 2020/{elixir => }/day13/input (100%) rename 2020/{elixir => }/day14/README (100%) rename 2020/{elixir => }/day14/day14part1.exs (100%) rename 2020/{elixir => }/day14/day14part2.exs (100%) rename 2020/{elixir => }/day14/input (100%) rename 2020/{elixir => }/day15/README (100%) rename 2020/{elixir => }/day15/day15.exs (100%) rename 2020/{elixir => }/day16/README (100%) rename 2020/{elixir => }/day16/day16part1.exs (100%) rename 2020/{elixir => }/day16/day16part2-simpler-transpose.exs (100%) rename 2020/{elixir => }/day16/day16part2.exs (100%) rename 2020/{elixir => }/day16/input (100%) rename 2020/{elixir => }/day17/README (100%) rename 2020/{elixir => }/day17/day17part1.exs (100%) rename 2020/{elixir => }/day17/day17part2.exs (100%) rename 2020/{elixir => }/day17/input (100%) rename 2020/{elixir => }/day18/README (100%) rename 2020/{elixir => }/day18/day18part1.exs (100%) rename 2020/{elixir => }/day18/day18part2.exs (100%) rename 2020/{elixir => }/day18/input (100%) rename 2020/{elixir => }/day2/README (100%) rename 2020/{elixir => }/day2/day2part1.exs (100%) rename 2020/{elixir => }/day2/day2part2.exs (100%) rename 2020/{elixir => }/day2/input (100%) rename 2020/{elixir => }/day21/README (100%) rename 2020/{elixir => }/day21/day21part1.exs (100%) rename 2020/{elixir => }/day21/day21part2.exs (100%) rename 2020/{elixir => }/day21/input (100%) rename 2020/{elixir => }/day23/README (100%) rename 2020/{elixir => }/day23/day23part1.exs (100%) rename 2020/{elixir => }/day23/day23part2.exs (100%) rename 2020/{elixir => }/day24/README (100%) rename 2020/{elixir => }/day24/day24part1.exs (100%) rename 2020/{elixir => }/day24/day24part2.exs (100%) rename 2020/{elixir => }/day24/input (100%) rename 2020/{elixir => }/day25/README (100%) rename 2020/{elixir => }/day25/day25part1.exs (100%) rename 2020/{elixir => }/day25/input (100%) rename 2020/{elixir => }/day3/README (100%) rename 2020/{elixir => }/day3/day3part1.exs (100%) rename 2020/{elixir => }/day3/day3part2.exs (100%) rename 2020/{elixir => }/day3/input (100%) rename 2020/{elixir => }/day4/README (100%) rename 2020/{elixir => }/day4/day4part1.exs (100%) rename 2020/{elixir => }/day4/day4part2.exs (100%) rename 2020/{elixir => }/day4/input (100%) rename 2020/{elixir => }/day5/README (100%) rename 2020/{elixir => }/day5/day5part1-bitstring.exs (100%) rename 2020/{elixir => }/day5/day5part1.exs (100%) rename 2020/{elixir => }/day5/day5part2-bitstring.exs (100%) rename 2020/{elixir => }/day5/day5part2.exs (100%) rename 2020/{elixir => }/day5/input (100%) rename 2020/{elixir => }/day6/README (100%) rename 2020/{elixir => }/day6/day6part1.exs (100%) rename 2020/{elixir => }/day6/day6part2.exs (100%) rename 2020/{elixir => }/day6/input (100%) rename 2020/{elixir => }/day7/README (100%) rename 2020/{elixir => }/day7/day7part1.exs (100%) rename 2020/{elixir => }/day7/day7part2.exs (100%) rename 2020/{elixir => }/day7/input (100%) rename 2020/{elixir => }/day8/README (100%) rename 2020/{elixir => }/day8/day8part1.exs (100%) rename 2020/{elixir => }/day8/day8part2.exs (100%) rename 2020/{elixir => }/day8/input (100%) rename 2020/{elixir => }/day9/README (100%) rename 2020/{elixir => }/day9/day9part1.exs (100%) rename 2020/{elixir => }/day9/day9part2.exs (100%) rename 2020/{elixir => }/day9/input (100%) delete mode 100644 2020/zig/.gitattributes delete mode 100644 2020/zig/.gitignore delete mode 100644 2020/zig/LICENSE delete mode 100644 2020/zig/README.md delete mode 100644 2020/zig/build.zig delete mode 100644 2020/zig/src/day01.zig delete mode 100644 2020/zig/src/day02.zig delete mode 100644 2020/zig/src/day03.zig delete mode 100644 2020/zig/src/day04.zig delete mode 100644 2020/zig/src/day05.zig delete mode 100644 2020/zig/src/day06.zig delete mode 100644 2020/zig/src/day07.zig delete mode 100644 2020/zig/src/day08.zig delete mode 100644 2020/zig/src/day09.zig delete mode 100644 2020/zig/src/day10.zig delete mode 100644 2020/zig/src/day11.zig delete mode 100644 2020/zig/src/day12.zig delete mode 100644 2020/zig/src/day13.zig delete mode 100644 2020/zig/src/day14.zig delete mode 100644 2020/zig/src/day15.zig delete mode 100644 2020/zig/src/day16.zig delete mode 100644 2020/zig/src/day17.zig delete mode 100644 2020/zig/src/day18.zig delete mode 100644 2020/zig/src/day19.zig delete mode 100644 2020/zig/src/day20.zig delete mode 100644 2020/zig/src/day21.zig delete mode 100644 2020/zig/src/day22.zig delete mode 100644 2020/zig/src/day23.zig delete mode 100644 2020/zig/src/day24.zig delete mode 100644 2020/zig/src/day25.zig delete mode 100644 2020/zig/src/test_all.zig delete mode 100644 2020/zig/src/util.zig diff --git a/2020/elixir/README.md b/2020/README.md similarity index 100% rename from 2020/elixir/README.md rename to 2020/README.md diff --git a/2020/elixir/day1/README b/2020/day1/README similarity index 100% rename from 2020/elixir/day1/README rename to 2020/day1/README diff --git a/2020/elixir/day1/day1part1.exs b/2020/day1/day1part1.exs similarity index 100% rename from 2020/elixir/day1/day1part1.exs rename to 2020/day1/day1part1.exs diff --git a/2020/elixir/day1/day1part2.exs b/2020/day1/day1part2.exs similarity index 100% rename from 2020/elixir/day1/day1part2.exs rename to 2020/day1/day1part2.exs diff --git a/2020/elixir/day1/day1refactored.exs b/2020/day1/day1refactored.exs similarity index 100% rename from 2020/elixir/day1/day1refactored.exs rename to 2020/day1/day1refactored.exs diff --git a/2020/elixir/day1/input b/2020/day1/input similarity index 100% rename from 2020/elixir/day1/input rename to 2020/day1/input diff --git a/2020/elixir/day10/README b/2020/day10/README similarity index 100% rename from 2020/elixir/day10/README rename to 2020/day10/README diff --git a/2020/elixir/day10/day10part1.exs b/2020/day10/day10part1.exs similarity index 100% rename from 2020/elixir/day10/day10part1.exs rename to 2020/day10/day10part1.exs diff --git a/2020/elixir/day10/day10part2-refactored.exs b/2020/day10/day10part2-refactored.exs similarity index 100% rename from 2020/elixir/day10/day10part2-refactored.exs rename to 2020/day10/day10part2-refactored.exs diff --git a/2020/elixir/day10/day10part2.exs b/2020/day10/day10part2.exs similarity index 100% rename from 2020/elixir/day10/day10part2.exs rename to 2020/day10/day10part2.exs diff --git a/2020/elixir/day10/input b/2020/day10/input similarity index 100% rename from 2020/elixir/day10/input rename to 2020/day10/input diff --git a/2020/elixir/day11/README b/2020/day11/README similarity index 100% rename from 2020/elixir/day11/README rename to 2020/day11/README diff --git a/2020/elixir/day11/day11part1.exs b/2020/day11/day11part1.exs similarity index 100% rename from 2020/elixir/day11/day11part1.exs rename to 2020/day11/day11part1.exs diff --git a/2020/elixir/day11/day11part2.exs b/2020/day11/day11part2.exs similarity index 100% rename from 2020/elixir/day11/day11part2.exs rename to 2020/day11/day11part2.exs diff --git a/2020/elixir/day11/input b/2020/day11/input similarity index 100% rename from 2020/elixir/day11/input rename to 2020/day11/input diff --git a/2020/elixir/day12/README b/2020/day12/README similarity index 100% rename from 2020/elixir/day12/README rename to 2020/day12/README diff --git a/2020/elixir/day12/day12part1.exs b/2020/day12/day12part1.exs similarity index 100% rename from 2020/elixir/day12/day12part1.exs rename to 2020/day12/day12part1.exs diff --git a/2020/elixir/day12/day12part2.exs b/2020/day12/day12part2.exs similarity index 100% rename from 2020/elixir/day12/day12part2.exs rename to 2020/day12/day12part2.exs diff --git a/2020/elixir/day12/input b/2020/day12/input similarity index 100% rename from 2020/elixir/day12/input rename to 2020/day12/input diff --git a/2020/elixir/day13/README b/2020/day13/README similarity index 100% rename from 2020/elixir/day13/README rename to 2020/day13/README diff --git a/2020/elixir/day13/day13part1.exs b/2020/day13/day13part1.exs similarity index 100% rename from 2020/elixir/day13/day13part1.exs rename to 2020/day13/day13part1.exs diff --git a/2020/elixir/day13/day13part2-cheating.exs b/2020/day13/day13part2-cheating.exs similarity index 100% rename from 2020/elixir/day13/day13part2-cheating.exs rename to 2020/day13/day13part2-cheating.exs diff --git a/2020/elixir/day13/day13part2.exs b/2020/day13/day13part2.exs similarity index 100% rename from 2020/elixir/day13/day13part2.exs rename to 2020/day13/day13part2.exs diff --git a/2020/elixir/day13/input b/2020/day13/input similarity index 100% rename from 2020/elixir/day13/input rename to 2020/day13/input diff --git a/2020/elixir/day14/README b/2020/day14/README similarity index 100% rename from 2020/elixir/day14/README rename to 2020/day14/README diff --git a/2020/elixir/day14/day14part1.exs b/2020/day14/day14part1.exs similarity index 100% rename from 2020/elixir/day14/day14part1.exs rename to 2020/day14/day14part1.exs diff --git a/2020/elixir/day14/day14part2.exs b/2020/day14/day14part2.exs similarity index 100% rename from 2020/elixir/day14/day14part2.exs rename to 2020/day14/day14part2.exs diff --git a/2020/elixir/day14/input b/2020/day14/input similarity index 100% rename from 2020/elixir/day14/input rename to 2020/day14/input diff --git a/2020/elixir/day15/README b/2020/day15/README similarity index 100% rename from 2020/elixir/day15/README rename to 2020/day15/README diff --git a/2020/elixir/day15/day15.exs b/2020/day15/day15.exs similarity index 100% rename from 2020/elixir/day15/day15.exs rename to 2020/day15/day15.exs diff --git a/2020/elixir/day16/README b/2020/day16/README similarity index 100% rename from 2020/elixir/day16/README rename to 2020/day16/README diff --git a/2020/elixir/day16/day16part1.exs b/2020/day16/day16part1.exs similarity index 100% rename from 2020/elixir/day16/day16part1.exs rename to 2020/day16/day16part1.exs diff --git a/2020/elixir/day16/day16part2-simpler-transpose.exs b/2020/day16/day16part2-simpler-transpose.exs similarity index 100% rename from 2020/elixir/day16/day16part2-simpler-transpose.exs rename to 2020/day16/day16part2-simpler-transpose.exs diff --git a/2020/elixir/day16/day16part2.exs b/2020/day16/day16part2.exs similarity index 100% rename from 2020/elixir/day16/day16part2.exs rename to 2020/day16/day16part2.exs diff --git a/2020/elixir/day16/input b/2020/day16/input similarity index 100% rename from 2020/elixir/day16/input rename to 2020/day16/input diff --git a/2020/elixir/day17/README b/2020/day17/README similarity index 100% rename from 2020/elixir/day17/README rename to 2020/day17/README diff --git a/2020/elixir/day17/day17part1.exs b/2020/day17/day17part1.exs similarity index 100% rename from 2020/elixir/day17/day17part1.exs rename to 2020/day17/day17part1.exs diff --git a/2020/elixir/day17/day17part2.exs b/2020/day17/day17part2.exs similarity index 100% rename from 2020/elixir/day17/day17part2.exs rename to 2020/day17/day17part2.exs diff --git a/2020/elixir/day17/input b/2020/day17/input similarity index 100% rename from 2020/elixir/day17/input rename to 2020/day17/input diff --git a/2020/elixir/day18/README b/2020/day18/README similarity index 100% rename from 2020/elixir/day18/README rename to 2020/day18/README diff --git a/2020/elixir/day18/day18part1.exs b/2020/day18/day18part1.exs similarity index 100% rename from 2020/elixir/day18/day18part1.exs rename to 2020/day18/day18part1.exs diff --git a/2020/elixir/day18/day18part2.exs b/2020/day18/day18part2.exs similarity index 100% rename from 2020/elixir/day18/day18part2.exs rename to 2020/day18/day18part2.exs diff --git a/2020/elixir/day18/input b/2020/day18/input similarity index 100% rename from 2020/elixir/day18/input rename to 2020/day18/input diff --git a/2020/elixir/day2/README b/2020/day2/README similarity index 100% rename from 2020/elixir/day2/README rename to 2020/day2/README diff --git a/2020/elixir/day2/day2part1.exs b/2020/day2/day2part1.exs similarity index 100% rename from 2020/elixir/day2/day2part1.exs rename to 2020/day2/day2part1.exs diff --git a/2020/elixir/day2/day2part2.exs b/2020/day2/day2part2.exs similarity index 100% rename from 2020/elixir/day2/day2part2.exs rename to 2020/day2/day2part2.exs diff --git a/2020/elixir/day2/input b/2020/day2/input similarity index 100% rename from 2020/elixir/day2/input rename to 2020/day2/input diff --git a/2020/elixir/day21/README b/2020/day21/README similarity index 100% rename from 2020/elixir/day21/README rename to 2020/day21/README diff --git a/2020/elixir/day21/day21part1.exs b/2020/day21/day21part1.exs similarity index 100% rename from 2020/elixir/day21/day21part1.exs rename to 2020/day21/day21part1.exs diff --git a/2020/elixir/day21/day21part2.exs b/2020/day21/day21part2.exs similarity index 100% rename from 2020/elixir/day21/day21part2.exs rename to 2020/day21/day21part2.exs diff --git a/2020/elixir/day21/input b/2020/day21/input similarity index 100% rename from 2020/elixir/day21/input rename to 2020/day21/input diff --git a/2020/elixir/day23/README b/2020/day23/README similarity index 100% rename from 2020/elixir/day23/README rename to 2020/day23/README diff --git a/2020/elixir/day23/day23part1.exs b/2020/day23/day23part1.exs similarity index 100% rename from 2020/elixir/day23/day23part1.exs rename to 2020/day23/day23part1.exs diff --git a/2020/elixir/day23/day23part2.exs b/2020/day23/day23part2.exs similarity index 100% rename from 2020/elixir/day23/day23part2.exs rename to 2020/day23/day23part2.exs diff --git a/2020/elixir/day24/README b/2020/day24/README similarity index 100% rename from 2020/elixir/day24/README rename to 2020/day24/README diff --git a/2020/elixir/day24/day24part1.exs b/2020/day24/day24part1.exs similarity index 100% rename from 2020/elixir/day24/day24part1.exs rename to 2020/day24/day24part1.exs diff --git a/2020/elixir/day24/day24part2.exs b/2020/day24/day24part2.exs similarity index 100% rename from 2020/elixir/day24/day24part2.exs rename to 2020/day24/day24part2.exs diff --git a/2020/elixir/day24/input b/2020/day24/input similarity index 100% rename from 2020/elixir/day24/input rename to 2020/day24/input diff --git a/2020/elixir/day25/README b/2020/day25/README similarity index 100% rename from 2020/elixir/day25/README rename to 2020/day25/README diff --git a/2020/elixir/day25/day25part1.exs b/2020/day25/day25part1.exs similarity index 100% rename from 2020/elixir/day25/day25part1.exs rename to 2020/day25/day25part1.exs diff --git a/2020/elixir/day25/input b/2020/day25/input similarity index 100% rename from 2020/elixir/day25/input rename to 2020/day25/input diff --git a/2020/elixir/day3/README b/2020/day3/README similarity index 100% rename from 2020/elixir/day3/README rename to 2020/day3/README diff --git a/2020/elixir/day3/day3part1.exs b/2020/day3/day3part1.exs similarity index 100% rename from 2020/elixir/day3/day3part1.exs rename to 2020/day3/day3part1.exs diff --git a/2020/elixir/day3/day3part2.exs b/2020/day3/day3part2.exs similarity index 100% rename from 2020/elixir/day3/day3part2.exs rename to 2020/day3/day3part2.exs diff --git a/2020/elixir/day3/input b/2020/day3/input similarity index 100% rename from 2020/elixir/day3/input rename to 2020/day3/input diff --git a/2020/elixir/day4/README b/2020/day4/README similarity index 100% rename from 2020/elixir/day4/README rename to 2020/day4/README diff --git a/2020/elixir/day4/day4part1.exs b/2020/day4/day4part1.exs similarity index 100% rename from 2020/elixir/day4/day4part1.exs rename to 2020/day4/day4part1.exs diff --git a/2020/elixir/day4/day4part2.exs b/2020/day4/day4part2.exs similarity index 100% rename from 2020/elixir/day4/day4part2.exs rename to 2020/day4/day4part2.exs diff --git a/2020/elixir/day4/input b/2020/day4/input similarity index 100% rename from 2020/elixir/day4/input rename to 2020/day4/input diff --git a/2020/elixir/day5/README b/2020/day5/README similarity index 100% rename from 2020/elixir/day5/README rename to 2020/day5/README diff --git a/2020/elixir/day5/day5part1-bitstring.exs b/2020/day5/day5part1-bitstring.exs similarity index 100% rename from 2020/elixir/day5/day5part1-bitstring.exs rename to 2020/day5/day5part1-bitstring.exs diff --git a/2020/elixir/day5/day5part1.exs b/2020/day5/day5part1.exs similarity index 100% rename from 2020/elixir/day5/day5part1.exs rename to 2020/day5/day5part1.exs diff --git a/2020/elixir/day5/day5part2-bitstring.exs b/2020/day5/day5part2-bitstring.exs similarity index 100% rename from 2020/elixir/day5/day5part2-bitstring.exs rename to 2020/day5/day5part2-bitstring.exs diff --git a/2020/elixir/day5/day5part2.exs b/2020/day5/day5part2.exs similarity index 100% rename from 2020/elixir/day5/day5part2.exs rename to 2020/day5/day5part2.exs diff --git a/2020/elixir/day5/input b/2020/day5/input similarity index 100% rename from 2020/elixir/day5/input rename to 2020/day5/input diff --git a/2020/elixir/day6/README b/2020/day6/README similarity index 100% rename from 2020/elixir/day6/README rename to 2020/day6/README diff --git a/2020/elixir/day6/day6part1.exs b/2020/day6/day6part1.exs similarity index 100% rename from 2020/elixir/day6/day6part1.exs rename to 2020/day6/day6part1.exs diff --git a/2020/elixir/day6/day6part2.exs b/2020/day6/day6part2.exs similarity index 100% rename from 2020/elixir/day6/day6part2.exs rename to 2020/day6/day6part2.exs diff --git a/2020/elixir/day6/input b/2020/day6/input similarity index 100% rename from 2020/elixir/day6/input rename to 2020/day6/input diff --git a/2020/elixir/day7/README b/2020/day7/README similarity index 100% rename from 2020/elixir/day7/README rename to 2020/day7/README diff --git a/2020/elixir/day7/day7part1.exs b/2020/day7/day7part1.exs similarity index 100% rename from 2020/elixir/day7/day7part1.exs rename to 2020/day7/day7part1.exs diff --git a/2020/elixir/day7/day7part2.exs b/2020/day7/day7part2.exs similarity index 100% rename from 2020/elixir/day7/day7part2.exs rename to 2020/day7/day7part2.exs diff --git a/2020/elixir/day7/input b/2020/day7/input similarity index 100% rename from 2020/elixir/day7/input rename to 2020/day7/input diff --git a/2020/elixir/day8/README b/2020/day8/README similarity index 100% rename from 2020/elixir/day8/README rename to 2020/day8/README diff --git a/2020/elixir/day8/day8part1.exs b/2020/day8/day8part1.exs similarity index 100% rename from 2020/elixir/day8/day8part1.exs rename to 2020/day8/day8part1.exs diff --git a/2020/elixir/day8/day8part2.exs b/2020/day8/day8part2.exs similarity index 100% rename from 2020/elixir/day8/day8part2.exs rename to 2020/day8/day8part2.exs diff --git a/2020/elixir/day8/input b/2020/day8/input similarity index 100% rename from 2020/elixir/day8/input rename to 2020/day8/input diff --git a/2020/elixir/day9/README b/2020/day9/README similarity index 100% rename from 2020/elixir/day9/README rename to 2020/day9/README diff --git a/2020/elixir/day9/day9part1.exs b/2020/day9/day9part1.exs similarity index 100% rename from 2020/elixir/day9/day9part1.exs rename to 2020/day9/day9part1.exs diff --git a/2020/elixir/day9/day9part2.exs b/2020/day9/day9part2.exs similarity index 100% rename from 2020/elixir/day9/day9part2.exs rename to 2020/day9/day9part2.exs diff --git a/2020/elixir/day9/input b/2020/day9/input similarity index 100% rename from 2020/elixir/day9/input rename to 2020/day9/input diff --git a/2020/zig/.gitattributes b/2020/zig/.gitattributes deleted file mode 100644 index 97386d9..0000000 --- a/2020/zig/.gitattributes +++ /dev/null @@ -1,16 +0,0 @@ -# See https://git-scm.com/docs/gitattributes -# See https://help.github.com/articles/dealing-with-line-endings/ - -# Default behavior, if core.autocrlf is unset. -* text=auto - -# Files to be converted to native line endings on checkout. -*.cpp text -*.h text - -# Text files to always have CRLF (dos) line endings on checkout. -*.bat text eol=crlf - -# Text files to always have LF (unix) line endings on checkout. -*.sh text eol=lf -*.zig text eol=lf diff --git a/2020/zig/.gitignore b/2020/zig/.gitignore deleted file mode 100644 index 6fd54be..0000000 --- a/2020/zig/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -zig-cache/ -zig-out/ -src/sample -src/input -build_runner.zig diff --git a/2020/zig/LICENSE b/2020/zig/LICENSE deleted file mode 100644 index 345035e..0000000 --- a/2020/zig/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2020-2021 Martin Wickham - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/2020/zig/README.md b/2020/zig/README.md deleted file mode 100644 index e937180..0000000 --- a/2020/zig/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# Advent Of Code Zig Template - -This repo provides a template for Advent of Code participants using Zig. It contains a main file for each day, a build.zig file set up with targets for each day, and Visual Studio Code files for debugging. - -This template tracks the master branch of Zig, *not* 0.8.1. It may not work with older versions. - -## How to use this template: - -The src/ directory contains a main file for each day. Put your code there. The build command `zig build dayXX [target and mode options] -- [program args]` will build and run the specified day. You can also use `zig build install_dayXX [target and mode options]` to build the executable for a day and put it into `zig-out/bin` without executing it. By default this template does not link libc, but you can set `should_link_libc` to `true` in build.zig to change that. If you add new files with tests, add those files to the list of test files in test_all.zig. The command `zig build test` will run tests in all of these files. You can also use `zig build test_dayXX` to run tests in a specific day, or `zig build install_tests_dayXX` to create a debuggable test executable in `zig-out/bin`. - -Each day contains a decl like this: -```zig -const data = @embedFile("../data/day05.txt"); -``` -To use this system, save your input for a day in the data/ directory with the appropriate name. Reference this decl to load the contents of that file as a compile time constant. If a day has no input, or you prefer not to embed it in this form, simply don't reference this decl. If it's unused, it will not try to load the file, and it won't error if the file does not exist. - -This repo also contains Visual Studio Code project files for debugging. These are meant to work with the C/C++ plugin. There is a debug configuration for each day. By default all days are built in debug mode, but this can be changed by editing `.vscode/tasks.json` if you have a need for speed. - -If you would like to contribute project files for other development environments, please send a PR. - -## Setting up ZLS - -Zig has a reasonably robust language server, which can provide autocomplete for VSCode and many other editors. It can help significantly with exploring the std lib and suggesting parameter completions. To set it up, make sure you have an up-to-date master build of Zig (which you can [download here](https://ziglang.org/download/)), and then run the following commands: - -``` -git clone --recurse-submodules https://github.com/zigtools/zls -cd zls -zig build -Drelease-fast -zig-out/bin/zls configure -``` - -The last command will direct you to documentation for connecting it to your preferred editor. If you are using VSCode, the documentation [can be found here](https://github.com/zigtools/zls/wiki/Installing-for-Visual-Studio-Code). diff --git a/2020/zig/build.zig b/2020/zig/build.zig deleted file mode 100644 index 0e8dfe0..0000000 --- a/2020/zig/build.zig +++ /dev/null @@ -1,146 +0,0 @@ -const std = @import("std"); -const Builder = std.build.Builder; -const LibExeObjStep = std.build.LibExeObjStep; - -// set this to true to link libc -const should_link_libc = false; - -fn linkObject(b: *Builder, obj: *LibExeObjStep) void { - if (should_link_libc) obj.linkLibC(); - _ = b; - - // Add linking for packages or third party libraries here -} - -const required_zig_version = std.SemanticVersion.parse("0.9.0-dev.1920+de81c504b") catch unreachable; - -pub fn build(b: *Builder) void { - if (comptime @import("builtin").zig_version.order(required_zig_version) == .lt) { - std.debug.print( - \\Error: Your version of Zig is missing features that are needed for this template. - \\You will need to download a newer build. - \\ - \\ https://ziglang.org/download/ - \\ - \\ - , .{}); - std.os.exit(1); - } - - // Standard target options allows the person running `zig build` to choose - // what target to build for. Here we do not override the defaults, which - // means any target is allowed, and the default is native. Other options - // for restricting supported target set are available. - const target = b.standardTargetOptions(.{}); - - // Standard release options allow the person running `zig build` to select - // between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall. - const mode = b.standardReleaseOptions(); - - const install_all = b.step("install_all", "Install all days"); - const install_all_tests = b.step("install_tests_all", "Install tests for all days"); - const run_all = b.step("run_all", "Run all days"); - - // Set up an exe for each day - var day: u32 = 1; - while (day <= 25) : (day += 1) { - const dayString = b.fmt("day{:0>2}", .{day}); - const zigFile = b.fmt("src/{s}.zig", .{dayString}); - - const exe = b.addExecutable(dayString, zigFile); - exe.setTarget(target); - exe.setBuildMode(mode); - linkObject(b, exe); - - exe.install(); - - const install_cmd = b.addInstallArtifact(exe); - - const run_test = b.addTest(zigFile); - run_test.setTarget(target); - run_test.setBuildMode(mode); - linkObject(b, exe); - - const build_test = b.addTestExe(b.fmt("test_{s}", .{dayString}), zigFile); - build_test.setTarget(target); - build_test.setBuildMode(mode); - linkObject(b, exe); - const install_test = b.addInstallArtifact(build_test); - - { - const step_key = b.fmt("install_{s}", .{dayString}); - const step_desc = b.fmt("Install {s}.exe", .{dayString}); - const install_step = b.step(step_key, step_desc); - install_step.dependOn(&install_cmd.step); - install_all.dependOn(&install_cmd.step); - } - - { - const step_key = b.fmt("test_{s}", .{dayString}); - const step_desc = b.fmt("Run tests in {s}", .{zigFile}); - const step = b.step(step_key, step_desc); - step.dependOn(&run_test.step); - } - - { - const step_key = b.fmt("install_tests_{s}", .{dayString}); - const step_desc = b.fmt("Install test_{s}.exe", .{dayString}); - const step = b.step(step_key, step_desc); - step.dependOn(&install_test.step); - install_all_tests.dependOn(&install_test.step); - } - - const run_cmd = exe.run(); - run_cmd.step.dependOn(&install_cmd.step); - if (b.args) |args| { - run_cmd.addArgs(args); - } - - const run_desc = b.fmt("Run {s}", .{dayString}); - const run_step = b.step(dayString, run_desc); - run_step.dependOn(&run_cmd.step); - run_all.dependOn(&run_cmd.step); - } - - // Set up tests for util.zig - { - const test_util = b.step("test_util", "Run tests in util.zig"); - const test_cmd = b.addTest("src/util.zig"); - test_cmd.setTarget(target); - test_cmd.setBuildMode(mode); - linkObject(b, test_cmd); - test_util.dependOn(&test_cmd.step); - } - - // Set up test executable for util.zig - { - const test_util = b.step("install_tests_util", "Run tests in util.zig"); - const test_exe = b.addTestExe("test_util", "src/util.zig"); - test_exe.setTarget(target); - test_exe.setBuildMode(mode); - linkObject(b, test_exe); - const install = b.addInstallArtifact(test_exe); - test_util.dependOn(&install.step); - } - - // Set up a step to run all tests - { - const test_step = b.step("test", "Run all tests"); - const test_cmd = b.addTest("src/test_all.zig"); - test_cmd.setTarget(target); - test_cmd.setBuildMode(mode); - linkObject(b, test_cmd); - test_step.dependOn(&test_cmd.step); - } - - // Set up a step to build tests (but not run them) - { - const test_build = b.step("install_tests", "Install test_all.exe"); - const test_exe = b.addTestExe("test_all", "src/test_all.zig"); - test_exe.setTarget(target); - test_exe.setBuildMode(mode); - linkObject(b, test_exe); - const test_exe_install = b.addInstallArtifact(test_exe); - test_build.dependOn(&test_exe_install.step); - } -} diff --git a/2020/zig/src/day01.zig b/2020/zig/src/day01.zig deleted file mode 100644 index e66a4c8..0000000 --- a/2020/zig/src/day01.zig +++ /dev/null @@ -1,48 +0,0 @@ -const std = @import("std"); -const tokenize = std.mem.tokenize; -const parseInt = std.fmt.parseInt; -const print = std.debug.print; - -const data = @embedFile("input"); - -pub fn main() !void { - var it = tokenize(u8, data, "\n"); - - // Not sure if allocating a massive buffer and tracking the size is the right approach? - var buffer: [1000]u16 = undefined; - var i: usize = 0; - while (it.next()) |line| { - const int = try parseInt(u16, line, 10); - buffer[i] = int; - // Can we use continue expression? - i = i + 1; - } - - print("Part 1: {d}\n", .{part1(buffer[0..i])}); - print("Part 2: {d}\n", .{part2(buffer[0..i])}); -} - - -fn part1(input: []u16) u32 { - for (input) |a, i| { - for (input[(i+1)..]) |b| { - if (a + b == 2020) { - return @as(u32, a) * b; - } - } - } - return 0; -} - -fn part2(input: []u16) u32 { - for (input) |a, i| { - for (input[(i+1)..]) |b, j| { - for (input[(j+1)..]) |c| { - if (a + b + c == 2020) { - return @as(u32, a) * b * c; - } - } - } - } - return 0; -} diff --git a/2020/zig/src/day02.zig b/2020/zig/src/day02.zig deleted file mode 100644 index cb131b4..0000000 --- a/2020/zig/src/day02.zig +++ /dev/null @@ -1,62 +0,0 @@ -const std = @import("std"); -const gpa = @import("util.zig").gpa; -const Allocator = std.mem.Allocator; -const ArrayList = std.ArrayList; -const tokenize = std.mem.tokenize; -const parseInt = std.fmt.parseInt; -const print = std.debug.print; - -const data = @embedFile("input"); - -const Rule = struct { - a: u8, b: u8, char: u8, password: []const u8 -}; - -pub fn main() !void { - const rules = try parse(); - defer Allocator.free(gpa, rules); - print("Part 1: {d}\n", .{part1(rules)}); - print("Part 2: {d}\n", .{part2(rules)}); -} - - -fn parse() ![]Rule { - var it = tokenize(u8, data, "\n"); - var rules = ArrayList(Rule).init(gpa); - while (it.next()) |line| { - var line_it = tokenize(u8, line, ": -"); - const a = try parseInt(u8, line_it.next().?, 10); - const b = try parseInt(u8, line_it.next().?, 10); - const char = line_it.next().?[0]; - const password = line_it.next().?; - try rules.append(Rule{.a = a, .b = b, .char = char, .password = password}); - } - return rules.toOwnedSlice(); -} - -fn part1(rules: []Rule) u16 { - var valid_pw_count: u16 = 0; - for (rules) |rule| { - var count: u8 = 0; - for (rule.password) |password_char| { - if (rule.char == password_char) - count += 1; - } - - if (rule.a <= count and count <= rule.b) - valid_pw_count += 1; - } - return valid_pw_count; -} - -fn part2(rules: []Rule) u16 { - var valid_pw_count: u16 = 0; - for (rules) |rule| { - const a_match = rule.password[rule.a-1] == rule.char; - const b_match = rule.password[rule.b-1] == rule.char; - // No xor in zig? - if (a_match and !b_match or !a_match and b_match) - valid_pw_count += 1; - } - return valid_pw_count; -} diff --git a/2020/zig/src/day03.zig b/2020/zig/src/day03.zig deleted file mode 100644 index 1d45403..0000000 --- a/2020/zig/src/day03.zig +++ /dev/null @@ -1,46 +0,0 @@ -const std = @import("std"); -const util = @import("util.zig"); -const Allocator = std.mem.Allocator; -const ArrayList = std.ArrayList; -const tokenize = std.mem.tokenize; -const print = std.debug.print; -const gpa = util.gpa; - -const data = @embedFile("input"); - -pub fn main() !void { - - // Still have no idea how to clean up the ArrayLists - var it = tokenize(u8, data, "\n"); - var rows_al = ArrayList([]bool).init(gpa); - while (it.next()) |line| { - var row = ArrayList(bool).init(gpa); - for (line) |char| { - try row.append(char == '#'); - } - try rows_al.append(row.toOwnedSlice()); - } - var rows = rows_al.toOwnedSlice(); - - var part_1 = count_trees(rows, 3, 1); - print("Part 1: {}\n", .{part_1}); - - var part_2 = count_trees(rows, 1, 1) * part_1 * count_trees(rows, 5, 1) * count_trees(rows, 7, 1) * count_trees(rows, 1, 2); - - print("Part 2: {}\n", .{part_2}); -} - -fn count_trees(slope: [][]bool, delta_x: usize, delta_y: usize) usize { - var x: usize = 0; - var y: usize = 0; - var count: usize = 0; - while (y < slope.len) { - var square = slope[y][x]; - if (square) { - count += 1; - } - x = (x + delta_x) % slope[y].len; - y += delta_y; - } - return count; -} diff --git a/2020/zig/src/day04.zig b/2020/zig/src/day04.zig deleted file mode 100644 index 0a1768e..0000000 --- a/2020/zig/src/day04.zig +++ /dev/null @@ -1,69 +0,0 @@ -const std = @import("std"); -const Allocator = std.mem.Allocator; -const ArrayList = std.ArrayList; -const Map = std.AutoHashMap; -const StringHashMap = std.StringHashMap; -const BitSet = std.DynamicBitSet; -const Str = []const u8; - -const util = @import("util.zig"); -const gpa = util.gpa; - -const input = @embedFile("input"); - -pub fn main() !void { - var line_it = split(u8, input, "\n"); - var passports = ArrayList(StringHashMap([]const u8)).init(gpa); - var fields = StringHashMap([]const u8).init(gpa); - while (line_it.next()) |line| { - if (line.len == 0) { - try passports.append(try fields.clone()); - fields.clearAndFree(); - } else { - var token_it = tokenize(u8, line, " :"); - while (token_it.next()) |token| { - try fields.put(token, token_it.next().?); - } - } - } - try passports.append(fields); - - const required_fields = [_][]const u8{ "byr", "iyr", "eyr", "hgt", "hcl", "ecl", "pid" }; - var valid_count: usize = 0; - for (passports.items) |passport| { - var valid: bool = true; - for (required_fields) |required_field| { - valid = valid and passport.contains(required_field); - } - if (valid) valid_count += 1; - } - print("{}\n", .{valid_count}); -} - -// Useful stdlib functions -const tokenize = std.mem.tokenize; -const split = std.mem.split; -const indexOf = std.mem.indexOfScalar; -const indexOfAny = std.mem.indexOfAny; -const indexOfStr = std.mem.indexOfPosLinear; -const lastIndexOf = std.mem.lastIndexOfScalar; -const lastIndexOfAny = std.mem.lastIndexOfAny; -const lastIndexOfStr = std.mem.lastIndexOfLinear; -const trim = std.mem.trim; -const sliceMin = std.mem.min; -const sliceMax = std.mem.max; - -const parseInt = std.fmt.parseInt; -const parseFloat = std.fmt.parseFloat; - -const min = std.math.min; -const min3 = std.math.min3; -const max = std.math.max; -const max3 = std.math.max3; - -const print = std.debug.print; -const assert = std.debug.assert; - -const sort = std.sort.sort; -const asc = std.sort.asc; -const desc = std.sort.desc; diff --git a/2020/zig/src/day05.zig b/2020/zig/src/day05.zig deleted file mode 100644 index deaf893..0000000 --- a/2020/zig/src/day05.zig +++ /dev/null @@ -1,44 +0,0 @@ -const std = @import("std"); -const Allocator = std.mem.Allocator; -const List = std.ArrayList; -const Map = std.AutoHashMap; -const StrMap = std.StringHashMap; -const BitSet = std.DynamicBitSet; -const Str = []const u8; - -const util = @import("util.zig"); -const gpa = util.gpa; - -const data = @embedFile("../data/day05.txt"); - -pub fn main() !void { - -} - -// Useful stdlib functions -const tokenize = std.mem.tokenize; -const split = std.mem.split; -const indexOf = std.mem.indexOfScalar; -const indexOfAny = std.mem.indexOfAny; -const indexOfStr = std.mem.indexOfPosLinear; -const lastIndexOf = std.mem.lastIndexOfScalar; -const lastIndexOfAny = std.mem.lastIndexOfAny; -const lastIndexOfStr = std.mem.lastIndexOfLinear; -const trim = std.mem.trim; -const sliceMin = std.mem.min; -const sliceMax = std.mem.max; - -const parseInt = std.fmt.parseInt; -const parseFloat = std.fmt.parseFloat; - -const min = std.math.min; -const min3 = std.math.min3; -const max = std.math.max; -const max3 = std.math.max3; - -const print = std.debug.print; -const assert = std.debug.assert; - -const sort = std.sort.sort; -const asc = std.sort.asc; -const desc = std.sort.desc; diff --git a/2020/zig/src/day06.zig b/2020/zig/src/day06.zig deleted file mode 100644 index 68f8ecd..0000000 --- a/2020/zig/src/day06.zig +++ /dev/null @@ -1,44 +0,0 @@ -const std = @import("std"); -const Allocator = std.mem.Allocator; -const List = std.ArrayList; -const Map = std.AutoHashMap; -const StrMap = std.StringHashMap; -const BitSet = std.DynamicBitSet; -const Str = []const u8; - -const util = @import("util.zig"); -const gpa = util.gpa; - -const data = @embedFile("../data/day06.txt"); - -pub fn main() !void { - -} - -// Useful stdlib functions -const tokenize = std.mem.tokenize; -const split = std.mem.split; -const indexOf = std.mem.indexOfScalar; -const indexOfAny = std.mem.indexOfAny; -const indexOfStr = std.mem.indexOfPosLinear; -const lastIndexOf = std.mem.lastIndexOfScalar; -const lastIndexOfAny = std.mem.lastIndexOfAny; -const lastIndexOfStr = std.mem.lastIndexOfLinear; -const trim = std.mem.trim; -const sliceMin = std.mem.min; -const sliceMax = std.mem.max; - -const parseInt = std.fmt.parseInt; -const parseFloat = std.fmt.parseFloat; - -const min = std.math.min; -const min3 = std.math.min3; -const max = std.math.max; -const max3 = std.math.max3; - -const print = std.debug.print; -const assert = std.debug.assert; - -const sort = std.sort.sort; -const asc = std.sort.asc; -const desc = std.sort.desc; diff --git a/2020/zig/src/day07.zig b/2020/zig/src/day07.zig deleted file mode 100644 index 9f19621..0000000 --- a/2020/zig/src/day07.zig +++ /dev/null @@ -1,44 +0,0 @@ -const std = @import("std"); -const Allocator = std.mem.Allocator; -const List = std.ArrayList; -const Map = std.AutoHashMap; -const StrMap = std.StringHashMap; -const BitSet = std.DynamicBitSet; -const Str = []const u8; - -const util = @import("util.zig"); -const gpa = util.gpa; - -const data = @embedFile("../data/day07.txt"); - -pub fn main() !void { - -} - -// Useful stdlib functions -const tokenize = std.mem.tokenize; -const split = std.mem.split; -const indexOf = std.mem.indexOfScalar; -const indexOfAny = std.mem.indexOfAny; -const indexOfStr = std.mem.indexOfPosLinear; -const lastIndexOf = std.mem.lastIndexOfScalar; -const lastIndexOfAny = std.mem.lastIndexOfAny; -const lastIndexOfStr = std.mem.lastIndexOfLinear; -const trim = std.mem.trim; -const sliceMin = std.mem.min; -const sliceMax = std.mem.max; - -const parseInt = std.fmt.parseInt; -const parseFloat = std.fmt.parseFloat; - -const min = std.math.min; -const min3 = std.math.min3; -const max = std.math.max; -const max3 = std.math.max3; - -const print = std.debug.print; -const assert = std.debug.assert; - -const sort = std.sort.sort; -const asc = std.sort.asc; -const desc = std.sort.desc; diff --git a/2020/zig/src/day08.zig b/2020/zig/src/day08.zig deleted file mode 100644 index 103b835..0000000 --- a/2020/zig/src/day08.zig +++ /dev/null @@ -1,44 +0,0 @@ -const std = @import("std"); -const Allocator = std.mem.Allocator; -const List = std.ArrayList; -const Map = std.AutoHashMap; -const StrMap = std.StringHashMap; -const BitSet = std.DynamicBitSet; -const Str = []const u8; - -const util = @import("util.zig"); -const gpa = util.gpa; - -const data = @embedFile("../data/day08.txt"); - -pub fn main() !void { - -} - -// Useful stdlib functions -const tokenize = std.mem.tokenize; -const split = std.mem.split; -const indexOf = std.mem.indexOfScalar; -const indexOfAny = std.mem.indexOfAny; -const indexOfStr = std.mem.indexOfPosLinear; -const lastIndexOf = std.mem.lastIndexOfScalar; -const lastIndexOfAny = std.mem.lastIndexOfAny; -const lastIndexOfStr = std.mem.lastIndexOfLinear; -const trim = std.mem.trim; -const sliceMin = std.mem.min; -const sliceMax = std.mem.max; - -const parseInt = std.fmt.parseInt; -const parseFloat = std.fmt.parseFloat; - -const min = std.math.min; -const min3 = std.math.min3; -const max = std.math.max; -const max3 = std.math.max3; - -const print = std.debug.print; -const assert = std.debug.assert; - -const sort = std.sort.sort; -const asc = std.sort.asc; -const desc = std.sort.desc; diff --git a/2020/zig/src/day09.zig b/2020/zig/src/day09.zig deleted file mode 100644 index cbae5ba..0000000 --- a/2020/zig/src/day09.zig +++ /dev/null @@ -1,44 +0,0 @@ -const std = @import("std"); -const Allocator = std.mem.Allocator; -const List = std.ArrayList; -const Map = std.AutoHashMap; -const StrMap = std.StringHashMap; -const BitSet = std.DynamicBitSet; -const Str = []const u8; - -const util = @import("util.zig"); -const gpa = util.gpa; - -const data = @embedFile("../data/day09.txt"); - -pub fn main() !void { - -} - -// Useful stdlib functions -const tokenize = std.mem.tokenize; -const split = std.mem.split; -const indexOf = std.mem.indexOfScalar; -const indexOfAny = std.mem.indexOfAny; -const indexOfStr = std.mem.indexOfPosLinear; -const lastIndexOf = std.mem.lastIndexOfScalar; -const lastIndexOfAny = std.mem.lastIndexOfAny; -const lastIndexOfStr = std.mem.lastIndexOfLinear; -const trim = std.mem.trim; -const sliceMin = std.mem.min; -const sliceMax = std.mem.max; - -const parseInt = std.fmt.parseInt; -const parseFloat = std.fmt.parseFloat; - -const min = std.math.min; -const min3 = std.math.min3; -const max = std.math.max; -const max3 = std.math.max3; - -const print = std.debug.print; -const assert = std.debug.assert; - -const sort = std.sort.sort; -const asc = std.sort.asc; -const desc = std.sort.desc; diff --git a/2020/zig/src/day10.zig b/2020/zig/src/day10.zig deleted file mode 100644 index 4922906..0000000 --- a/2020/zig/src/day10.zig +++ /dev/null @@ -1,44 +0,0 @@ -const std = @import("std"); -const Allocator = std.mem.Allocator; -const List = std.ArrayList; -const Map = std.AutoHashMap; -const StrMap = std.StringHashMap; -const BitSet = std.DynamicBitSet; -const Str = []const u8; - -const util = @import("util.zig"); -const gpa = util.gpa; - -const data = @embedFile("../data/day10.txt"); - -pub fn main() !void { - -} - -// Useful stdlib functions -const tokenize = std.mem.tokenize; -const split = std.mem.split; -const indexOf = std.mem.indexOfScalar; -const indexOfAny = std.mem.indexOfAny; -const indexOfStr = std.mem.indexOfPosLinear; -const lastIndexOf = std.mem.lastIndexOfScalar; -const lastIndexOfAny = std.mem.lastIndexOfAny; -const lastIndexOfStr = std.mem.lastIndexOfLinear; -const trim = std.mem.trim; -const sliceMin = std.mem.min; -const sliceMax = std.mem.max; - -const parseInt = std.fmt.parseInt; -const parseFloat = std.fmt.parseFloat; - -const min = std.math.min; -const min3 = std.math.min3; -const max = std.math.max; -const max3 = std.math.max3; - -const print = std.debug.print; -const assert = std.debug.assert; - -const sort = std.sort.sort; -const asc = std.sort.asc; -const desc = std.sort.desc; diff --git a/2020/zig/src/day11.zig b/2020/zig/src/day11.zig deleted file mode 100644 index 6e7dd52..0000000 --- a/2020/zig/src/day11.zig +++ /dev/null @@ -1,44 +0,0 @@ -const std = @import("std"); -const Allocator = std.mem.Allocator; -const List = std.ArrayList; -const Map = std.AutoHashMap; -const StrMap = std.StringHashMap; -const BitSet = std.DynamicBitSet; -const Str = []const u8; - -const util = @import("util.zig"); -const gpa = util.gpa; - -const data = @embedFile("../data/day11.txt"); - -pub fn main() !void { - -} - -// Useful stdlib functions -const tokenize = std.mem.tokenize; -const split = std.mem.split; -const indexOf = std.mem.indexOfScalar; -const indexOfAny = std.mem.indexOfAny; -const indexOfStr = std.mem.indexOfPosLinear; -const lastIndexOf = std.mem.lastIndexOfScalar; -const lastIndexOfAny = std.mem.lastIndexOfAny; -const lastIndexOfStr = std.mem.lastIndexOfLinear; -const trim = std.mem.trim; -const sliceMin = std.mem.min; -const sliceMax = std.mem.max; - -const parseInt = std.fmt.parseInt; -const parseFloat = std.fmt.parseFloat; - -const min = std.math.min; -const min3 = std.math.min3; -const max = std.math.max; -const max3 = std.math.max3; - -const print = std.debug.print; -const assert = std.debug.assert; - -const sort = std.sort.sort; -const asc = std.sort.asc; -const desc = std.sort.desc; diff --git a/2020/zig/src/day12.zig b/2020/zig/src/day12.zig deleted file mode 100644 index f6836d0..0000000 --- a/2020/zig/src/day12.zig +++ /dev/null @@ -1,44 +0,0 @@ -const std = @import("std"); -const Allocator = std.mem.Allocator; -const List = std.ArrayList; -const Map = std.AutoHashMap; -const StrMap = std.StringHashMap; -const BitSet = std.DynamicBitSet; -const Str = []const u8; - -const util = @import("util.zig"); -const gpa = util.gpa; - -const data = @embedFile("../data/day12.txt"); - -pub fn main() !void { - -} - -// Useful stdlib functions -const tokenize = std.mem.tokenize; -const split = std.mem.split; -const indexOf = std.mem.indexOfScalar; -const indexOfAny = std.mem.indexOfAny; -const indexOfStr = std.mem.indexOfPosLinear; -const lastIndexOf = std.mem.lastIndexOfScalar; -const lastIndexOfAny = std.mem.lastIndexOfAny; -const lastIndexOfStr = std.mem.lastIndexOfLinear; -const trim = std.mem.trim; -const sliceMin = std.mem.min; -const sliceMax = std.mem.max; - -const parseInt = std.fmt.parseInt; -const parseFloat = std.fmt.parseFloat; - -const min = std.math.min; -const min3 = std.math.min3; -const max = std.math.max; -const max3 = std.math.max3; - -const print = std.debug.print; -const assert = std.debug.assert; - -const sort = std.sort.sort; -const asc = std.sort.asc; -const desc = std.sort.desc; diff --git a/2020/zig/src/day13.zig b/2020/zig/src/day13.zig deleted file mode 100644 index d9c017f..0000000 --- a/2020/zig/src/day13.zig +++ /dev/null @@ -1,44 +0,0 @@ -const std = @import("std"); -const Allocator = std.mem.Allocator; -const List = std.ArrayList; -const Map = std.AutoHashMap; -const StrMap = std.StringHashMap; -const BitSet = std.DynamicBitSet; -const Str = []const u8; - -const util = @import("util.zig"); -const gpa = util.gpa; - -const data = @embedFile("../data/day13.txt"); - -pub fn main() !void { - -} - -// Useful stdlib functions -const tokenize = std.mem.tokenize; -const split = std.mem.split; -const indexOf = std.mem.indexOfScalar; -const indexOfAny = std.mem.indexOfAny; -const indexOfStr = std.mem.indexOfPosLinear; -const lastIndexOf = std.mem.lastIndexOfScalar; -const lastIndexOfAny = std.mem.lastIndexOfAny; -const lastIndexOfStr = std.mem.lastIndexOfLinear; -const trim = std.mem.trim; -const sliceMin = std.mem.min; -const sliceMax = std.mem.max; - -const parseInt = std.fmt.parseInt; -const parseFloat = std.fmt.parseFloat; - -const min = std.math.min; -const min3 = std.math.min3; -const max = std.math.max; -const max3 = std.math.max3; - -const print = std.debug.print; -const assert = std.debug.assert; - -const sort = std.sort.sort; -const asc = std.sort.asc; -const desc = std.sort.desc; diff --git a/2020/zig/src/day14.zig b/2020/zig/src/day14.zig deleted file mode 100644 index d791082..0000000 --- a/2020/zig/src/day14.zig +++ /dev/null @@ -1,44 +0,0 @@ -const std = @import("std"); -const Allocator = std.mem.Allocator; -const List = std.ArrayList; -const Map = std.AutoHashMap; -const StrMap = std.StringHashMap; -const BitSet = std.DynamicBitSet; -const Str = []const u8; - -const util = @import("util.zig"); -const gpa = util.gpa; - -const data = @embedFile("../data/day14.txt"); - -pub fn main() !void { - -} - -// Useful stdlib functions -const tokenize = std.mem.tokenize; -const split = std.mem.split; -const indexOf = std.mem.indexOfScalar; -const indexOfAny = std.mem.indexOfAny; -const indexOfStr = std.mem.indexOfPosLinear; -const lastIndexOf = std.mem.lastIndexOfScalar; -const lastIndexOfAny = std.mem.lastIndexOfAny; -const lastIndexOfStr = std.mem.lastIndexOfLinear; -const trim = std.mem.trim; -const sliceMin = std.mem.min; -const sliceMax = std.mem.max; - -const parseInt = std.fmt.parseInt; -const parseFloat = std.fmt.parseFloat; - -const min = std.math.min; -const min3 = std.math.min3; -const max = std.math.max; -const max3 = std.math.max3; - -const print = std.debug.print; -const assert = std.debug.assert; - -const sort = std.sort.sort; -const asc = std.sort.asc; -const desc = std.sort.desc; diff --git a/2020/zig/src/day15.zig b/2020/zig/src/day15.zig deleted file mode 100644 index 3b9f098..0000000 --- a/2020/zig/src/day15.zig +++ /dev/null @@ -1,44 +0,0 @@ -const std = @import("std"); -const Allocator = std.mem.Allocator; -const List = std.ArrayList; -const Map = std.AutoHashMap; -const StrMap = std.StringHashMap; -const BitSet = std.DynamicBitSet; -const Str = []const u8; - -const util = @import("util.zig"); -const gpa = util.gpa; - -const data = @embedFile("../data/day15.txt"); - -pub fn main() !void { - -} - -// Useful stdlib functions -const tokenize = std.mem.tokenize; -const split = std.mem.split; -const indexOf = std.mem.indexOfScalar; -const indexOfAny = std.mem.indexOfAny; -const indexOfStr = std.mem.indexOfPosLinear; -const lastIndexOf = std.mem.lastIndexOfScalar; -const lastIndexOfAny = std.mem.lastIndexOfAny; -const lastIndexOfStr = std.mem.lastIndexOfLinear; -const trim = std.mem.trim; -const sliceMin = std.mem.min; -const sliceMax = std.mem.max; - -const parseInt = std.fmt.parseInt; -const parseFloat = std.fmt.parseFloat; - -const min = std.math.min; -const min3 = std.math.min3; -const max = std.math.max; -const max3 = std.math.max3; - -const print = std.debug.print; -const assert = std.debug.assert; - -const sort = std.sort.sort; -const asc = std.sort.asc; -const desc = std.sort.desc; diff --git a/2020/zig/src/day16.zig b/2020/zig/src/day16.zig deleted file mode 100644 index f5f9671..0000000 --- a/2020/zig/src/day16.zig +++ /dev/null @@ -1,44 +0,0 @@ -const std = @import("std"); -const Allocator = std.mem.Allocator; -const List = std.ArrayList; -const Map = std.AutoHashMap; -const StrMap = std.StringHashMap; -const BitSet = std.DynamicBitSet; -const Str = []const u8; - -const util = @import("util.zig"); -const gpa = util.gpa; - -const data = @embedFile("../data/day16.txt"); - -pub fn main() !void { - -} - -// Useful stdlib functions -const tokenize = std.mem.tokenize; -const split = std.mem.split; -const indexOf = std.mem.indexOfScalar; -const indexOfAny = std.mem.indexOfAny; -const indexOfStr = std.mem.indexOfPosLinear; -const lastIndexOf = std.mem.lastIndexOfScalar; -const lastIndexOfAny = std.mem.lastIndexOfAny; -const lastIndexOfStr = std.mem.lastIndexOfLinear; -const trim = std.mem.trim; -const sliceMin = std.mem.min; -const sliceMax = std.mem.max; - -const parseInt = std.fmt.parseInt; -const parseFloat = std.fmt.parseFloat; - -const min = std.math.min; -const min3 = std.math.min3; -const max = std.math.max; -const max3 = std.math.max3; - -const print = std.debug.print; -const assert = std.debug.assert; - -const sort = std.sort.sort; -const asc = std.sort.asc; -const desc = std.sort.desc; diff --git a/2020/zig/src/day17.zig b/2020/zig/src/day17.zig deleted file mode 100644 index 3c5187c..0000000 --- a/2020/zig/src/day17.zig +++ /dev/null @@ -1,44 +0,0 @@ -const std = @import("std"); -const Allocator = std.mem.Allocator; -const List = std.ArrayList; -const Map = std.AutoHashMap; -const StrMap = std.StringHashMap; -const BitSet = std.DynamicBitSet; -const Str = []const u8; - -const util = @import("util.zig"); -const gpa = util.gpa; - -const data = @embedFile("../data/day17.txt"); - -pub fn main() !void { - -} - -// Useful stdlib functions -const tokenize = std.mem.tokenize; -const split = std.mem.split; -const indexOf = std.mem.indexOfScalar; -const indexOfAny = std.mem.indexOfAny; -const indexOfStr = std.mem.indexOfPosLinear; -const lastIndexOf = std.mem.lastIndexOfScalar; -const lastIndexOfAny = std.mem.lastIndexOfAny; -const lastIndexOfStr = std.mem.lastIndexOfLinear; -const trim = std.mem.trim; -const sliceMin = std.mem.min; -const sliceMax = std.mem.max; - -const parseInt = std.fmt.parseInt; -const parseFloat = std.fmt.parseFloat; - -const min = std.math.min; -const min3 = std.math.min3; -const max = std.math.max; -const max3 = std.math.max3; - -const print = std.debug.print; -const assert = std.debug.assert; - -const sort = std.sort.sort; -const asc = std.sort.asc; -const desc = std.sort.desc; diff --git a/2020/zig/src/day18.zig b/2020/zig/src/day18.zig deleted file mode 100644 index e2c4d36..0000000 --- a/2020/zig/src/day18.zig +++ /dev/null @@ -1,44 +0,0 @@ -const std = @import("std"); -const Allocator = std.mem.Allocator; -const List = std.ArrayList; -const Map = std.AutoHashMap; -const StrMap = std.StringHashMap; -const BitSet = std.DynamicBitSet; -const Str = []const u8; - -const util = @import("util.zig"); -const gpa = util.gpa; - -const data = @embedFile("../data/day18.txt"); - -pub fn main() !void { - -} - -// Useful stdlib functions -const tokenize = std.mem.tokenize; -const split = std.mem.split; -const indexOf = std.mem.indexOfScalar; -const indexOfAny = std.mem.indexOfAny; -const indexOfStr = std.mem.indexOfPosLinear; -const lastIndexOf = std.mem.lastIndexOfScalar; -const lastIndexOfAny = std.mem.lastIndexOfAny; -const lastIndexOfStr = std.mem.lastIndexOfLinear; -const trim = std.mem.trim; -const sliceMin = std.mem.min; -const sliceMax = std.mem.max; - -const parseInt = std.fmt.parseInt; -const parseFloat = std.fmt.parseFloat; - -const min = std.math.min; -const min3 = std.math.min3; -const max = std.math.max; -const max3 = std.math.max3; - -const print = std.debug.print; -const assert = std.debug.assert; - -const sort = std.sort.sort; -const asc = std.sort.asc; -const desc = std.sort.desc; diff --git a/2020/zig/src/day19.zig b/2020/zig/src/day19.zig deleted file mode 100644 index e247aac..0000000 --- a/2020/zig/src/day19.zig +++ /dev/null @@ -1,44 +0,0 @@ -const std = @import("std"); -const Allocator = std.mem.Allocator; -const List = std.ArrayList; -const Map = std.AutoHashMap; -const StrMap = std.StringHashMap; -const BitSet = std.DynamicBitSet; -const Str = []const u8; - -const util = @import("util.zig"); -const gpa = util.gpa; - -const data = @embedFile("../data/day19.txt"); - -pub fn main() !void { - -} - -// Useful stdlib functions -const tokenize = std.mem.tokenize; -const split = std.mem.split; -const indexOf = std.mem.indexOfScalar; -const indexOfAny = std.mem.indexOfAny; -const indexOfStr = std.mem.indexOfPosLinear; -const lastIndexOf = std.mem.lastIndexOfScalar; -const lastIndexOfAny = std.mem.lastIndexOfAny; -const lastIndexOfStr = std.mem.lastIndexOfLinear; -const trim = std.mem.trim; -const sliceMin = std.mem.min; -const sliceMax = std.mem.max; - -const parseInt = std.fmt.parseInt; -const parseFloat = std.fmt.parseFloat; - -const min = std.math.min; -const min3 = std.math.min3; -const max = std.math.max; -const max3 = std.math.max3; - -const print = std.debug.print; -const assert = std.debug.assert; - -const sort = std.sort.sort; -const asc = std.sort.asc; -const desc = std.sort.desc; diff --git a/2020/zig/src/day20.zig b/2020/zig/src/day20.zig deleted file mode 100644 index f7a9ac4..0000000 --- a/2020/zig/src/day20.zig +++ /dev/null @@ -1,44 +0,0 @@ -const std = @import("std"); -const Allocator = std.mem.Allocator; -const List = std.ArrayList; -const Map = std.AutoHashMap; -const StrMap = std.StringHashMap; -const BitSet = std.DynamicBitSet; -const Str = []const u8; - -const util = @import("util.zig"); -const gpa = util.gpa; - -const data = @embedFile("../data/day20.txt"); - -pub fn main() !void { - -} - -// Useful stdlib functions -const tokenize = std.mem.tokenize; -const split = std.mem.split; -const indexOf = std.mem.indexOfScalar; -const indexOfAny = std.mem.indexOfAny; -const indexOfStr = std.mem.indexOfPosLinear; -const lastIndexOf = std.mem.lastIndexOfScalar; -const lastIndexOfAny = std.mem.lastIndexOfAny; -const lastIndexOfStr = std.mem.lastIndexOfLinear; -const trim = std.mem.trim; -const sliceMin = std.mem.min; -const sliceMax = std.mem.max; - -const parseInt = std.fmt.parseInt; -const parseFloat = std.fmt.parseFloat; - -const min = std.math.min; -const min3 = std.math.min3; -const max = std.math.max; -const max3 = std.math.max3; - -const print = std.debug.print; -const assert = std.debug.assert; - -const sort = std.sort.sort; -const asc = std.sort.asc; -const desc = std.sort.desc; diff --git a/2020/zig/src/day21.zig b/2020/zig/src/day21.zig deleted file mode 100644 index af7d628..0000000 --- a/2020/zig/src/day21.zig +++ /dev/null @@ -1,44 +0,0 @@ -const std = @import("std"); -const Allocator = std.mem.Allocator; -const List = std.ArrayList; -const Map = std.AutoHashMap; -const StrMap = std.StringHashMap; -const BitSet = std.DynamicBitSet; -const Str = []const u8; - -const util = @import("util.zig"); -const gpa = util.gpa; - -const data = @embedFile("../data/day21.txt"); - -pub fn main() !void { - -} - -// Useful stdlib functions -const tokenize = std.mem.tokenize; -const split = std.mem.split; -const indexOf = std.mem.indexOfScalar; -const indexOfAny = std.mem.indexOfAny; -const indexOfStr = std.mem.indexOfPosLinear; -const lastIndexOf = std.mem.lastIndexOfScalar; -const lastIndexOfAny = std.mem.lastIndexOfAny; -const lastIndexOfStr = std.mem.lastIndexOfLinear; -const trim = std.mem.trim; -const sliceMin = std.mem.min; -const sliceMax = std.mem.max; - -const parseInt = std.fmt.parseInt; -const parseFloat = std.fmt.parseFloat; - -const min = std.math.min; -const min3 = std.math.min3; -const max = std.math.max; -const max3 = std.math.max3; - -const print = std.debug.print; -const assert = std.debug.assert; - -const sort = std.sort.sort; -const asc = std.sort.asc; -const desc = std.sort.desc; diff --git a/2020/zig/src/day22.zig b/2020/zig/src/day22.zig deleted file mode 100644 index fb4986f..0000000 --- a/2020/zig/src/day22.zig +++ /dev/null @@ -1,44 +0,0 @@ -const std = @import("std"); -const Allocator = std.mem.Allocator; -const List = std.ArrayList; -const Map = std.AutoHashMap; -const StrMap = std.StringHashMap; -const BitSet = std.DynamicBitSet; -const Str = []const u8; - -const util = @import("util.zig"); -const gpa = util.gpa; - -const data = @embedFile("../data/day22.txt"); - -pub fn main() !void { - -} - -// Useful stdlib functions -const tokenize = std.mem.tokenize; -const split = std.mem.split; -const indexOf = std.mem.indexOfScalar; -const indexOfAny = std.mem.indexOfAny; -const indexOfStr = std.mem.indexOfPosLinear; -const lastIndexOf = std.mem.lastIndexOfScalar; -const lastIndexOfAny = std.mem.lastIndexOfAny; -const lastIndexOfStr = std.mem.lastIndexOfLinear; -const trim = std.mem.trim; -const sliceMin = std.mem.min; -const sliceMax = std.mem.max; - -const parseInt = std.fmt.parseInt; -const parseFloat = std.fmt.parseFloat; - -const min = std.math.min; -const min3 = std.math.min3; -const max = std.math.max; -const max3 = std.math.max3; - -const print = std.debug.print; -const assert = std.debug.assert; - -const sort = std.sort.sort; -const asc = std.sort.asc; -const desc = std.sort.desc; diff --git a/2020/zig/src/day23.zig b/2020/zig/src/day23.zig deleted file mode 100644 index b1ecf7d..0000000 --- a/2020/zig/src/day23.zig +++ /dev/null @@ -1,44 +0,0 @@ -const std = @import("std"); -const Allocator = std.mem.Allocator; -const List = std.ArrayList; -const Map = std.AutoHashMap; -const StrMap = std.StringHashMap; -const BitSet = std.DynamicBitSet; -const Str = []const u8; - -const util = @import("util.zig"); -const gpa = util.gpa; - -const data = @embedFile("../data/day23.txt"); - -pub fn main() !void { - -} - -// Useful stdlib functions -const tokenize = std.mem.tokenize; -const split = std.mem.split; -const indexOf = std.mem.indexOfScalar; -const indexOfAny = std.mem.indexOfAny; -const indexOfStr = std.mem.indexOfPosLinear; -const lastIndexOf = std.mem.lastIndexOfScalar; -const lastIndexOfAny = std.mem.lastIndexOfAny; -const lastIndexOfStr = std.mem.lastIndexOfLinear; -const trim = std.mem.trim; -const sliceMin = std.mem.min; -const sliceMax = std.mem.max; - -const parseInt = std.fmt.parseInt; -const parseFloat = std.fmt.parseFloat; - -const min = std.math.min; -const min3 = std.math.min3; -const max = std.math.max; -const max3 = std.math.max3; - -const print = std.debug.print; -const assert = std.debug.assert; - -const sort = std.sort.sort; -const asc = std.sort.asc; -const desc = std.sort.desc; diff --git a/2020/zig/src/day24.zig b/2020/zig/src/day24.zig deleted file mode 100644 index caabe67..0000000 --- a/2020/zig/src/day24.zig +++ /dev/null @@ -1,44 +0,0 @@ -const std = @import("std"); -const Allocator = std.mem.Allocator; -const List = std.ArrayList; -const Map = std.AutoHashMap; -const StrMap = std.StringHashMap; -const BitSet = std.DynamicBitSet; -const Str = []const u8; - -const util = @import("util.zig"); -const gpa = util.gpa; - -const data = @embedFile("../data/day24.txt"); - -pub fn main() !void { - -} - -// Useful stdlib functions -const tokenize = std.mem.tokenize; -const split = std.mem.split; -const indexOf = std.mem.indexOfScalar; -const indexOfAny = std.mem.indexOfAny; -const indexOfStr = std.mem.indexOfPosLinear; -const lastIndexOf = std.mem.lastIndexOfScalar; -const lastIndexOfAny = std.mem.lastIndexOfAny; -const lastIndexOfStr = std.mem.lastIndexOfLinear; -const trim = std.mem.trim; -const sliceMin = std.mem.min; -const sliceMax = std.mem.max; - -const parseInt = std.fmt.parseInt; -const parseFloat = std.fmt.parseFloat; - -const min = std.math.min; -const min3 = std.math.min3; -const max = std.math.max; -const max3 = std.math.max3; - -const print = std.debug.print; -const assert = std.debug.assert; - -const sort = std.sort.sort; -const asc = std.sort.asc; -const desc = std.sort.desc; diff --git a/2020/zig/src/day25.zig b/2020/zig/src/day25.zig deleted file mode 100644 index 768b4d9..0000000 --- a/2020/zig/src/day25.zig +++ /dev/null @@ -1,44 +0,0 @@ -const std = @import("std"); -const Allocator = std.mem.Allocator; -const List = std.ArrayList; -const Map = std.AutoHashMap; -const StrMap = std.StringHashMap; -const BitSet = std.DynamicBitSet; -const Str = []const u8; - -const util = @import("util.zig"); -const gpa = util.gpa; - -const data = @embedFile("../data/day25.txt"); - -pub fn main() !void { - -} - -// Useful stdlib functions -const tokenize = std.mem.tokenize; -const split = std.mem.split; -const indexOf = std.mem.indexOfScalar; -const indexOfAny = std.mem.indexOfAny; -const indexOfStr = std.mem.indexOfPosLinear; -const lastIndexOf = std.mem.lastIndexOfScalar; -const lastIndexOfAny = std.mem.lastIndexOfAny; -const lastIndexOfStr = std.mem.lastIndexOfLinear; -const trim = std.mem.trim; -const sliceMin = std.mem.min; -const sliceMax = std.mem.max; - -const parseInt = std.fmt.parseInt; -const parseFloat = std.fmt.parseFloat; - -const min = std.math.min; -const min3 = std.math.min3; -const max = std.math.max; -const max3 = std.math.max3; - -const print = std.debug.print; -const assert = std.debug.assert; - -const sort = std.sort.sort; -const asc = std.sort.asc; -const desc = std.sort.desc; diff --git a/2020/zig/src/test_all.zig b/2020/zig/src/test_all.zig deleted file mode 100644 index 75e7b6f..0000000 --- a/2020/zig/src/test_all.zig +++ /dev/null @@ -1,29 +0,0 @@ -test { - _ = @import("util.zig"); - _ = @import("day01.zig"); - _ = @import("day02.zig"); - _ = @import("day03.zig"); - _ = @import("day04.zig"); - _ = @import("day05.zig"); - _ = @import("day06.zig"); - _ = @import("day07.zig"); - _ = @import("day08.zig"); - _ = @import("day09.zig"); - _ = @import("day10.zig"); - _ = @import("day11.zig"); - _ = @import("day12.zig"); - _ = @import("day13.zig"); - _ = @import("day14.zig"); - _ = @import("day15.zig"); - _ = @import("day16.zig"); - _ = @import("day17.zig"); - _ = @import("day18.zig"); - _ = @import("day19.zig"); - _ = @import("day20.zig"); - _ = @import("day21.zig"); - _ = @import("day22.zig"); - _ = @import("day23.zig"); - _ = @import("day24.zig"); - _ = @import("day25.zig"); - // Import any other files with tests here -} diff --git a/2020/zig/src/util.zig b/2020/zig/src/util.zig deleted file mode 100644 index 489fe08..0000000 --- a/2020/zig/src/util.zig +++ /dev/null @@ -1,41 +0,0 @@ -const std = @import("std"); -const Allocator = std.mem.Allocator; -const List = std.ArrayList; -const Map = std.AutoHashMap; -const StrMap = std.StringHashMap; -const BitSet = std.DynamicBitSet; -const Str = []const u8; - -var gpa_impl = std.heap.GeneralPurposeAllocator(.{}){}; -pub const gpa = gpa_impl.allocator(); - -// Add utility functions here - - -// Useful stdlib functions -const tokenize = std.mem.tokenize; -const split = std.mem.split; -const indexOf = std.mem.indexOfScalar; -const indexOfAny = std.mem.indexOfAny; -const indexOfStr = std.mem.indexOfPosLinear; -const lastIndexOf = std.mem.lastIndexOfScalar; -const lastIndexOfAny = std.mem.lastIndexOfAny; -const lastIndexOfStr = std.mem.lastIndexOfLinear; -const trim = std.mem.trim; -const sliceMin = std.mem.min; -const sliceMax = std.mem.max; - -const parseInt = std.fmt.parseInt; -const parseFloat = std.fmt.parseFloat; - -const min = std.math.min; -const min3 = std.math.min3; -const max = std.math.max; -const max3 = std.math.max3; - -const print = std.debug.print; -const assert = std.debug.assert; - -const sort = std.sort.sort; -const asc = std.sort.asc; -const desc = std.sort.desc; diff --git a/README.md b/README.md index 8fcd4a9..afecfd7 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,5 @@ My (attempted) solutions to [Advent of Code](https://adventofcode.com/). -- [2020: Zig](https://git.adamu.jp/adam/AdventOfCode/src/branch/main/2020/zig) -- [2020: Elixir](https://git.adamu.jp/adam/AdventOfCode/src/branch/main/2020/elixir) +- [2020: Elixir](https://git.adamu.jp/adam/AdventOfCode/src/branch/main/2020) - [2018: Elixir](https://git.adamu.jp/adam/AdventOfCode/src/branch/main/2018)