Update for 2021
This commit is contained in:
parent
6b9827d26a
commit
510ff33dd7
28 changed files with 293 additions and 60 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
||||||
zig-cache/
|
zig-cache/
|
||||||
|
zig-out/
|
||||||
build_runner.zig
|
build_runner.zig
|
||||||
|
|
50
.vscode/launch.json
vendored
50
.vscode/launch.json
vendored
|
@ -8,7 +8,7 @@
|
||||||
"name": "day 01",
|
"name": "day 01",
|
||||||
"type": "cppvsdbg",
|
"type": "cppvsdbg",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceFolder}/zig-cache/bin/day01.exe",
|
"program": "${workspaceFolder}/zig-out/bin/day01.exe",
|
||||||
"args": [],
|
"args": [],
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
"name": "day 02",
|
"name": "day 02",
|
||||||
"type": "cppvsdbg",
|
"type": "cppvsdbg",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceFolder}/zig-cache/bin/day02.exe",
|
"program": "${workspaceFolder}/zig-out/bin/day02.exe",
|
||||||
"args": [],
|
"args": [],
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
"name": "day 03",
|
"name": "day 03",
|
||||||
"type": "cppvsdbg",
|
"type": "cppvsdbg",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceFolder}/zig-cache/bin/day03.exe",
|
"program": "${workspaceFolder}/zig-out/bin/day03.exe",
|
||||||
"args": [],
|
"args": [],
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
"name": "day 04",
|
"name": "day 04",
|
||||||
"type": "cppvsdbg",
|
"type": "cppvsdbg",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceFolder}/zig-cache/bin/day04.exe",
|
"program": "${workspaceFolder}/zig-out/bin/day04.exe",
|
||||||
"args": [],
|
"args": [],
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
"name": "day 05",
|
"name": "day 05",
|
||||||
"type": "cppvsdbg",
|
"type": "cppvsdbg",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceFolder}/zig-cache/bin/day05.exe",
|
"program": "${workspaceFolder}/zig-out/bin/day05.exe",
|
||||||
"args": [],
|
"args": [],
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
"name": "day 06",
|
"name": "day 06",
|
||||||
"type": "cppvsdbg",
|
"type": "cppvsdbg",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceFolder}/zig-cache/bin/day06.exe",
|
"program": "${workspaceFolder}/zig-out/bin/day06.exe",
|
||||||
"args": [],
|
"args": [],
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
|
@ -80,7 +80,7 @@
|
||||||
"name": "day 07",
|
"name": "day 07",
|
||||||
"type": "cppvsdbg",
|
"type": "cppvsdbg",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceFolder}/zig-cache/bin/day07.exe",
|
"program": "${workspaceFolder}/zig-out/bin/day07.exe",
|
||||||
"args": [],
|
"args": [],
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
|
@ -92,7 +92,7 @@
|
||||||
"name": "day 08",
|
"name": "day 08",
|
||||||
"type": "cppvsdbg",
|
"type": "cppvsdbg",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceFolder}/zig-cache/bin/day08.exe",
|
"program": "${workspaceFolder}/zig-out/bin/day08.exe",
|
||||||
"args": [],
|
"args": [],
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
|
@ -104,7 +104,7 @@
|
||||||
"name": "day 09",
|
"name": "day 09",
|
||||||
"type": "cppvsdbg",
|
"type": "cppvsdbg",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceFolder}/zig-cache/bin/day09.exe",
|
"program": "${workspaceFolder}/zig-out/bin/day09.exe",
|
||||||
"args": [],
|
"args": [],
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
|
@ -116,7 +116,7 @@
|
||||||
"name": "day 10",
|
"name": "day 10",
|
||||||
"type": "cppvsdbg",
|
"type": "cppvsdbg",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceFolder}/zig-cache/bin/day10.exe",
|
"program": "${workspaceFolder}/zig-out/bin/day10.exe",
|
||||||
"args": [],
|
"args": [],
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
|
@ -128,7 +128,7 @@
|
||||||
"name": "day 11",
|
"name": "day 11",
|
||||||
"type": "cppvsdbg",
|
"type": "cppvsdbg",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceFolder}/zig-cache/bin/day11.exe",
|
"program": "${workspaceFolder}/zig-out/bin/day11.exe",
|
||||||
"args": [],
|
"args": [],
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
|
@ -140,7 +140,7 @@
|
||||||
"name": "day 12",
|
"name": "day 12",
|
||||||
"type": "cppvsdbg",
|
"type": "cppvsdbg",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceFolder}/zig-cache/bin/day12.exe",
|
"program": "${workspaceFolder}/zig-out/bin/day12.exe",
|
||||||
"args": [],
|
"args": [],
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
|
@ -152,7 +152,7 @@
|
||||||
"name": "day 13",
|
"name": "day 13",
|
||||||
"type": "cppvsdbg",
|
"type": "cppvsdbg",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceFolder}/zig-cache/bin/day13.exe",
|
"program": "${workspaceFolder}/zig-out/bin/day13.exe",
|
||||||
"args": [],
|
"args": [],
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
|
@ -164,7 +164,7 @@
|
||||||
"name": "day 14",
|
"name": "day 14",
|
||||||
"type": "cppvsdbg",
|
"type": "cppvsdbg",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceFolder}/zig-cache/bin/day14.exe",
|
"program": "${workspaceFolder}/zig-out/bin/day14.exe",
|
||||||
"args": [],
|
"args": [],
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
|
@ -176,7 +176,7 @@
|
||||||
"name": "day 15",
|
"name": "day 15",
|
||||||
"type": "cppvsdbg",
|
"type": "cppvsdbg",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceFolder}/zig-cache/bin/day15.exe",
|
"program": "${workspaceFolder}/zig-out/bin/day15.exe",
|
||||||
"args": [],
|
"args": [],
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
|
@ -188,7 +188,7 @@
|
||||||
"name": "day 16",
|
"name": "day 16",
|
||||||
"type": "cppvsdbg",
|
"type": "cppvsdbg",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceFolder}/zig-cache/bin/day16.exe",
|
"program": "${workspaceFolder}/zig-out/bin/day16.exe",
|
||||||
"args": [],
|
"args": [],
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
|
@ -200,7 +200,7 @@
|
||||||
"name": "day 17",
|
"name": "day 17",
|
||||||
"type": "cppvsdbg",
|
"type": "cppvsdbg",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceFolder}/zig-cache/bin/day17.exe",
|
"program": "${workspaceFolder}/zig-out/bin/day17.exe",
|
||||||
"args": [],
|
"args": [],
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
|
@ -212,7 +212,7 @@
|
||||||
"name": "day 18",
|
"name": "day 18",
|
||||||
"type": "cppvsdbg",
|
"type": "cppvsdbg",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceFolder}/zig-cache/bin/day18.exe",
|
"program": "${workspaceFolder}/zig-out/bin/day18.exe",
|
||||||
"args": [],
|
"args": [],
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
|
@ -224,7 +224,7 @@
|
||||||
"name": "day 19",
|
"name": "day 19",
|
||||||
"type": "cppvsdbg",
|
"type": "cppvsdbg",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceFolder}/zig-cache/bin/day19.exe",
|
"program": "${workspaceFolder}/zig-out/bin/day19.exe",
|
||||||
"args": [],
|
"args": [],
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
|
@ -236,7 +236,7 @@
|
||||||
"name": "day 20",
|
"name": "day 20",
|
||||||
"type": "cppvsdbg",
|
"type": "cppvsdbg",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceFolder}/zig-cache/bin/day20.exe",
|
"program": "${workspaceFolder}/zig-out/bin/day20.exe",
|
||||||
"args": [],
|
"args": [],
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
|
@ -248,7 +248,7 @@
|
||||||
"name": "day 21",
|
"name": "day 21",
|
||||||
"type": "cppvsdbg",
|
"type": "cppvsdbg",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceFolder}/zig-cache/bin/day21.exe",
|
"program": "${workspaceFolder}/zig-out/bin/day21.exe",
|
||||||
"args": [],
|
"args": [],
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
|
@ -260,7 +260,7 @@
|
||||||
"name": "day 22",
|
"name": "day 22",
|
||||||
"type": "cppvsdbg",
|
"type": "cppvsdbg",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceFolder}/zig-cache/bin/day22.exe",
|
"program": "${workspaceFolder}/zig-out/bin/day22.exe",
|
||||||
"args": [],
|
"args": [],
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
|
@ -272,7 +272,7 @@
|
||||||
"name": "day 23",
|
"name": "day 23",
|
||||||
"type": "cppvsdbg",
|
"type": "cppvsdbg",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceFolder}/zig-cache/bin/day23.exe",
|
"program": "${workspaceFolder}/zig-out/bin/day23.exe",
|
||||||
"args": [],
|
"args": [],
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
|
@ -284,7 +284,7 @@
|
||||||
"name": "day 24",
|
"name": "day 24",
|
||||||
"type": "cppvsdbg",
|
"type": "cppvsdbg",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceFolder}/zig-cache/bin/day24.exe",
|
"program": "${workspaceFolder}/zig-out/bin/day24.exe",
|
||||||
"args": [],
|
"args": [],
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
|
@ -296,7 +296,7 @@
|
||||||
"name": "day 25",
|
"name": "day 25",
|
||||||
"type": "cppvsdbg",
|
"type": "cppvsdbg",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceFolder}/zig-cache/bin/day25.exe",
|
"program": "${workspaceFolder}/zig-out/bin/day25.exe",
|
||||||
"args": [],
|
"args": [],
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
|
|
23
build.zig
23
build.zig
|
@ -11,6 +11,7 @@ const test_files = [_][]const u8 {
|
||||||
|
|
||||||
fn linkObject(b: *Builder, obj: *LibExeObjStep) void {
|
fn linkObject(b: *Builder, obj: *LibExeObjStep) void {
|
||||||
if (should_link_libc) obj.linkLibC();
|
if (should_link_libc) obj.linkLibC();
|
||||||
|
_ = b;
|
||||||
|
|
||||||
// Add linking for packages or third party libraries here
|
// Add linking for packages or third party libraries here
|
||||||
}
|
}
|
||||||
|
@ -26,13 +27,14 @@ pub fn build(b: *Builder) void {
|
||||||
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall.
|
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall.
|
||||||
const mode = b.standardReleaseOptions();
|
const mode = b.standardReleaseOptions();
|
||||||
|
|
||||||
// Set up an exe for each day
|
const install_all = b.step("install_all", "Install all days");
|
||||||
comptime var day = 1;
|
const run_all = b.step("run_all", "Run all days");
|
||||||
inline while (day <= 25) : (day += 1) {
|
|
||||||
@setEvalBranchQuota(100000); // this comptimePrint is pretty expensive
|
|
||||||
const dayString = comptime std.fmt.comptimePrint("day{:0>2}", .{ day });
|
|
||||||
const zigFile = "src/" ++ dayString ++ ".zig";
|
|
||||||
|
|
||||||
|
// 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);
|
const exe = b.addExecutable(dayString, zigFile);
|
||||||
exe.setTarget(target);
|
exe.setTarget(target);
|
||||||
|
@ -43,8 +45,11 @@ pub fn build(b: *Builder) void {
|
||||||
|
|
||||||
const install_cmd = b.addInstallArtifact(exe);
|
const install_cmd = b.addInstallArtifact(exe);
|
||||||
|
|
||||||
const install_step = b.step("install_" ++ dayString, "Install " ++ dayString ++ ".exe");
|
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_step.dependOn(&install_cmd.step);
|
||||||
|
install_all.dependOn(&install_cmd.step);
|
||||||
|
|
||||||
const run_cmd = exe.run();
|
const run_cmd = exe.run();
|
||||||
run_cmd.step.dependOn(&install_cmd.step);
|
run_cmd.step.dependOn(&install_cmd.step);
|
||||||
|
@ -52,8 +57,10 @@ pub fn build(b: *Builder) void {
|
||||||
run_cmd.addArgs(args);
|
run_cmd.addArgs(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
const run_step = b.step(dayString, "Run " ++ dayString);
|
const run_desc = b.fmt("Run {s}", .{dayString});
|
||||||
|
const run_step = b.step(dayString, run_desc);
|
||||||
run_step.dependOn(&run_cmd.step);
|
run_step.dependOn(&run_cmd.step);
|
||||||
|
run_all.dependOn(&run_cmd.step);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set up a step to run all tests
|
// Set up a step to run all tests
|
||||||
|
|
|
@ -2,6 +2,15 @@ const std = @import("std");
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const print = std.debug.print;
|
const print = std.debug.print;
|
||||||
|
const ArrayList = std.ArrayList;
|
||||||
|
const HashMap = std.AutoHashMap;
|
||||||
|
const StringHashMap = std.StringHashMap;
|
||||||
|
const BitSet = std.DynamicBitSet;
|
||||||
|
|
||||||
|
var gpa_impl = std.heap.GeneralPurposeAllocator(.{}){};
|
||||||
|
const gpa = &gpa_impl.allocator;
|
||||||
|
|
||||||
|
const data = @embedFile("../data/day01.txt");
|
||||||
|
|
||||||
pub fn main() !void {
|
pub fn main() !void {
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,15 @@ const std = @import("std");
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const print = std.debug.print;
|
const print = std.debug.print;
|
||||||
|
const ArrayList = std.ArrayList;
|
||||||
|
const HashMap = std.AutoHashMap;
|
||||||
|
const StringHashMap = std.StringHashMap;
|
||||||
|
const BitSet = std.DynamicBitSet;
|
||||||
|
|
||||||
|
var gpa_impl = std.heap.GeneralPurposeAllocator(.{}){};
|
||||||
|
const gpa = &gpa_impl.allocator;
|
||||||
|
|
||||||
|
const data = @embedFile("../data/day02.txt");
|
||||||
|
|
||||||
pub fn main() !void {
|
pub fn main() !void {
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,15 @@ const std = @import("std");
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const print = std.debug.print;
|
const print = std.debug.print;
|
||||||
|
const ArrayList = std.ArrayList;
|
||||||
|
const HashMap = std.AutoHashMap;
|
||||||
|
const StringHashMap = std.StringHashMap;
|
||||||
|
const BitSet = std.DynamicBitSet;
|
||||||
|
|
||||||
|
var gpa_impl = std.heap.GeneralPurposeAllocator(.{}){};
|
||||||
|
const gpa = &gpa_impl.allocator;
|
||||||
|
|
||||||
|
const data = @embedFile("../data/day03.txt");
|
||||||
|
|
||||||
pub fn main() !void {
|
pub fn main() !void {
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,15 @@ const std = @import("std");
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const print = std.debug.print;
|
const print = std.debug.print;
|
||||||
|
const ArrayList = std.ArrayList;
|
||||||
|
const HashMap = std.AutoHashMap;
|
||||||
|
const StringHashMap = std.StringHashMap;
|
||||||
|
const BitSet = std.DynamicBitSet;
|
||||||
|
|
||||||
|
var gpa_impl = std.heap.GeneralPurposeAllocator(.{}){};
|
||||||
|
const gpa = &gpa_impl.allocator;
|
||||||
|
|
||||||
|
const data = @embedFile("../data/day04.txt");
|
||||||
|
|
||||||
pub fn main() !void {
|
pub fn main() !void {
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,15 @@ const std = @import("std");
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const print = std.debug.print;
|
const print = std.debug.print;
|
||||||
|
const ArrayList = std.ArrayList;
|
||||||
|
const HashMap = std.AutoHashMap;
|
||||||
|
const StringHashMap = std.StringHashMap;
|
||||||
|
const BitSet = std.DynamicBitSet;
|
||||||
|
|
||||||
|
var gpa_impl = std.heap.GeneralPurposeAllocator(.{}){};
|
||||||
|
const gpa = &gpa_impl.allocator;
|
||||||
|
|
||||||
|
const data = @embedFile("../data/day05.txt");
|
||||||
|
|
||||||
pub fn main() !void {
|
pub fn main() !void {
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,15 @@ const std = @import("std");
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const print = std.debug.print;
|
const print = std.debug.print;
|
||||||
|
const ArrayList = std.ArrayList;
|
||||||
|
const HashMap = std.AutoHashMap;
|
||||||
|
const StringHashMap = std.StringHashMap;
|
||||||
|
const BitSet = std.DynamicBitSet;
|
||||||
|
|
||||||
|
var gpa_impl = std.heap.GeneralPurposeAllocator(.{}){};
|
||||||
|
const gpa = &gpa_impl.allocator;
|
||||||
|
|
||||||
|
const data = @embedFile("../data/day06.txt");
|
||||||
|
|
||||||
pub fn main() !void {
|
pub fn main() !void {
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,15 @@ const std = @import("std");
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const print = std.debug.print;
|
const print = std.debug.print;
|
||||||
|
const ArrayList = std.ArrayList;
|
||||||
|
const HashMap = std.AutoHashMap;
|
||||||
|
const StringHashMap = std.StringHashMap;
|
||||||
|
const BitSet = std.DynamicBitSet;
|
||||||
|
|
||||||
|
var gpa_impl = std.heap.GeneralPurposeAllocator(.{}){};
|
||||||
|
const gpa = &gpa_impl.allocator;
|
||||||
|
|
||||||
|
const data = @embedFile("../data/day07.txt");
|
||||||
|
|
||||||
pub fn main() !void {
|
pub fn main() !void {
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,15 @@ const std = @import("std");
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const print = std.debug.print;
|
const print = std.debug.print;
|
||||||
|
const ArrayList = std.ArrayList;
|
||||||
|
const HashMap = std.AutoHashMap;
|
||||||
|
const StringHashMap = std.StringHashMap;
|
||||||
|
const BitSet = std.DynamicBitSet;
|
||||||
|
|
||||||
|
var gpa_impl = std.heap.GeneralPurposeAllocator(.{}){};
|
||||||
|
const gpa = &gpa_impl.allocator;
|
||||||
|
|
||||||
|
const data = @embedFile("../data/day08.txt");
|
||||||
|
|
||||||
pub fn main() !void {
|
pub fn main() !void {
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,15 @@ const std = @import("std");
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const print = std.debug.print;
|
const print = std.debug.print;
|
||||||
|
const ArrayList = std.ArrayList;
|
||||||
|
const HashMap = std.AutoHashMap;
|
||||||
|
const StringHashMap = std.StringHashMap;
|
||||||
|
const BitSet = std.DynamicBitSet;
|
||||||
|
|
||||||
|
var gpa_impl = std.heap.GeneralPurposeAllocator(.{}){};
|
||||||
|
const gpa = &gpa_impl.allocator;
|
||||||
|
|
||||||
|
const data = @embedFile("../data/day09.txt");
|
||||||
|
|
||||||
pub fn main() !void {
|
pub fn main() !void {
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,15 @@ const std = @import("std");
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const print = std.debug.print;
|
const print = std.debug.print;
|
||||||
|
const ArrayList = std.ArrayList;
|
||||||
|
const HashMap = std.AutoHashMap;
|
||||||
|
const StringHashMap = std.StringHashMap;
|
||||||
|
const BitSet = std.DynamicBitSet;
|
||||||
|
|
||||||
|
var gpa_impl = std.heap.GeneralPurposeAllocator(.{}){};
|
||||||
|
const gpa = &gpa_impl.allocator;
|
||||||
|
|
||||||
|
const data = @embedFile("../data/day10.txt");
|
||||||
|
|
||||||
pub fn main() !void {
|
pub fn main() !void {
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,15 @@ const std = @import("std");
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const print = std.debug.print;
|
const print = std.debug.print;
|
||||||
|
const ArrayList = std.ArrayList;
|
||||||
|
const HashMap = std.AutoHashMap;
|
||||||
|
const StringHashMap = std.StringHashMap;
|
||||||
|
const BitSet = std.DynamicBitSet;
|
||||||
|
|
||||||
|
var gpa_impl = std.heap.GeneralPurposeAllocator(.{}){};
|
||||||
|
const gpa = &gpa_impl.allocator;
|
||||||
|
|
||||||
|
const data = @embedFile("../data/day11.txt");
|
||||||
|
|
||||||
pub fn main() !void {
|
pub fn main() !void {
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,15 @@ const std = @import("std");
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const print = std.debug.print;
|
const print = std.debug.print;
|
||||||
|
const ArrayList = std.ArrayList;
|
||||||
|
const HashMap = std.AutoHashMap;
|
||||||
|
const StringHashMap = std.StringHashMap;
|
||||||
|
const BitSet = std.DynamicBitSet;
|
||||||
|
|
||||||
|
var gpa_impl = std.heap.GeneralPurposeAllocator(.{}){};
|
||||||
|
const gpa = &gpa_impl.allocator;
|
||||||
|
|
||||||
|
const data = @embedFile("../data/day12.txt");
|
||||||
|
|
||||||
pub fn main() !void {
|
pub fn main() !void {
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,15 @@ const std = @import("std");
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const print = std.debug.print;
|
const print = std.debug.print;
|
||||||
|
const ArrayList = std.ArrayList;
|
||||||
|
const HashMap = std.AutoHashMap;
|
||||||
|
const StringHashMap = std.StringHashMap;
|
||||||
|
const BitSet = std.DynamicBitSet;
|
||||||
|
|
||||||
|
var gpa_impl = std.heap.GeneralPurposeAllocator(.{}){};
|
||||||
|
const gpa = &gpa_impl.allocator;
|
||||||
|
|
||||||
|
const data = @embedFile("../data/day13.txt");
|
||||||
|
|
||||||
pub fn main() !void {
|
pub fn main() !void {
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,15 @@ const std = @import("std");
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const print = std.debug.print;
|
const print = std.debug.print;
|
||||||
|
const ArrayList = std.ArrayList;
|
||||||
|
const HashMap = std.AutoHashMap;
|
||||||
|
const StringHashMap = std.StringHashMap;
|
||||||
|
const BitSet = std.DynamicBitSet;
|
||||||
|
|
||||||
|
var gpa_impl = std.heap.GeneralPurposeAllocator(.{}){};
|
||||||
|
const gpa = &gpa_impl.allocator;
|
||||||
|
|
||||||
|
const data = @embedFile("../data/day14.txt");
|
||||||
|
|
||||||
pub fn main() !void {
|
pub fn main() !void {
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,15 @@ const std = @import("std");
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const print = std.debug.print;
|
const print = std.debug.print;
|
||||||
|
const ArrayList = std.ArrayList;
|
||||||
|
const HashMap = std.AutoHashMap;
|
||||||
|
const StringHashMap = std.StringHashMap;
|
||||||
|
const BitSet = std.DynamicBitSet;
|
||||||
|
|
||||||
|
var gpa_impl = std.heap.GeneralPurposeAllocator(.{}){};
|
||||||
|
const gpa = &gpa_impl.allocator;
|
||||||
|
|
||||||
|
const data = @embedFile("../data/day15.txt");
|
||||||
|
|
||||||
pub fn main() !void {
|
pub fn main() !void {
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,15 @@ const std = @import("std");
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const print = std.debug.print;
|
const print = std.debug.print;
|
||||||
|
const ArrayList = std.ArrayList;
|
||||||
|
const HashMap = std.AutoHashMap;
|
||||||
|
const StringHashMap = std.StringHashMap;
|
||||||
|
const BitSet = std.DynamicBitSet;
|
||||||
|
|
||||||
|
var gpa_impl = std.heap.GeneralPurposeAllocator(.{}){};
|
||||||
|
const gpa = &gpa_impl.allocator;
|
||||||
|
|
||||||
|
const data = @embedFile("../data/day16.txt");
|
||||||
|
|
||||||
pub fn main() !void {
|
pub fn main() !void {
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,15 @@ const std = @import("std");
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const print = std.debug.print;
|
const print = std.debug.print;
|
||||||
|
const ArrayList = std.ArrayList;
|
||||||
|
const HashMap = std.AutoHashMap;
|
||||||
|
const StringHashMap = std.StringHashMap;
|
||||||
|
const BitSet = std.DynamicBitSet;
|
||||||
|
|
||||||
|
var gpa_impl = std.heap.GeneralPurposeAllocator(.{}){};
|
||||||
|
const gpa = &gpa_impl.allocator;
|
||||||
|
|
||||||
|
const data = @embedFile("../data/day17.txt");
|
||||||
|
|
||||||
pub fn main() !void {
|
pub fn main() !void {
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,15 @@ const std = @import("std");
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const print = std.debug.print;
|
const print = std.debug.print;
|
||||||
|
const ArrayList = std.ArrayList;
|
||||||
|
const HashMap = std.AutoHashMap;
|
||||||
|
const StringHashMap = std.StringHashMap;
|
||||||
|
const BitSet = std.DynamicBitSet;
|
||||||
|
|
||||||
|
var gpa_impl = std.heap.GeneralPurposeAllocator(.{}){};
|
||||||
|
const gpa = &gpa_impl.allocator;
|
||||||
|
|
||||||
|
const data = @embedFile("../data/day18.txt");
|
||||||
|
|
||||||
pub fn main() !void {
|
pub fn main() !void {
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,15 @@ const std = @import("std");
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const print = std.debug.print;
|
const print = std.debug.print;
|
||||||
|
const ArrayList = std.ArrayList;
|
||||||
|
const HashMap = std.AutoHashMap;
|
||||||
|
const StringHashMap = std.StringHashMap;
|
||||||
|
const BitSet = std.DynamicBitSet;
|
||||||
|
|
||||||
|
var gpa_impl = std.heap.GeneralPurposeAllocator(.{}){};
|
||||||
|
const gpa = &gpa_impl.allocator;
|
||||||
|
|
||||||
|
const data = @embedFile("../data/day19.txt");
|
||||||
|
|
||||||
pub fn main() !void {
|
pub fn main() !void {
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,15 @@ const std = @import("std");
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const print = std.debug.print;
|
const print = std.debug.print;
|
||||||
|
const ArrayList = std.ArrayList;
|
||||||
|
const HashMap = std.AutoHashMap;
|
||||||
|
const StringHashMap = std.StringHashMap;
|
||||||
|
const BitSet = std.DynamicBitSet;
|
||||||
|
|
||||||
|
var gpa_impl = std.heap.GeneralPurposeAllocator(.{}){};
|
||||||
|
const gpa = &gpa_impl.allocator;
|
||||||
|
|
||||||
|
const data = @embedFile("../data/day20.txt");
|
||||||
|
|
||||||
pub fn main() !void {
|
pub fn main() !void {
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,15 @@ const std = @import("std");
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const print = std.debug.print;
|
const print = std.debug.print;
|
||||||
|
const ArrayList = std.ArrayList;
|
||||||
|
const HashMap = std.AutoHashMap;
|
||||||
|
const StringHashMap = std.StringHashMap;
|
||||||
|
const BitSet = std.DynamicBitSet;
|
||||||
|
|
||||||
|
var gpa_impl = std.heap.GeneralPurposeAllocator(.{}){};
|
||||||
|
const gpa = &gpa_impl.allocator;
|
||||||
|
|
||||||
|
const data = @embedFile("../data/day21.txt");
|
||||||
|
|
||||||
pub fn main() !void {
|
pub fn main() !void {
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,15 @@ const std = @import("std");
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const print = std.debug.print;
|
const print = std.debug.print;
|
||||||
|
const ArrayList = std.ArrayList;
|
||||||
|
const HashMap = std.AutoHashMap;
|
||||||
|
const StringHashMap = std.StringHashMap;
|
||||||
|
const BitSet = std.DynamicBitSet;
|
||||||
|
|
||||||
|
var gpa_impl = std.heap.GeneralPurposeAllocator(.{}){};
|
||||||
|
const gpa = &gpa_impl.allocator;
|
||||||
|
|
||||||
|
const data = @embedFile("../data/day22.txt");
|
||||||
|
|
||||||
pub fn main() !void {
|
pub fn main() !void {
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,15 @@ const std = @import("std");
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const print = std.debug.print;
|
const print = std.debug.print;
|
||||||
|
const ArrayList = std.ArrayList;
|
||||||
|
const HashMap = std.AutoHashMap;
|
||||||
|
const StringHashMap = std.StringHashMap;
|
||||||
|
const BitSet = std.DynamicBitSet;
|
||||||
|
|
||||||
|
var gpa_impl = std.heap.GeneralPurposeAllocator(.{}){};
|
||||||
|
const gpa = &gpa_impl.allocator;
|
||||||
|
|
||||||
|
const data = @embedFile("../data/day23.txt");
|
||||||
|
|
||||||
pub fn main() !void {
|
pub fn main() !void {
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,15 @@ const std = @import("std");
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const print = std.debug.print;
|
const print = std.debug.print;
|
||||||
|
const ArrayList = std.ArrayList;
|
||||||
|
const HashMap = std.AutoHashMap;
|
||||||
|
const StringHashMap = std.StringHashMap;
|
||||||
|
const BitSet = std.DynamicBitSet;
|
||||||
|
|
||||||
|
var gpa_impl = std.heap.GeneralPurposeAllocator(.{}){};
|
||||||
|
const gpa = &gpa_impl.allocator;
|
||||||
|
|
||||||
|
const data = @embedFile("../data/day24.txt");
|
||||||
|
|
||||||
pub fn main() !void {
|
pub fn main() !void {
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,15 @@ const std = @import("std");
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const print = std.debug.print;
|
const print = std.debug.print;
|
||||||
|
const ArrayList = std.ArrayList;
|
||||||
|
const HashMap = std.AutoHashMap;
|
||||||
|
const StringHashMap = std.StringHashMap;
|
||||||
|
const BitSet = std.DynamicBitSet;
|
||||||
|
|
||||||
|
var gpa_impl = std.heap.GeneralPurposeAllocator(.{}){};
|
||||||
|
const gpa = &gpa_impl.allocator;
|
||||||
|
|
||||||
|
const data = @embedFile("../data/day25.txt");
|
||||||
|
|
||||||
pub fn main() !void {
|
pub fn main() !void {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue