From b67163521ede379f24dd5a036974431f81f8b594 Mon Sep 17 00:00:00 2001 From: Timo Schneider Date: Tue, 9 Dec 2025 20:40:35 +0100 Subject: [PATCH] added remaining days --- README.md | 24 +- puzzles/input07.txt | 142 ++++++ puzzles/input08.txt | 1000 ++++++++++++++++++++++++++++++++++++++++++ src/day07/mod.rs | 36 ++ src/day07/part07a.rs | 4 + src/day07/part07b.rs | 4 + src/day08/mod.rs | 40 ++ src/day08/part08a.rs | 4 + src/day08/part08b.rs | 4 + src/main.rs | 7 + 10 files changed, 1255 insertions(+), 10 deletions(-) create mode 100644 puzzles/input07.txt create mode 100644 puzzles/input08.txt create mode 100644 src/day07/mod.rs create mode 100644 src/day07/part07a.rs create mode 100644 src/day07/part07b.rs create mode 100644 src/day08/mod.rs create mode 100644 src/day08/part08a.rs create mode 100644 src/day08/part08b.rs diff --git a/README.md b/README.md index 7472c25..9ad2b5d 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,23 @@ # Advent of Code 2025 ```bash -day01:A => 1150 ( 50us) -day01:B => 1150 ( 48us) -day02:A => 31839939622 ( 9568us) -day02:B => 41662374059 ( 69966us) +day01:A => 1150 ( 52us) +day01:B => 1150 ( 50us) +day02:A => 31839939622 ( 9337us) +day02:B => 41662374059 ( 68756us) day03:A => 16812 ( 83us) -day03:B => 166345822896410 ( 287us) -day04:A => 1518 ( 192us) +day03:B => 166345822896410 ( 292us) +day04:A => 1518 ( 190us) day04:B => 0 ( 0us) day05:A => 0 ( 0us) day05:B => 0 ( 0us) -day06:A => 6503327062445 ( 203us) -day06:B => 9640641878593 ( 27us) -day09:A => 4725826296 ( 163us) +day06:A => 6503327062445 ( 201us) +day06:B => 9640641878593 ( 135us) +day07:A => 0 ( 0us) +day07:B => 0 ( 0us) +day08:A => 0 ( 0us) +day08:B => 0 ( 0us) +day09:A => 4725826296 ( 160us) day09:B => 0 ( 0us) ---------- - 82834us + 81842us ``` \ No newline at end of file diff --git a/puzzles/input07.txt b/puzzles/input07.txt new file mode 100644 index 0000000..e52ef52 --- /dev/null +++ b/puzzles/input07.txt @@ -0,0 +1,142 @@ +......................................................................S...................................................................... +............................................................................................................................................. +......................................................................^...................................................................... +............................................................................................................................................. +.....................................................................^.^..................................................................... +............................................................................................................................................. +....................................................................^.^.^.................................................................... +............................................................................................................................................. +...................................................................^.....^................................................................... +............................................................................................................................................. +..................................................................^.^.^.^.^.................................................................. +............................................................................................................................................. +.................................................................^.^.^.^.^.^................................................................. +............................................................................................................................................. +................................................................^.^.^...^.^.^................................................................ +............................................................................................................................................. +...............................................................^.....^.^...^.^............................................................... +............................................................................................................................................. +..............................................................^.^.^.^.^.^.^.^.^.............................................................. +............................................................................................................................................. +.............................................................^.^.^.^.....^.^...^............................................................. +............................................................................................................................................. +............................................................^.^...^.^.^.^.^...^.^............................................................ +............................................................................................................................................. +...........................................................^.....^.^.^...^.^.^.^.^........................................................... +............................................................................................................................................. +..........................................................^.^.^.^.^.^.^.^...^.^...^.......................................................... +............................................................................................................................................. +.........................................................^.^.^.^.^.^...^...^.^.^...^......................................................... +............................................................................................................................................. +........................................................^.^.^.^.^.^.^.^.......^.^.^.^........................................................ +............................................................................................................................................. +.......................................................^.^.^.....^...^...^.^...^...^.^....................................................... +............................................................................................................................................. +......................................................^.....^.^.^.^.^.^...^.^.^.^...^.^...................................................... +............................................................................................................................................. +.....................................................^.^...^...^...^.^.^.^...^.....^.^.^..................................................... +............................................................................................................................................. +....................................................^.^.^.^...^...^.^.^.^.^.^.^.^.^...^.^.................................................... +............................................................................................................................................. +...................................................^.^...^.^.^.......^.^.^...^...^.^.^.^.^................................................... +............................................................................................................................................. +..................................................^...^.^.^.^.^.^.^.^.^.^.^...^...^.....^.^.................................................. +............................................................................................................................................. +.................................................^.^.^...^.^.^.^...^.^.^...^.^.^...^...^.^.^................................................. +............................................................................................................................................. +................................................^.^.......^...^...^.^...^...^.^.^.^.^.^.^...^................................................ +............................................................................................................................................. +...............................................^.^...^.^.....^...^.^.^.^.^.^.^.^.^.^.^.^...^.^............................................... +............................................................................................................................................. +..............................................^.^.^.^.^.^.^.^.^...^.^.^.^.^.^.^.^.....^.^...^.^.............................................. +............................................................................................................................................. +.............................................^.^.^...^.^...^.^.^.^.^.^.^.^.....^.^.....^.^.^.^.^............................................. +............................................................................................................................................. +............................................^...^.....^.^.^...^.^...^.^.^.^...^.^.^.^.^.^...^.^.^............................................ +............................................................................................................................................. +...........................................^.^.^.^.^.^...^...^.^.^...^.^.^.^.^...^.^.....^.^.....^........................................... +............................................................................................................................................. +..........................................^.^...^...^.^.^.^.^...^.^...^.^...^...^.^.^...^.^.^.^...^.......................................... +............................................................................................................................................. +.........................................^.^.^...^.^.....^.^.........^.^.^.^.......^.^.^.......^.^.^......................................... +............................................................................................................................................. +........................................^...^...^.......^.^.......^...^.^.^.^...^.^.^.^.^.^.^.....^.^........................................ +............................................................................................................................................. +.......................................^...^.^.....^...^.^.^.^.^.^.^.^.^.^...^.^.^.^.^...^...^.^.^.^.^....................................... +............................................................................................................................................. +......................................^.^.^.....^.^...^.^.^...^...^.....^.^...^...^...^.^.....^.^...^.^...................................... +............................................................................................................................................. +.....................................^.^.^.^.^.^.^.....^.^...^...^.^.^...^...^.^.^.^.^.^.^.^.^...^.^...^..................................... +............................................................................................................................................. +....................................^...^.^.^.^...^...^.^...^.^.^.^.^...^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.................................... +............................................................................................................................................. +...................................^.^.^.^.............^.....^.^...^...^.^.....^.^...^.^...^.^.^...^.^.^.^................................... +............................................................................................................................................. +..................................^.^.....^.^.^.^.^.^.^.^.....^.^...^.^...^.......^.^.^.....^.^...^.^.^.^.^.................................. +............................................................................................................................................. +.................................^.^.^.^.^.^.^.^.^.^...^.^.^.^.......^...^.^...^.^...^.^.^.^.....^.^.^.^.^.^................................. +............................................................................................................................................. +................................^.^...^.^.^.^.^.^.^.^.^...^.^.^.^.^.^.^...^.^...^...^.^...^.^.^.^...^.^.^...^................................ +............................................................................................................................................. +...............................^.....^.^.^.......^.^...^...^.^.^.^.^.^...^.^.^.^.^...^.^.^...^.^...^.^.^.^.^.^............................... +............................................................................................................................................. +..............................^.^.^.^.......^...^.^.^...^.^...^...^.^.^...^.^...^.^.^.^...^...^.^.^...^.^.^.^.^.............................. +............................................................................................................................................. +.............................^...^.....^...^.^.^.^...^...^.^.^.^.^...^.^.^.^.^.^.^.^...^.^.....^.......^...^.^.^............................. +............................................................................................................................................. +............................^.^.^.^.^.^.^...^...^.^...^.^.....^.^...^.^...^.^...^.^.^.^...^.....^...^.^.^.^.^...^............................ +............................................................................................................................................. +...........................^.^.^.....^.^.^.....^.^.^.^.^.^.^...^.^.^.^.^.^.....^.^...^...^.^.^.^...^...^.....^.^.^........................... +............................................................................................................................................. +..........................^...^.^.......^.^.^.^.^.^...^.^.^.^.^.^.....^...^...^...^...^...^.^...^.^...^.^.^...^.^.^.......................... +............................................................................................................................................. +.........................^.^.^.^.^.^...........^.^.^.^...^.^.^.^.^...^.....^.^.^.^.^.^.......^.^.^...^.^.^...^.^.^.^......................... +............................................................................................................................................. +........................^.^.....^.^.^...^.^.^...^...^.^.^.^...^.....^.....^.^...^.^.^...^.^.^.^.^...^.^.^.^...^.^...^........................ +............................................................................................................................................. +.......................^.^.^...^.^.^.^.....^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^...^.^.^.^.^.^...^.^.^.^.^.^.^.^.^.^...^.^.^....................... +............................................................................................................................................. +......................^...^.^.^...^.^...^.^...^.^.^...^.^.^...^.^.^.^.^...^.^.^.^...^.^.^.....^.^.^...^.^...^.^.....^.^...................... +............................................................................................................................................. +.....................^.^.^.....^...^...^.^.^.^.^.^.^.^...^.^.^.^...^.^.^.^...^.^.^.^.^.^...^.....^.^.^.^.^.^.....^.^...^..................... +............................................................................................................................................. +....................^.^...^.^...^.^.^.^...^.....^...^.^...^.^.^.^.^.^.^.^.^.^.^.....^.^.^...^.^.^...^...^...^.^.^.^...^.^.................... +............................................................................................................................................. +...................^.^...^.^.....^.^...^.^...^.^.^.^...^.^.^.^.^.....^.^.^.......^.^.^.^...^...^.^.^.^.^.^.^.^.^.^.....^.^................... +............................................................................................................................................. +..................^.^.^...^.^.^...^.....^.^.^.....^.^...^.^.^.^.^.^.^...^.^.^.^.^.^.^.........^.^.^.^.^.^.^.^.....^.^.^.^.^.................. +............................................................................................................................................. +.................^...^.^.^.^.^.^...^.^.^.^.^.^.^.^.^.^.^.^.....^...^.^.^.^.....^.^.^.^.^...^.^...^...^.^...^.^.^.^.^...^...^................. +............................................................................................................................................. +................^.^.......^.........^.^.....^.^.^.^.^.^.^.....^...^.^.....^.^.^.......^.^...^.^.^.^.^.^.^.....^.^...^.^.^.^.^................ +............................................................................................................................................. +...............^...^.^...^.....^.^.^.^.^.^.^.^...^.^.^.........^.^.^.^...^.^.^.^.^.^.^.^.....^.^.^.^.^.^.^.^.^.^.^.^.......^.^............... +............................................................................................................................................. +..............^...^.^.^.^.^.^.^.^...^.^.^...^.^.^.^...^...^...^...^.^.....^...^.^.^.^.^.^.^.....^.^.^...^...^.^...^.^.......^.^.............. +............................................................................................................................................. +.............^.......^.^.^.^...^.^...^.^.^.^...^.^.^.^.^.^.^.^.....^.^...^...^...^.^.^...^.^...^.^.....^.^...^.^...^...^.^.^.^.^............. +............................................................................................................................................. +............^.....^.^.^.^.^.^.^...^.^.^.^.^.^.^.^.^.^.^.....^.....^.^...^...^.......^.....^...^...^.^.^.^.^.^.^.....^...^.^.^.^.^............ +............................................................................................................................................. +...........^...^.^.^...^...^.^.^.^.^.^.^.^.^.....^.^.........^...^.^...^.^.^.^...^...........^.^.^.^.....^...^.^.^.^.^...^...^.^.^........... +............................................................................................................................................. +..........^.^.^.........^.^.^.^.....^.^.^.^.^.^.^.^.....^.^.^...^.^.^...^.^.^.^.^.^.^.^.^...^...^.^.^.^.^.^.^.^.^.^.^...^.^...^...^.......... +............................................................................................................................................. +.........^.^.^.....^.^.^...^.....^.^.^...^.....^...^.^.^...^.....^...^.^.^.....^.^.^...^.^.......^.^.^.....^.^.^.^.^...^.^...^...^.^......... +............................................................................................................................................. +........^.^.^.^.^...^...^.^...^.^.^.^.^.^...^.^.^.^.....^.^.^.^.^.^.^.^.^.^.............^.^.^...^.....^.^...^.^.^.^.^.^.^.^.^.^.^.^.^........ +............................................................................................................................................. +.......^.^...^.^...^.^.^.^...^...^.^.^.^.^.^.^.^.....^.^...^.^.^...^...^.^.^...^.^.^.^.....^.^...^.^.....^...^.^.....^.^.^.^.^.^.....^....... +............................................................................................................................................. +......^.^.^.^.^.....^.^.^.^.^.^.......^.^.^.^.^.^...^.^...^.....^.^.^.^...^.^.^.^.^.^.^.^.^.^.^...^.....^...^.^.^.^.^.....^.^.^.^...^.^...... +............................................................................................................................................. +.....^...^.^.^.^.^...^.^.^.^...^.^.^.^.^.^.^.^.^.^.^...^.^.^.^.^.....^.^.^.^...^.^...^.^.^.....^.^.^.^.^...^...^...^.....^.^.^...^.^.^.^..... +............................................................................................................................................. +....^.^.^...^.^.^.^.^.^.^.^.....^.^.....^.^.^...^.^.^.^.^.^.....^.^.^...^.^.....^.^.^...^.........^...^.^.^.^.^.^...........^.^.^.....^.^.... +............................................................................................................................................. +...^.^.^.^...^...^.^...^.^.^.^.^...^.^.^...^.^.....^...^.^...^.^...^...^.^.^...^...^.^.^.^.^.....^.^...^.^.^...^.....^...^.....^...^.....^... +............................................................................................................................................. +..^.^.^...^...^...^.^...^.^.^.^.^.....^.....^.^...^.^...^.^.^.^.^...^.^.^...^.^.^.^.^.^.^...^.^...^.^.^...^.^.^.^.^...^.^.^.....^...^...^.^.. +............................................................................................................................................. +.^...^.^.^.....^.....^...^.....^.^...^...^.......^.^.^.^.^.^.^.^...^.^...^.^.^...^.^.^.^...^.^.^...........^.^...^...^.^.^...^...^...^.^...^. +............................................................................................................................................. \ No newline at end of file diff --git a/puzzles/input08.txt b/puzzles/input08.txt new file mode 100644 index 0000000..f42f2af --- /dev/null +++ b/puzzles/input08.txt @@ -0,0 +1,1000 @@ +93844,12630,70745 +22123,70856,7917 +64684,31097,56655 +80577,19551,52347 +8643,81773,61745 +83747,56517,7825 +65904,77029,34914 +60352,22789,26159 +28796,39812,72732 +6490,1392,88882 +73468,95995,87744 +82233,22002,37796 +63514,87079,76833 +71753,93747,58871 +72867,58954,42844 +54125,396,97387 +80804,30096,40821 +19838,55509,2541 +44572,30127,52829 +68688,75786,64275 +29943,94623,78663 +16162,59393,63173 +82440,88931,47091 +80206,16170,84065 +4254,20527,56983 +18929,36693,37718 +62512,34248,23231 +69885,11185,67582 +54403,1866,85137 +94206,92024,26813 +16729,78220,46232 +20757,88471,3986 +89013,63712,30705 +29715,79151,22840 +24375,94007,43335 +46114,56560,24198 +79705,89803,32487 +18314,44287,36884 +53916,65350,76074 +25386,84253,10255 +74558,40782,35332 +78744,83280,82050 +99458,34820,56818 +60351,78472,21894 +6086,57556,14712 +22004,70894,60768 +38045,80979,59622 +1692,9628,79050 +7043,96077,63500 +53685,23914,79776 +38309,95850,69766 +32138,15659,73110 +55164,24023,71283 +77460,36170,12653 +28284,36444,74085 +66415,26185,60413 +3029,53794,79073 +63886,39497,87541 +54221,95401,27524 +20254,18605,28257 +94054,34598,53892 +7919,78078,30921 +55509,63781,38206 +58804,3425,80533 +63690,65955,11450 +83746,48328,97548 +39036,35791,2940 +98669,40461,11049 +5491,79804,57416 +37052,27054,55419 +53772,53052,42406 +64706,87697,66120 +85402,14609,3451 +32802,47874,32651 +60726,81131,36314 +91973,56032,22283 +90359,35893,1567 +5915,61295,23430 +30769,10245,35368 +81296,84944,52953 +36532,49092,86194 +77067,34888,61802 +22764,36016,31965 +22458,13419,42195 +61375,75090,97787 +85732,85311,17297 +34909,95844,43674 +68057,18286,41574 +16046,81449,13449 +26057,37699,23921 +44664,57120,2681 +91495,47563,4539 +30866,65126,31036 +21981,45600,95221 +66902,363,35960 +79709,32163,73374 +77252,89771,43913 +49259,77514,91339 +49391,43125,61691 +72609,6563,18038 +11760,84025,27932 +61693,46240,19637 +71000,68664,49797 +61289,72259,19900 +89495,90269,12708 +44521,72923,66587 +16404,71097,91923 +32775,60050,72630 +38857,16875,71575 +41812,97999,64861 +25085,99891,78137 +4408,74804,7257 +22111,34276,83064 +58862,71072,3246 +79198,79617,74390 +22093,74292,89132 +77319,76364,58921 +51648,27209,37387 +29799,24097,62609 +16931,50155,35854 +68188,66178,15783 +89675,30044,72948 +13064,40436,31456 +79791,50839,51530 +17060,98402,79185 +27163,85227,78198 +74688,90367,63362 +45954,43681,3463 +80909,42440,37479 +81106,90011,66342 +72541,11301,36544 +96893,34669,1008 +55323,7896,21082 +88752,35756,36929 +34091,94326,69364 +15882,1998,96726 +72255,60398,28993 +76573,55549,15891 +98722,22898,59529 +52470,3710,70196 +45236,28082,93023 +97647,55510,12437 +17040,25304,79171 +99791,64498,82742 +22814,78444,92516 +93968,68272,62908 +24063,22423,56586 +1489,54446,94761 +35472,19329,63509 +78736,64005,43558 +63938,25309,20195 +32979,38892,8219 +72214,26454,90084 +55018,77550,60028 +56738,75351,74714 +37638,98059,57542 +45415,80346,98989 +39795,206,7316 +48082,23113,84339 +2670,5106,98964 +2392,7050,77050 +24600,17546,3574 +27885,15321,24461 +84325,78082,97907 +11314,26054,93350 +8582,87738,39780 +2313,37328,39625 +7379,24431,47107 +90439,74234,81957 +99495,71199,27838 +33184,29802,79503 +81183,14055,55781 +1905,72111,46960 +10154,76168,37065 +50165,32302,31030 +73216,10181,77412 +94226,46421,8987 +29150,46000,65319 +95271,76386,88865 +31962,65961,15999 +36866,6196,63854 +17003,13508,20595 +76850,59967,9262 +42683,42402,97494 +42261,65620,60668 +53404,2511,83248 +15366,40987,36398 +62601,1474,74225 +48169,10573,93145 +24240,94686,61815 +28201,29482,23549 +14096,82330,59430 +29465,53720,97070 +4045,64597,47500 +71251,75142,53019 +5553,32055,60592 +3040,19392,45162 +31063,42127,56944 +75471,14545,83763 +6731,62282,92429 +72553,40342,62964 +38140,186,40079 +54419,84882,79834 +78085,65001,31550 +57703,47313,64062 +48130,7876,22121 +30421,35745,38311 +58165,93598,7724 +52663,44644,26699 +51763,93086,65810 +21680,88222,94836 +58343,96268,74089 +33479,13710,36835 +98193,41920,43490 +38585,42071,27209 +25971,48995,27704 +68669,85741,83573 +62579,30064,27765 +65956,12365,52311 +83340,43683,59598 +992,8636,63606 +34498,48363,65284 +18973,61958,54632 +66051,36348,51602 +42279,73076,82494 +49159,2805,29120 +87227,65064,42350 +97847,91695,37009 +24423,3121,6084 +67940,50063,31890 +55627,99758,81958 +94354,88428,39625 +55591,89099,37483 +93501,71795,71786 +67762,87373,58079 +72298,87292,66758 +55675,97043,69698 +69876,3138,17140 +80579,18508,70941 +7575,47530,76473 +63183,22023,85354 +91377,58379,69100 +25772,77101,60249 +81383,92026,68232 +78208,22970,60711 +2703,45408,75766 +18661,74146,7132 +41642,25184,63544 +4137,36224,47444 +72503,22351,71214 +38517,63836,52744 +92889,57330,83963 +82038,83790,92003 +24966,27425,37978 +92508,50059,6048 +84433,65291,86868 +44541,82001,46719 +9400,45450,17558 +89692,17251,28397 +58639,49332,53772 +5007,95842,90725 +21796,61118,38503 +10765,83873,48803 +31073,34051,14967 +8106,44944,21944 +89950,75982,80818 +6522,80669,12153 +26062,5408,41366 +907,37430,87196 +24764,29434,26278 +84076,80860,10046 +76580,1928,97318 +1423,18070,67793 +84288,96516,51402 +9539,41502,18173 +99927,57466,64607 +92422,65262,37630 +8109,30494,40074 +31963,70157,29025 +81305,71687,60006 +11202,47198,13857 +51516,55237,30127 +2430,79152,48916 +79208,6731,48720 +36088,58267,53263 +80324,81849,58917 +58924,81154,34483 +19713,42168,30353 +43514,51644,36458 +6157,52020,50174 +80557,69395,97512 +73825,81322,49136 +67548,79642,75356 +31662,84348,44061 +90410,98020,65793 +32553,79988,67009 +89604,58390,75043 +97845,92637,36894 +34953,71960,69932 +70170,51431,77537 +8450,13660,49319 +48945,40922,81540 +68305,90230,36398 +46281,754,25938 +39263,8297,99595 +50917,18776,36042 +73575,85192,20502 +62848,17173,10788 +1091,33906,11839 +69367,43274,11035 +11587,16309,61060 +1836,37637,56131 +21051,97666,47099 +62904,87631,97366 +73528,18169,93255 +3004,21470,68053 +93748,94063,12431 +14570,79012,87747 +50611,56674,15837 +47465,98316,91643 +28852,7697,13578 +72860,12850,91200 +16703,6529,82375 +30841,74324,6349 +28184,1200,45208 +25279,73183,69472 +43213,49555,18901 +97275,81299,88663 +96271,47813,53505 +81543,88436,60791 +46942,83511,67700 +61666,5864,9039 +81322,34773,67932 +5211,61463,50776 +77369,81357,11450 +38517,39532,47831 +4325,96870,642 +36104,99008,72592 +19366,12357,45792 +80755,93334,25542 +85485,12127,33590 +80635,97467,80376 +58645,19732,80950 +86346,42985,62912 +53661,68418,83411 +81847,73365,20580 +91875,90197,63499 +72805,31942,63534 +95750,73250,54698 +89189,23635,96362 +70964,73712,3794 +34904,2540,47170 +255,52942,63885 +32964,63837,68871 +35123,46963,69238 +66491,41010,37406 +89177,63910,62493 +27990,84135,96782 +86467,20938,91218 +38014,75016,8422 +43023,994,82287 +22793,31263,79549 +10383,85582,27413 +13813,15398,38519 +68589,36984,11890 +16982,28987,30430 +84285,56843,933 +71668,73594,72766 +63289,6546,38629 +62291,84641,69526 +84782,41866,93419 +47460,47434,14031 +3473,66929,18767 +68731,51296,44309 +19020,95069,27383 +83673,59119,95338 +49264,29709,89670 +62770,65656,71666 +20250,83992,20626 +67321,56848,21592 +72308,81795,98630 +477,14052,60298 +57567,82016,5961 +23433,85964,44215 +93953,62060,82863 +65822,81242,41093 +86273,22384,66504 +99558,75244,67186 +74243,61022,5124 +78275,59341,73939 +77600,81517,60689 +66824,21113,717 +31887,86429,89251 +69527,72216,47704 +7264,60990,82793 +48320,37640,32687 +53511,25507,43110 +46441,51165,73072 +92639,38083,91042 +7464,47032,85858 +79049,15853,34531 +45595,62767,30380 +21212,36404,58393 +27372,59002,54197 +68248,83186,63186 +37070,38947,31539 +76380,97673,98566 +61143,13707,61531 +7066,64160,57258 +13330,4387,90613 +55045,92648,63887 +27572,46903,42601 +85982,84811,59889 +9821,66371,27595 +77218,62594,36564 +58029,98699,88363 +10464,6561,39612 +25619,2072,84631 +98166,96705,67986 +56447,99795,26131 +99934,82932,66833 +37600,62195,52909 +83560,26672,65422 +56711,24418,54278 +60042,45190,84516 +19457,51303,4255 +19842,62785,5377 +21785,44903,60861 +66813,22439,99687 +77699,16601,47204 +38807,92351,5298 +91688,93552,70020 +24775,31305,43437 +53309,76401,26567 +15699,33224,33719 +49398,18626,98675 +28302,16306,43415 +36292,42337,78682 +27272,57551,18253 +59752,21705,11025 +7582,65556,20031 +61138,54963,80574 +79144,77864,94424 +112,85609,41186 +31030,4371,32902 +47770,95560,1808 +26549,4825,10254 +57244,51479,42703 +13388,11276,77365 +31914,34970,94440 +28690,66668,83786 +80898,61232,8597 +76407,42980,99011 +17898,3253,26495 +94202,67898,22839 +72564,34033,77239 +10208,34690,72655 +62738,62249,38506 +59853,27944,4247 +78774,52347,46724 +16977,55759,65404 +68619,50835,96710 +73284,80367,46841 +53081,25247,74927 +98394,88958,70998 +50812,61975,99419 +4682,37599,29692 +912,41918,91648 +76937,90807,49835 +54434,80143,65009 +98171,16096,93600 +35364,90878,82166 +81859,90935,55451 +31574,21931,76450 +2688,60431,34199 +8859,46532,86649 +34949,49583,73915 +4542,59090,90269 +42544,12315,7016 +77403,32903,26384 +72527,93720,94298 +58776,3037,68831 +66763,83445,92434 +8693,76778,96168 +70254,3444,48627 +74873,7465,99759 +31290,43059,34020 +50212,57288,383 +51327,85396,51874 +10107,14249,90918 +33299,72986,62898 +21013,55207,97922 +60245,92872,66117 +29700,63599,94168 +6548,67961,48132 +3005,47972,15736 +50471,81440,48210 +13180,97357,15982 +61866,27187,85856 +61037,91581,91228 +40575,2671,93526 +84776,62753,23008 +88883,47116,24632 +72098,70040,76982 +38691,69767,96696 +44549,29513,79999 +31599,54696,60345 +53685,79654,45602 +66767,90100,36953 +81549,46162,55582 +79800,26841,59296 +40501,88069,44123 +54862,68256,94758 +96763,10322,66793 +34985,4499,44018 +12532,66178,84128 +40961,86053,87920 +33943,14746,79827 +78817,99718,13001 +51347,20508,1004 +46095,64867,10226 +35070,56342,45128 +95305,99868,45869 +24922,51105,50896 +89006,91709,80797 +95594,83358,77829 +37282,25199,51703 +33915,57650,31636 +23880,30064,95601 +76463,78640,37117 +31283,92079,55034 +8243,8156,50906 +91615,55016,77620 +36103,80228,52723 +41881,64354,35369 +15872,49437,25377 +56284,20298,73908 +19160,68764,65324 +61772,46498,68853 +34534,66939,74443 +88562,32492,56652 +89999,71876,16910 +13491,33999,90409 +69750,19732,85089 +65457,29651,73028 +30359,65088,53406 +84420,4984,50313 +62064,71791,25798 +87177,22409,12713 +51559,76339,96164 +21567,21459,77985 +75316,86149,11 +97853,94512,40687 +64335,14913,41941 +75213,34314,58729 +63441,28228,68487 +15417,95373,80950 +50675,21665,45273 +72582,58717,67032 +79582,13284,49254 +31419,88084,27301 +40704,70365,58178 +10,65656,75815 +65782,47634,71221 +77689,64786,37821 +14104,63023,18346 +32626,56762,443 +61224,9608,98451 +71340,35043,36973 +11430,2336,15728 +61988,84488,36640 +79194,61128,47585 +46937,22523,2797 +89631,77712,63802 +85239,21425,60895 +95183,43517,44885 +1708,16342,19678 +93665,10075,55866 +72747,17238,11599 +17590,72353,6671 +17249,9478,88296 +54608,45541,11583 +13584,11048,59478 +74314,60111,29971 +14026,61616,52977 +97138,70860,38863 +70659,29593,99789 +42107,28235,17205 +21420,98447,93646 +56597,48427,52220 +93080,60046,42392 +75729,43811,54700 +28678,89519,78869 +66683,87925,10731 +35542,54835,6661 +19377,94050,26175 +20202,15001,12238 +49881,42535,34229 +71884,80088,37638 +67077,79179,27647 +86036,77800,12642 +28573,13102,12473 +98659,22916,3447 +69907,354,26672 +43358,60905,7457 +85046,32812,70869 +11486,85386,45478 +36582,85176,69421 +2227,15210,71632 +67872,56737,54684 +36067,25993,74583 +13230,70768,50148 +55974,42568,46647 +76249,1464,65986 +17567,97850,26412 +97763,46772,41081 +78678,64296,98977 +95790,22626,76486 +32777,6389,96466 +45642,12506,55464 +87656,36194,7857 +90679,68485,64162 +55536,17180,90171 +5436,88416,88554 +58070,16131,5566 +79188,37290,15042 +27208,25198,15338 +62528,32556,63288 +22874,10602,58813 +98298,29524,5793 +49188,85180,68555 +66897,87410,13825 +87636,14060,43980 +16045,18431,15259 +14238,75102,95837 +57352,73924,88528 +55105,35568,6514 +86463,47358,79318 +47222,48271,73835 +28774,18597,80714 +27521,62780,93534 +45669,5931,16564 +43972,35715,79965 +49784,12019,56690 +57026,59715,58621 +59689,99619,28803 +724,76288,67596 +43951,78133,12875 +58683,90532,96794 +98755,70421,66254 +65874,11763,90780 +58092,85928,10791 +15089,4249,97578 +31380,55345,17494 +71665,75099,53164 +66625,8942,80952 +79455,9856,30358 +75044,29318,3529 +27079,78776,27529 +98122,16004,24110 +3497,2408,14195 +93223,80642,87954 +7047,32325,48548 +16721,64945,40968 +21236,12273,75316 +71767,16556,70425 +8495,48277,36857 +17248,34631,72560 +28121,17297,56430 +12377,582,23620 +3224,8384,42228 +80999,1007,19999 +95262,4383,1068 +24639,74322,41380 +63773,66094,33678 +11152,90504,5007 +19131,37899,20789 +67239,92010,73042 +7170,74105,98910 +86914,4103,37550 +91644,34082,48761 +9401,77622,32938 +85298,62643,59683 +63153,32053,21405 +12526,88475,49331 +22766,73867,79543 +97100,84809,25084 +36127,13135,79344 +89855,74002,91918 +66974,48392,76158 +28275,89773,93744 +50615,82999,55029 +3163,4427,59615 +54342,78814,5098 +9422,99013,75224 +5257,18055,83866 +38721,39571,34242 +53083,52315,84934 +25431,12910,72018 +98656,43991,21819 +29297,67214,27702 +45452,51021,76512 +38239,24130,50086 +59185,18097,99542 +45328,72130,94129 +74102,56291,59301 +59150,17507,62115 +32763,94849,75092 +34358,91969,20943 +12592,67516,55814 +90847,21085,4880 +36353,38496,39562 +93199,61591,65845 +17281,33792,93817 +34783,92701,25153 +33651,8281,23965 +88585,18855,22337 +86777,96789,74747 +21351,97733,31671 +6870,22034,74992 +58600,73511,28081 +5035,62193,12664 +22372,5825,50693 +81626,19561,34296 +43673,8767,59343 +43517,86541,48608 +27812,50570,25215 +96797,83493,3134 +63699,75052,24120 +32204,34157,10706 +21447,6349,68517 +30619,21328,38085 +43444,32898,63635 +2846,34721,10847 +81533,65820,79622 +78652,27489,54760 +40445,55105,71042 +23346,38366,25788 +48807,46506,97570 +33767,75356,97425 +7608,60175,50837 +18008,93638,97967 +10320,97380,35298 +1392,35393,74122 +14798,99842,1563 +30208,12491,95172 +28009,21217,26018 +46316,68547,6723 +29283,72322,74778 +95588,35668,45338 +41815,87424,1072 +77328,32439,77854 +25562,39848,62426 +51503,55652,64199 +15184,32424,84718 +1838,61145,12733 +17895,41873,61821 +71832,45313,76531 +91550,11949,28018 +27059,65088,21980 +82693,25028,96070 +87403,81955,28474 +61304,56194,7837 +12643,16818,61480 +87852,43179,13004 +73595,50243,29772 +24168,85103,91431 +93079,29790,20340 +2020,12256,25164 +49613,34783,67650 +63373,91127,69793 +49027,31111,9973 +78076,67548,81614 +2734,60092,26251 +9159,62878,31748 +63022,73347,1332 +5955,59217,16186 +88677,17922,90892 +60873,51065,27787 +4145,14351,222 +52532,9883,39602 +2315,12156,29917 +60960,30650,56798 +65489,81287,37122 +98147,77133,35968 +94278,73039,57965 +58253,41583,47757 +19166,80385,84421 +16068,43309,59092 +6325,96819,3773 +234,2197,32306 +67474,46382,95639 +51905,93886,17938 +93204,92205,28140 +44528,18892,94296 +88632,62970,30216 +53001,96606,93596 +4182,25039,29681 +64538,12848,48663 +75224,78365,22338 +14086,20286,27344 +58540,79086,46045 +25095,67876,72445 +34715,54164,48153 +71001,57884,81512 +869,72523,74252 +64920,80092,25296 +7450,89019,67379 +64807,32166,10145 +69824,78792,33556 +95073,47700,28061 +6188,60043,67481 +91182,62077,26185 +23367,65804,66696 +45447,63035,63288 +10263,27315,59036 +3207,5166,60519 +88834,57985,73035 +90943,68488,23060 +88475,95511,23039 +216,29872,55296 +75533,50213,45819 +97614,96790,86679 +67896,99532,71664 +20624,60120,21616 +74648,68333,81639 +67441,24236,84544 +36874,28668,77713 +34521,1446,31385 +49688,43540,88691 +6629,17413,71614 +55766,16080,82175 +24371,37205,93072 +24443,3915,45896 +22115,36148,22542 +54332,15746,35822 +1432,2500,12352 +59950,67887,93176 +83004,18527,64303 +25959,97334,72935 +35778,48563,65688 +57172,25666,96641 +62869,4646,27015 +85647,239,70990 +86491,55666,49275 +10766,14981,29536 +79765,17768,64190 +64069,26937,67794 +23060,99731,91712 +62324,58929,45589 +68603,80057,87071 +95753,10083,70553 +18716,11043,30025 +24071,70845,70135 +48789,81422,18941 +47444,50346,63604 +68220,69900,96906 +26354,68119,78959 +88126,87944,85258 +75922,41053,98836 +3991,87373,57380 +72081,64517,3037 +52454,95810,37660 +53573,37187,5981 +53853,39585,14098 +13357,75977,37592 +23715,3695,32271 +66483,96196,52605 +12021,23101,80530 +4740,23026,3457 +57767,4517,401 +16692,65488,14782 +43392,45910,33307 +91758,50150,38425 +39458,84593,62714 +19557,77267,20100 +26179,21954,68876 +6361,90497,36471 +78530,20011,31672 +65245,19135,44327 +14706,50593,52073 +70113,5868,59536 +26788,95707,90879 +54007,4930,4117 +16378,59491,44180 +59613,97543,36709 +58447,26515,96367 +86477,51172,50501 +14045,39294,49057 +37782,30623,86139 +41583,38708,95583 +71785,63078,66868 +36769,85145,64350 +4622,89248,39133 +25359,88172,6193 +84210,84669,57802 +56554,64715,49547 +60398,69926,80108 +25667,76034,2767 +12589,96004,29263 +72170,10583,6143 +89065,67688,81238 +88870,24782,55242 +49297,98695,53404 +17919,87626,78081 +51801,76004,49267 +39406,14636,77582 +76199,18580,56165 +18450,87931,92755 +37274,31587,13065 +23581,17256,78814 +39327,21181,35088 +4125,37418,43738 +77028,44645,97092 +88265,79083,92867 +81145,64474,94644 +15925,5605,13697 +62730,44089,39166 +66228,81905,72656 +48424,64608,2934 +86843,10227,97901 +31459,27817,50752 +30748,72490,97079 +17162,75768,58068 +18542,18270,92732 +5722,23336,68099 +33431,911,17199 +49386,70861,83420 +50566,58695,74796 +83598,61428,40306 +24854,14854,99898 +36914,83952,78440 +73081,76207,98786 +12576,35559,19027 +57921,62442,43556 +95938,65143,38121 +15246,11291,73834 +95691,87854,703 +2510,74034,98595 +11898,56168,27641 +99742,70721,37424 +58808,84020,22679 +87416,75716,97274 +42754,53308,37367 +5529,30553,25996 +91646,38220,24843 +20659,95949,98554 +36017,35774,49193 +74690,79509,99058 +15194,82920,87248 +69779,1806,47885 +7433,61476,66934 +11957,10190,60090 +67037,21839,98335 +53563,47495,96152 +2598,60799,698 +34545,7884,33669 +16407,83254,88714 +96645,1498,41016 +19448,8611,10256 +34856,98901,62071 +61662,50280,84040 +47297,12845,41549 +31501,54520,34699 +98515,43662,42362 +80350,87062,53126 +55973,73647,44933 +85997,80114,17291 +27478,23412,63255 +5017,82764,30039 +37936,52771,88283 +20653,88750,4327 +3529,5761,8016 +94584,28727,37123 +11463,83805,67029 +66994,11967,74769 +40312,13701,87276 +95214,19177,22568 +78282,60137,29627 +26405,32467,67584 +66054,741,27759 +97980,46759,83756 +73829,38887,9813 +79075,37317,28451 +7679,95971,14687 +61632,31890,99865 +71956,18920,21406 +55992,29049,25806 +1387,6101,95237 +63378,31055,91323 +58045,45826,42206 +75857,14633,75056 +44926,95816,87144 +11327,99560,48120 +33447,43038,78055 +96133,5368,49676 +2081,35240,97669 +76021,77089,73720 +4032,40051,82283 +16159,59020,93600 \ No newline at end of file diff --git a/src/day07/mod.rs b/src/day07/mod.rs new file mode 100644 index 0000000..d043c72 --- /dev/null +++ b/src/day07/mod.rs @@ -0,0 +1,36 @@ +pub mod part07a; +pub mod part07b; + +#[cfg(test)] +mod tests { + use crate::day07::{part07a, part07b}; + + const PUZZLE: &str = ".......S....... +............... +.......^....... +............... +......^.^...... +............... +.....^.^.^..... +............... +....^.^...^.... +............... +...^.^...^.^... +............... +..^...^.....^.. +............... +.^.^.^.^.^...^. +..............."; + + #[test] + #[ignore] + fn part07a() { + assert_eq!(part07a::solve(PUZZLE.to_string()), 21); + } + + #[test] + #[ignore] + fn part07b() { + assert_eq!(part07b::solve(PUZZLE.to_string()), 0); + } +} diff --git a/src/day07/part07a.rs b/src/day07/part07a.rs new file mode 100644 index 0000000..986c86a --- /dev/null +++ b/src/day07/part07a.rs @@ -0,0 +1,4 @@ + +pub fn solve(puzzle: String) -> u64 { + 0 // TODO +} diff --git a/src/day07/part07b.rs b/src/day07/part07b.rs new file mode 100644 index 0000000..986c86a --- /dev/null +++ b/src/day07/part07b.rs @@ -0,0 +1,4 @@ + +pub fn solve(puzzle: String) -> u64 { + 0 // TODO +} diff --git a/src/day08/mod.rs b/src/day08/mod.rs new file mode 100644 index 0000000..9a609ad --- /dev/null +++ b/src/day08/mod.rs @@ -0,0 +1,40 @@ +pub mod part08a; +pub mod part08b; + +#[cfg(test)] +mod tests { + use crate::day08::{part08a, part08b}; + + const PUZZLE: &str = "162,817,812 +57,618,57 +906,360,560 +592,479,940 +352,342,300 +466,668,158 +542,29,236 +431,825,988 +739,650,466 +52,470,668 +216,146,977 +819,987,18 +117,168,530 +805,96,715 +346,949,466 +970,615,88 +941,993,340 +862,61,35 +984,92,344 +425,690,689"; + + #[test] + #[ignore] + fn part08a() { + assert_eq!(part08a::solve(PUZZLE.to_string()), 40); + } + + #[test] + #[ignore] + fn part08b() { + assert_eq!(part08b::solve(PUZZLE.to_string()), 0); + } +} diff --git a/src/day08/part08a.rs b/src/day08/part08a.rs new file mode 100644 index 0000000..986c86a --- /dev/null +++ b/src/day08/part08a.rs @@ -0,0 +1,4 @@ + +pub fn solve(puzzle: String) -> u64 { + 0 // TODO +} diff --git a/src/day08/part08b.rs b/src/day08/part08b.rs new file mode 100644 index 0000000..986c86a --- /dev/null +++ b/src/day08/part08b.rs @@ -0,0 +1,4 @@ + +pub fn solve(puzzle: String) -> u64 { + 0 // TODO +} diff --git a/src/main.rs b/src/main.rs index 24a895b..1cdd0c7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,7 +4,10 @@ mod day03; mod day04; mod day05; mod day06; +mod day07; +mod day08; mod day09; + use std::time::Instant; use std::fs::OpenOptions; @@ -34,6 +37,10 @@ fn main() { ("day05:B", day05::part05b::solve, "puzzles/input05.txt"), ("day06:A", day06::part06a::solve, "puzzles/input06.txt"), ("day06:B", day06::part06b::solve, "puzzles/input06.txt"), + ("day07:A", day07::part07a::solve, "puzzles/input07.txt"), + ("day07:B", day07::part07b::solve, "puzzles/input07.txt"), + ("day08:A", day08::part08a::solve, "puzzles/input08.txt"), + ("day08:B", day08::part08b::solve, "puzzles/input08.txt"), ("day09:A", day09::part09a::solve, "puzzles/input09.txt"), ("day09:B", day09::part09b::solve, "puzzles/input09.txt"), ];