Data update

This commit is contained in:
Ingy döt Net 2023-07-01 19:04:33 -04:00
parent 8f05c7136f
commit 0bf4da02c3
82 changed files with 2194 additions and 118 deletions

View file

@ -1,14 +1,14 @@
pub fn main() !void {
const stdout = std.io.getStdOut().writer();
_ = try stdout.writeAll("Police Sanitation Fire\n");
_ = try stdout.writeAll("------ ---------- ----\n");
try stdout.writeAll("Police Sanitation Fire\n");
try stdout.writeAll("------ ---------- ----\n");
var p: usize = 2;
while (p <= 7) : (p += 2)
for (1..7 + 1) |s|
for (1..7 + 1) |f|
if (p != s and s != f and f != p and p + f + s == 12) {
_ = try stdout.print(" {d} {d} {d}\n", .{ p, s, f });
try stdout.print(" {d} {d} {d}\n", .{ p, s, f });
};
}

View file

@ -1,12 +1,12 @@
pub fn main() !void {
const stdout = std.io.getStdOut().writer();
_ = try stdout.writeAll("Police Sanitation Fire\n");
_ = try stdout.writeAll("------ ---------- ----\n");
try stdout.writeAll("Police Sanitation Fire\n");
try stdout.writeAll("------ ---------- ----\n");
var it = SolutionIterator{};
while (it.next()) |solution| {
_ = try stdout.print(
try stdout.print(
" {d} {d} {d}\n",
.{ solution.police, solution.sanitation, solution.fire },
);