diff --git a/IDEAS.md b/IDEAS.md new file mode 100644 index 0000000..2a9197b --- /dev/null +++ b/IDEAS.md @@ -0,0 +1,35 @@ +### 2015/06: + +There are very raw implementation with too much iterations. But what if we +can build search tree for rectangles, and just go through the whole grid the +only once, and then apply changes per point from all rectanges at once? +Would it be faster? Or building the search tree will be much complicated than +performance gains here? + +```zig + fn part_one() u32 { + var count: u32 = 0; + + for (0..grid_size) |x| { + for (0..grid_size) |y| { + const it = findRectsAt(x, y); + + var state = false; + + while (it.next()) |action| { + switch (action) { + .on => state = true, + .off => state = false, + .toggle => state = !state; + } + } + + if (state) { + count += 1 + } + } + } + + return count; + } +``` diff --git a/Makefile b/Makefile index b38ea8d..3da8832 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ YEAR=2015 DAY=6 -PART=1 +PART=2 .PHONY: build-native build-web build dev-native dev-web diff --git a/native/solutions/2015/05/part_2.zig b/native/solutions/2015/05/part_2.zig index 0ae2b83..bf41c89 100644 --- a/native/solutions/2015/05/part_2.zig +++ b/native/solutions/2015/05/part_2.zig @@ -6,6 +6,7 @@ const AnyReader = std.io.AnyReader; const LineParser = tools.LineParser; const Pairs = std.hash_map.AutoHashMap([2]u8, usize); + const Overlap = struct { byte: u8, index: usize, diff --git a/native/solutions/2015/06/common.zig b/native/solutions/2015/06/common.zig new file mode 100644 index 0000000..9a8316e --- /dev/null +++ b/native/solutions/2015/06/common.zig @@ -0,0 +1,90 @@ +const std = @import("std"); +const tools = @import("tools"); + +const Allocator = std.mem.Allocator; +const AnyReader = std.io.AnyReader; +const LineParser = tools.LineParser; + +pub const Action = enum { on, off, toggle }; + +pub const Command = struct { + action: Action, + + from_x: usize, + from_y: usize, + + to_x: usize, + to_y: usize, +}; + +const Iterator = std.mem.SplitIterator(u8, .any); + +fn parseAction(it: *Iterator) !Action { + const prelude = it.first(); + + if (std.mem.eql(u8, prelude, "toggle")) { + return .toggle; + } + + if (!std.mem.eql(u8, prelude, "turn")) { + return error.InvalidInput; + } + + const token = it.next() orelse ""; + + if (std.mem.eql(u8, token, "on")) { + return .on; + } + + if (std.mem.eql(u8, token, "off")) { + return .off; + } + + return error.InvalidInput; +} + +fn checkThrough(it: *Iterator) !void { + const token = it.next() orelse ""; + + if (!std.mem.eql(u8, token, "through")) { + return error.InvalidInput; + } +} + +fn parseValue(it: *Iterator) !usize { + const token = it.next() orelse ""; + + if (token.len > 3) { + return error.InvalidInput; + } + + return std.fmt.parseInt(usize, token, 10) catch { + return error.InvalidInput; + }; +} + +fn parse(line: []const u8, _: Allocator) !Command { + var it = std.mem.splitAny(u8, line, " ,"); + + const action = try parseAction(&it); + + const from_x = try parseValue(&it); + const from_y = try parseValue(&it); + + try checkThrough(&it); + + const to_x = try parseValue(&it); + const to_y = try parseValue(&it); + + return .{ + .action = action, + + .from_x = from_x, + .from_y = from_y, + + .to_x = to_x, + .to_y = to_y, + }; +} + +pub const Parser = LineParser(Command, parse); diff --git a/native/solutions/2015/06/input.fixture b/native/solutions/2015/06/input.fixture new file mode 100644 index 0000000..d6cfb3a --- /dev/null +++ b/native/solutions/2015/06/input.fixture @@ -0,0 +1,300 @@ +toggle 461,550 through 564,900 +turn off 370,39 through 425,839 +turn off 464,858 through 833,915 +turn off 812,389 through 865,874 +turn on 599,989 through 806,993 +turn on 376,415 through 768,548 +turn on 606,361 through 892,600 +turn off 448,208 through 645,684 +toggle 50,472 through 452,788 +toggle 205,417 through 703,826 +toggle 533,331 through 906,873 +toggle 857,493 through 989,970 +turn off 631,950 through 894,975 +turn off 387,19 through 720,700 +turn off 511,843 through 581,945 +toggle 514,557 through 662,883 +turn off 269,809 through 876,847 +turn off 149,517 through 716,777 +turn off 994,939 through 998,988 +toggle 467,662 through 555,957 +turn on 952,417 through 954,845 +turn on 565,226 through 944,880 +turn on 214,319 through 805,722 +toggle 532,276 through 636,847 +toggle 619,80 through 689,507 +turn on 390,706 through 884,722 +toggle 17,634 through 537,766 +toggle 706,440 through 834,441 +toggle 318,207 through 499,530 +toggle 698,185 through 830,343 +toggle 566,679 through 744,716 +toggle 347,482 through 959,482 +toggle 39,799 through 981,872 +turn on 583,543 through 846,710 +turn off 367,664 through 595,872 +turn on 805,439 through 964,995 +toggle 209,584 through 513,802 +turn off 106,497 through 266,770 +turn on 975,2 through 984,623 +turn off 316,684 through 369,876 +turn off 30,309 through 259,554 +turn off 399,680 through 861,942 +toggle 227,740 through 850,829 +turn on 386,603 through 552,879 +turn off 703,795 through 791,963 +turn off 573,803 through 996,878 +turn off 993,939 through 997,951 +turn on 809,221 through 869,723 +turn off 38,720 through 682,751 +turn off 318,732 through 720,976 +toggle 88,459 through 392,654 +turn off 865,654 through 911,956 +toggle 264,284 through 857,956 +turn off 281,776 through 610,797 +toggle 492,660 through 647,910 +turn off 879,703 through 925,981 +turn off 772,414 through 974,518 +turn on 694,41 through 755,96 +turn on 452,406 through 885,881 +turn off 107,905 through 497,910 +turn off 647,222 through 910,532 +turn on 679,40 through 845,358 +turn off 144,205 through 556,362 +turn on 871,804 through 962,878 +turn on 545,676 through 545,929 +turn off 316,716 through 413,941 +toggle 488,826 through 755,971 +toggle 957,832 through 976,992 +toggle 857,770 through 905,964 +toggle 319,198 through 787,673 +turn on 832,813 through 863,844 +turn on 818,296 through 818,681 +turn on 71,699 through 91,960 +turn off 838,578 through 967,928 +toggle 440,856 through 507,942 +toggle 121,970 through 151,974 +toggle 391,192 through 659,751 +turn on 78,210 through 681,419 +turn on 324,591 through 593,939 +toggle 159,366 through 249,760 +turn off 617,167 through 954,601 +toggle 484,607 through 733,657 +turn on 587,96 through 888,819 +turn off 680,984 through 941,991 +turn on 800,512 through 968,691 +turn off 123,588 through 853,603 +turn on 1,862 through 507,912 +turn on 699,839 through 973,878 +turn off 848,89 through 887,893 +toggle 344,353 through 462,403 +turn on 780,731 through 841,760 +toggle 693,973 through 847,984 +toggle 989,936 through 996,958 +toggle 168,475 through 206,963 +turn on 742,683 through 769,845 +toggle 768,116 through 987,396 +turn on 190,364 through 617,526 +turn off 470,266 through 530,839 +toggle 122,497 through 969,645 +turn off 492,432 through 827,790 +turn on 505,636 through 957,820 +turn on 295,476 through 698,958 +toggle 63,298 through 202,396 +turn on 157,315 through 412,939 +turn off 69,789 through 134,837 +turn off 678,335 through 896,541 +toggle 140,516 through 842,668 +turn off 697,585 through 712,668 +toggle 507,832 through 578,949 +turn on 678,279 through 886,621 +toggle 449,744 through 826,910 +turn off 835,354 through 921,741 +toggle 924,878 through 985,952 +turn on 666,503 through 922,905 +turn on 947,453 through 961,587 +toggle 525,190 through 795,654 +turn off 62,320 through 896,362 +turn on 21,458 through 972,536 +turn on 446,429 through 821,970 +toggle 376,423 through 805,455 +toggle 494,896 through 715,937 +turn on 583,270 through 667,482 +turn off 183,468 through 280,548 +toggle 623,289 through 750,524 +turn on 836,706 through 967,768 +turn on 419,569 through 912,908 +turn on 428,260 through 660,433 +turn off 683,627 through 916,816 +turn on 447,973 through 866,980 +turn on 688,607 through 938,990 +turn on 245,187 through 597,405 +turn off 558,843 through 841,942 +turn off 325,666 through 713,834 +toggle 672,606 through 814,935 +turn off 161,812 through 490,954 +turn on 950,362 through 985,898 +turn on 143,22 through 205,821 +turn on 89,762 through 607,790 +toggle 234,245 through 827,303 +turn on 65,599 through 764,997 +turn on 232,466 through 965,695 +turn on 739,122 through 975,590 +turn off 206,112 through 940,558 +toggle 690,365 through 988,552 +turn on 907,438 through 977,691 +turn off 838,809 through 944,869 +turn on 222,12 through 541,832 +toggle 337,66 through 669,812 +turn on 732,821 through 897,912 +toggle 182,862 through 638,996 +turn on 955,808 through 983,847 +toggle 346,227 through 841,696 +turn on 983,270 through 989,756 +turn off 874,849 through 876,905 +turn off 7,760 through 678,795 +toggle 973,977 through 995,983 +turn off 911,961 through 914,976 +turn on 913,557 through 952,722 +turn off 607,933 through 939,999 +turn on 226,604 through 517,622 +turn off 3,564 through 344,842 +toggle 340,578 through 428,610 +turn on 248,916 through 687,925 +toggle 650,185 through 955,965 +toggle 831,359 through 933,536 +turn off 544,614 through 896,953 +toggle 648,939 through 975,997 +turn on 464,269 through 710,521 +turn off 643,149 through 791,320 +turn off 875,549 through 972,643 +turn off 953,969 through 971,972 +turn off 236,474 through 772,591 +toggle 313,212 through 489,723 +toggle 896,829 through 897,837 +toggle 544,449 through 995,905 +turn off 278,645 through 977,876 +turn off 887,947 through 946,977 +turn on 342,861 through 725,935 +turn on 636,316 through 692,513 +toggle 857,470 through 950,528 +turn off 736,196 through 826,889 +turn on 17,878 through 850,987 +turn on 142,968 through 169,987 +turn on 46,470 through 912,853 +turn on 182,252 through 279,941 +toggle 261,143 through 969,657 +turn off 69,600 through 518,710 +turn on 372,379 through 779,386 +toggle 867,391 through 911,601 +turn off 174,287 through 900,536 +toggle 951,842 through 993,963 +turn off 626,733 through 985,827 +toggle 622,70 through 666,291 +turn off 980,671 through 985,835 +turn off 477,63 through 910,72 +turn off 779,39 through 940,142 +turn on 986,570 through 997,638 +toggle 842,805 through 943,985 +turn off 890,886 through 976,927 +turn off 893,172 through 897,619 +turn off 198,780 through 835,826 +toggle 202,209 through 219,291 +turn off 193,52 through 833,283 +toggle 414,427 through 987,972 +turn on 375,231 through 668,236 +turn off 646,598 through 869,663 +toggle 271,462 through 414,650 +turn off 679,121 through 845,467 +toggle 76,847 through 504,904 +turn off 15,617 through 509,810 +toggle 248,105 through 312,451 +turn off 126,546 through 922,879 +turn on 531,831 through 903,872 +toggle 602,431 through 892,792 +turn off 795,223 through 892,623 +toggle 167,721 through 533,929 +toggle 813,251 through 998,484 +toggle 64,640 through 752,942 +turn on 155,955 through 892,985 +turn on 251,329 through 996,497 +turn off 341,716 through 462,994 +toggle 760,127 through 829,189 +turn on 86,413 through 408,518 +toggle 340,102 through 918,558 +turn off 441,642 through 751,889 +turn on 785,292 through 845,325 +turn off 123,389 through 725,828 +turn on 905,73 through 983,270 +turn off 807,86 through 879,276 +toggle 500,866 through 864,916 +turn on 809,366 through 828,534 +toggle 219,356 through 720,617 +turn off 320,964 through 769,990 +turn off 903,167 through 936,631 +toggle 300,137 through 333,693 +toggle 5,675 through 755,848 +turn off 852,235 through 946,783 +toggle 355,556 through 941,664 +turn on 810,830 through 867,891 +turn off 509,869 through 667,903 +toggle 769,400 through 873,892 +turn on 553,614 through 810,729 +turn on 179,873 through 589,962 +turn off 466,866 through 768,926 +toggle 143,943 through 465,984 +toggle 182,380 through 569,552 +turn off 735,808 through 917,910 +turn on 731,802 through 910,847 +turn off 522,74 through 731,485 +turn on 444,127 through 566,996 +turn off 232,962 through 893,979 +turn off 231,492 through 790,976 +turn on 874,567 through 943,684 +toggle 911,840 through 990,932 +toggle 547,895 through 667,935 +turn off 93,294 through 648,636 +turn off 190,902 through 532,970 +turn off 451,530 through 704,613 +toggle 936,774 through 937,775 +turn off 116,843 through 533,934 +turn on 950,906 through 986,993 +turn on 910,51 through 945,989 +turn on 986,498 through 994,945 +turn off 125,324 through 433,704 +turn off 60,313 through 75,728 +turn on 899,494 through 940,947 +toggle 832,316 through 971,817 +toggle 994,983 through 998,984 +toggle 23,353 through 917,845 +toggle 174,799 through 658,859 +turn off 490,878 through 534,887 +turn off 623,963 through 917,975 +toggle 721,333 through 816,975 +toggle 589,687 through 890,921 +turn on 936,388 through 948,560 +turn off 485,17 through 655,610 +turn on 435,158 through 689,495 +turn on 192,934 through 734,936 +turn off 299,723 through 622,847 +toggle 484,160 through 812,942 +turn off 245,754 through 818,851 +turn on 298,419 through 824,634 +toggle 868,687 through 969,760 +toggle 131,250 through 685,426 +turn off 201,954 through 997,983 +turn on 353,910 through 832,961 +turn off 518,781 through 645,875 +turn off 866,97 through 924,784 +toggle 836,599 through 857,767 +turn on 80,957 through 776,968 +toggle 277,130 through 513,244 +turn off 62,266 through 854,434 +turn on 792,764 through 872,842 +turn off 160,949 through 273,989 +turn off 664,203 through 694,754 +toggle 491,615 through 998,836 +turn off 210,146 through 221,482 +turn off 209,780 through 572,894 +turn on 766,112 through 792,868 +turn on 222,12 through 856,241 diff --git a/native/solutions/2015/06/part_1.zig b/native/solutions/2015/06/part_1.zig index 9eb7b4d..c028514 100644 --- a/native/solutions/2015/06/part_1.zig +++ b/native/solutions/2015/06/part_1.zig @@ -1,136 +1,118 @@ const std = @import("std"); -const tools = @import("tools"); +const common = @import("./common.zig"); + +const Action = common.Action; const Allocator = std.mem.Allocator; const AnyReader = std.io.AnyReader; -const LineParser = tools.LineParser; - -const Action = enum { on, off, toggle }; -const Command = struct { - action: Action, - - from_x: u16, - from_y: u16, - - to_x: u16, - to_y: u16, -}; +const Command = common.Command; +const Parser = common.Parser; -const State = enum { action, from_x, delimiter, from_y, through, to_x, to_y }; +const width = 1000; +const height = 1000; -const turn_on_pattern = "turn on "; -const turn_off_pattern = "turn off "; -const toggle_pattern = "toggle "; -const through_pattern = "through "; +fn allocLights(allocator: Allocator) ![]bool { + const lights = try allocator.alloc(bool, width * height); -// NOTE: Minimal length of line, which pattern is: -// -// turn off x,y through x,y -// -// where `x` and `y` is number in range 0..9. -const min_line_len = - turn_off_pattern.len + 3 + through_pattern.len + 3; - -fn isMatch(line: []const u8, comptime pattern: []const u8) bool { - if (line.len < pattern.len) { - return false; + for (lights) |*light| { + light.* = false; } - return std.mem.eql(u8, line[0..pattern.len], pattern); + return lights; } -fn matchAction(line: []const u8) ?Action { - if (isMatch(line, turn_on_pattern)) { - return .on; - } +inline fn turnOn(lights: []bool, from_x: usize, from_y: usize, to_x: usize, to_y: usize) void { + for (from_x..to_x + 1) |x| { + const from = x * 999 + from_y; + const to = from + (to_y - from_y) + 1; - if (isMatch(line, turn_off_pattern)) { - return .off; + for (from..to) |idx| { + lights[idx] = true; + } } - - if (isMatch(line, toggle_pattern)) { - return .toggle; - } - - return null; } -fn parse(line: []const u8, allocator: Allocator) !Command { - if (line.len < min_line_len) { - return error.InvalidInput; - } +inline fn turnOff(lights: []bool, from_x: usize, from_y: usize, to_x: usize, to_y: usize) void { + for (from_x..to_x + 1) |x| { + const from = x * 999 + from_y; + const to = from + (to_y - from_y) + 1; - const action = matchAction(line) orelse return error.InvalidInput; - - var stream = std.io.fixedBufferStream(line); - const reader = stream.reader(); - - switch (action) { - .on => { - try reader.skipBytes(turn_on_pattern.len, .{}); - }, - .off => { - try reader.skipBytes(turn_off_pattern.len, .{}); - }, - .toggle => { - try reader.skipBytes(toggle_pattern.len, .{}); - }, + for (from..to) |idx| { + lights[idx] = false; + } } +} - const from_x_buffer = try reader.readUntilDelimiterAlloc(allocator, ',', 4); - defer allocator.free(from_x_buffer); - - const from_x = try std.fmt.parseInt(u16, from_x_buffer, 10); - - const from_y_buffer = try reader.readUntilDelimiterAlloc(allocator, ' ', 4); - defer allocator.free(from_y_buffer); - - const from_y = try std.fmt.parseInt(u16, from_y_buffer, 10); - - const through_buffer = try allocator.alloc(u8, through_pattern.len); - defer allocator.free(through_buffer); - - _ = try reader.read(through_buffer); +inline fn toggle(lights: []bool, from_x: usize, from_y: usize, to_x: usize, to_y: usize) void { + for (from_x..to_x + 1) |x| { + const from = x * 999 + from_y; + const to = from + (to_y - from_y) + 1; - if (!isMatch(through_buffer, through_pattern)) { - return error.InvalidInput; + for (from..to) |idx| { + lights[idx] = !lights[idx]; + } } +} - const to_x_buffer = try reader.readUntilDelimiterAlloc(allocator, ',', 4); - defer allocator.free(to_x_buffer); - - const to_x = try std.fmt.parseInt(u16, to_x_buffer, 10); - - const to_y_buffer = try reader.readAllAlloc(allocator, 3); - defer allocator.free(to_y_buffer); - - const to_y = try std.fmt.parseInt(u16, to_y_buffer, 10); +pub fn solve(allocator: Allocator, reader: AnyReader) ![]const u8 { + var parser = Parser.init(allocator, reader); + + const lights = try allocLights(allocator); + defer allocator.free(lights); + + while (parser.read()) |command| { + switch (command.action) { + .on => { + turnOn( + lights, + command.from_x, + command.from_y, + command.to_x, + command.to_y, + ); + }, + .off => { + turnOff( + lights, + command.from_x, + command.from_y, + command.to_x, + command.to_y, + ); + }, + .toggle => { + toggle( + lights, + command.from_x, + command.from_y, + command.to_x, + command.to_y, + ); + }, + } + } else |err| { + if (err != error.EndOfStream) { + return err; + } + } - return .{ - .action = action, + var count: usize = 0; - .from_x = from_x, - .from_y = from_y, + for (lights) |light| { + if (light) { + count += 1; + } + } - .to_x = to_x, - .to_y = to_y, - }; + return try std.fmt.allocPrint(allocator, "{d}", .{count}); } -pub fn solve(allocator: Allocator, _: AnyReader) ![]const u8 { - const action = try parse("turn on 599,989 through 806,993", allocator); +test "solution 2015/06/01" { + const input_file = @embedFile("./input.fixture"); + var input = std.io.fixedBufferStream(input_file); - std.log.info("{}", .{action}); + const answer = try solve(std.testing.allocator, input.reader().any()); + defer std.testing.allocator.free(answer); - return try std.fmt.allocPrint(allocator, "{d}", .{1}); + try std.testing.expectEqualStrings(answer, "543903"); } - -// test "solution 2015/05/01" { -// const input_file = @embedFile("./input.fixture"); -// var input = std.io.fixedBufferStream(input_file); - -// const answer = try solve(std.testing.allocator, input.reader().any()); -// defer std.testing.allocator.free(answer); - -// try std.testing.expectEqualStrings(answer, "238"); -// } diff --git a/native/solutions/2015/06/part_2.zig b/native/solutions/2015/06/part_2.zig new file mode 100644 index 0000000..7021fd3 --- /dev/null +++ b/native/solutions/2015/06/part_2.zig @@ -0,0 +1,118 @@ +const std = @import("std"); + +const common = @import("./common.zig"); + +const Action = common.Action; +const Allocator = std.mem.Allocator; +const AnyReader = std.io.AnyReader; +const Command = common.Command; +const Parser = common.Parser; + +const width = 1000; +const height = 1000; + +fn allocLights(allocator: Allocator) ![]u16 { + const lights = try allocator.alloc(u16, width * height); + + for (lights) |*light| { + light.* = 0; + } + + return lights; +} + +inline fn turnOn(lights: []u16, from_x: usize, from_y: usize, to_x: usize, to_y: usize) void { + for (from_x..to_x + 1) |x| { + const from = x * 999 + from_y; + const to = from + (to_y - from_y) + 1; + + for (from..to) |idx| { + lights[idx] += 1; + } + } +} + +inline fn turnOff(lights: []u16, from_x: usize, from_y: usize, to_x: usize, to_y: usize) void { + for (from_x..to_x + 1) |x| { + const from = x * 999 + from_y; + const to = from + (to_y - from_y) + 1; + + for (from..to) |idx| { + if (lights[idx] > 0) { + lights[idx] -= 1; + } + } + } +} + +inline fn toggle(lights: []u16, from_x: usize, from_y: usize, to_x: usize, to_y: usize) void { + for (from_x..to_x + 1) |x| { + const from = x * 999 + from_y; + const to = from + (to_y - from_y) + 1; + + for (from..to) |idx| { + lights[idx] += 2; + } + } +} + +pub fn solve(allocator: Allocator, reader: AnyReader) ![]const u8 { + var parser = Parser.init(allocator, reader); + + const lights = try allocLights(allocator); + defer allocator.free(lights); + + while (parser.read()) |command| { + switch (command.action) { + .on => { + turnOn( + lights, + command.from_x, + command.from_y, + command.to_x, + command.to_y, + ); + }, + .off => { + turnOff( + lights, + command.from_x, + command.from_y, + command.to_x, + command.to_y, + ); + }, + .toggle => { + toggle( + lights, + command.from_x, + command.from_y, + command.to_x, + command.to_y, + ); + }, + } + } else |err| { + if (err != error.EndOfStream) { + return err; + } + } + + var count: u32 = 0; + + for (lights) |light| { + count += light; + } + + return try std.fmt.allocPrint(allocator, "{d}", .{count}); +} + +test "solution 2015/06/02" { + const input_file = @embedFile("./input.fixture"); + var input = std.io.fixedBufferStream(input_file); + + const answer = try solve(std.testing.allocator, input.reader().any()); + defer std.testing.allocator.free(answer); + + try std.testing.expectEqualStrings(answer, "543903"); +} diff --git a/native/solutions/registry.zig b/native/solutions/registry.zig index e2c6d40..b046e27 100644 --- a/native/solutions/registry.zig +++ b/native/solutions/registry.zig @@ -81,6 +81,7 @@ pub const items = [_]Entry{ entry(.year_2015, .day_05, .part_one, index.solver_2015_05_01), entry(.year_2015, .day_05, .part_two, index.solver_2015_05_02), entry(.year_2015, .day_06, .part_one, index.solver_2015_06_01), + entry(.year_2015, .day_06, .part_two, index.solver_2015_06_02), }; pub fn lookup(year: Year, day: Day, part: Part) ?Solver { diff --git a/native/solutions/solutions.zig b/native/solutions/solutions.zig index edeeb88..f4ee43a 100644 --- a/native/solutions/solutions.zig +++ b/native/solutions/solutions.zig @@ -9,6 +9,7 @@ pub const solver_2015_04_02 = @import("./2015/04/part_2.zig").solve; pub const solver_2015_05_01 = @import("./2015/05/part_1.zig").solve; pub const solver_2015_05_02 = @import("./2015/05/part_2.zig").solve; pub const solver_2015_06_01 = @import("./2015/06/part_1.zig").solve; +pub const solver_2015_06_02 = @import("./2015/06/part_2.zig").solve; test { @import("std").testing.refAllDecls(@This());