From 42bd5367a0fa72c49cd51a4d5707fe400f2e3867 Mon Sep 17 00:00:00 2001 From: Stefan Harmuth Date: Mon, 8 Dec 2025 07:07:18 +0100 Subject: [PATCH] day08 --- day08.py | 69 +++ inputs/input8 | 1000 ++++++++++++++++++++++++++++++++++++++++++++ inputs/input8_test | 20 + 3 files changed, 1089 insertions(+) create mode 100644 day08.py create mode 100644 inputs/input8 create mode 100644 inputs/input8_test diff --git a/day08.py b/day08.py new file mode 100644 index 0000000..b3a97b4 --- /dev/null +++ b/day08.py @@ -0,0 +1,69 @@ +from tools.aoc import AOCDay +from tools.coordinate import Coordinate +from typing import Any + + +class Day(AOCDay): + inputs = [ + [ + (40, "input8_test"), + (140008, "input8"), + ], + [ + (25272, "input8_test"), + (9253260633, "input8"), + ] + ] + + def parse_input(self) -> tuple[dict[float, Coordinate], dict[Coordinate, int]]: + boxes = [Coordinate(*map(int, line.split(","))) for line in self.getInput()] + dists = {} + for i, box in enumerate(boxes): + for box2 in boxes[i + 1 :]: + dists[box.getDistanceTo(box2)] = (box, box2) + + members = {box: i for i, box in enumerate(boxes)} + return dists, members + + def solve(self, part2: bool = False) -> int: + dists, members = self.parse_input() + circuits = {i: [box] for box, i in members.items()} + connections_needed = 10 if self.is_test() else 1000 + connections_done = 0 + last_pair = None + + for _, (box0, box1) in sorted(dists.items()): + connections_done += 1 + if (not part2 and connections_done > connections_needed) or len(circuits) == 1: + break + + if members[box0] == members[box1]: + continue + + merger = members[box1] + for box in circuits[merger]: + members[box] = members[box0] + circuits[members[box0]].append(box) + del circuits[merger] + last_pair = (box0, box1) + + if part2: + return last_pair[0].x * last_pair[1].x + else: + ans = 1 + for _, v in sorted(circuits.items(), key=lambda k: len(k[1]), reverse=True)[:3]: + ans *= len(v) + + return ans + + def part1(self) -> Any: + return self.solve() + + + def part2(self) -> Any: + return self.solve(part2=True) + + +if __name__ == '__main__': + day = Day(2025, 8) + day.run(verbose=True) diff --git a/inputs/input8 b/inputs/input8 new file mode 100644 index 0000000..d3e9321 --- /dev/null +++ b/inputs/input8 @@ -0,0 +1,1000 @@ +62520,94824,58185 +1881,64809,15856 +26905,48605,19448 +40769,80814,81090 +21439,52625,45591 +6199,78564,6862 +94793,22297,51994 +83965,28443,98203 +99472,68501,50752 +64639,28406,58472 +53341,36975,79399 +89020,61079,15987 +87400,82384,24380 +81905,62634,75964 +87767,93067,10105 +97995,43621,74982 +60196,48027,1243 +78333,17667,40970 +94223,49544,88316 +9312,88154,87987 +6192,50216,81115 +16904,36384,1101 +51376,16801,54123 +29081,60988,20710 +17641,2999,76467 +49671,35727,59847 +94714,37334,39264 +85083,35410,7298 +65389,54860,72129 +92062,52360,70610 +60633,23939,79249 +87076,91684,55494 +6956,54854,50197 +38876,32992,80453 +25582,82303,42264 +39844,58434,20074 +57647,56275,64807 +55423,88273,87002 +85446,28400,68836 +25409,17848,2676 +41164,60147,3567 +73910,69174,88412 +31908,60030,2093 +29811,49201,11835 +18345,55542,16090 +65916,36545,36537 +64467,75240,70928 +26927,72250,84399 +19804,65544,94569 +43803,98100,79507 +81183,71518,82953 +68115,34123,3661 +16117,91830,49238 +18743,63417,76061 +68410,62022,41825 +373,93683,30217 +94215,94787,74058 +42030,83449,21803 +33873,16389,36896 +27776,27675,98299 +53513,94430,59645 +15576,74542,80708 +20709,61648,59975 +89052,68444,87190 +33312,16970,94113 +42691,91557,14541 +98274,55571,93616 +87973,87379,98317 +63696,96693,34868 +21760,85381,41481 +43037,92494,32684 +40247,38344,2068 +35728,19057,19995 +63415,17290,93423 +17166,96900,51975 +89780,46855,42693 +89536,21948,75331 +41064,78050,31532 +89845,59128,9259 +65253,72509,37648 +58173,63454,19078 +99508,80730,91376 +66237,31611,78121 +53569,31524,91978 +3844,89059,50294 +36285,31439,74107 +29492,23692,77207 +35668,64032,86292 +75606,53741,59265 +3792,86028,57727 +23698,53752,1506 +80697,86218,35197 +73718,57271,18687 +31143,38444,43651 +19891,64239,52959 +11641,23176,53814 +56533,58325,5339 +35885,59261,66964 +96741,7922,8419 +16885,65555,94105 +88106,36303,86334 +45395,73129,14493 +13814,31881,85304 +82258,96357,6605 +26270,52824,54505 +13407,79507,10834 +63656,33462,62807 +93839,56382,62248 +55623,28437,59820 +41005,41394,38816 +13047,33520,68405 +17117,44516,3847 +2457,37380,2152 +65598,86576,64505 +10431,5401,36227 +89231,16932,37441 +39616,44369,92939 +92409,41407,87255 +71578,41291,11652 +81317,65753,75070 +20385,64910,75361 +17337,89959,48889 +7571,13915,2664 +53014,29544,86866 +29106,44137,4157 +38617,74642,21533 +25807,63508,36073 +53750,45284,51025 +20896,80435,15230 +18332,16535,76905 +86618,74976,49816 +40404,72866,23923 +47939,98210,72911 +28804,84742,88917 +4491,4968,61193 +10487,60732,13005 +50651,20193,29335 +78450,19452,71601 +36522,25100,76037 +68442,25437,75280 +79894,42140,98875 +36525,59767,33127 +42714,96939,12362 +91459,62721,92234 +23507,52125,72918 +75738,27325,78497 +47500,22734,81754 +74159,15360,75278 +34916,10667,31411 +90351,13532,5382 +92625,88947,16592 +59314,89481,26851 +12503,56630,51451 +68586,41517,63370 +84468,57836,25554 +97713,30501,42886 +833,84246,46490 +50909,63823,32931 +89021,65667,64749 +84437,59806,69197 +84695,48129,68163 +67862,89732,89931 +73341,59569,98463 +43695,211,73865 +16080,62229,65245 +55792,49175,60229 +90059,82814,99746 +49631,21270,30853 +55570,24017,67982 +8481,16574,9429 +31675,89791,75104 +87949,53038,17607 +61884,92705,72082 +54688,71704,20238 +72479,5855,43945 +61725,9940,56769 +26224,98002,54039 +2965,35865,66182 +70144,17150,27460 +95784,45236,4304 +7278,39091,919 +67323,21186,20007 +16631,84667,4485 +85689,4157,33293 +74787,29608,74448 +62002,85746,29431 +33232,83092,35932 +349,42059,43677 +47015,48016,15666 +16465,25083,35704 +69496,5993,92646 +79368,28046,57587 +3765,764,95553 +28801,15465,2561 +36272,96990,3130 +57270,17938,31432 +51093,1929,15421 +17202,80683,7671 +23550,33564,62528 +3942,80480,28121 +96973,13975,93157 +95239,92689,35891 +91655,32816,68560 +43273,22574,73915 +95063,93033,46152 +42125,58799,5885 +95896,73268,15504 +16574,32079,57365 +13741,94437,5459 +48400,51906,78690 +99504,44442,36893 +2551,37840,75155 +62685,42813,98753 +29779,23639,363 +35614,87469,29861 +17424,46624,58749 +43772,70770,490 +35976,8042,49906 +7530,70663,68919 +65068,25046,23526 +6702,13302,18425 +60867,90552,19550 +27510,28864,59911 +23288,43906,20145 +63820,85702,16829 +38386,34997,85339 +21033,64372,42636 +65764,33754,67713 +19654,12694,42164 +93232,42224,12697 +97742,69770,5596 +74636,28525,45822 +76797,49057,39178 +94119,56091,31588 +67207,53115,72032 +82772,11760,83479 +4605,88531,19988 +22469,44747,49468 +60838,67701,82220 +51617,63577,27779 +75430,90828,70102 +42887,12676,4045 +87848,20366,73243 +86321,21179,3928 +45539,26857,61085 +20318,47625,91711 +78569,32399,20445 +77864,69431,95750 +55845,1890,55816 +28612,68295,7607 +51529,88358,91622 +47893,27823,16508 +58929,35158,78682 +97593,16365,58336 +29020,43194,99006 +28518,75928,92965 +11635,64066,17359 +41092,68741,34445 +40040,84209,49118 +1471,90086,19969 +61559,80802,86747 +42422,32685,74681 +8845,8607,56920 +30838,51370,31813 +66035,69814,28823 +71384,13236,3302 +74550,81290,38999 +75424,29548,83778 +15221,84878,27954 +97920,5719,52506 +13337,62565,47973 +52167,73545,122 +48747,14676,71532 +11489,98691,89256 +4455,27480,84523 +24555,18329,61195 +6212,33934,85470 +66227,67731,85938 +57353,53441,88357 +10674,96832,14618 +94736,12958,77102 +43894,77630,11739 +86273,886,89578 +87272,67932,75286 +86852,69115,51151 +57907,79938,72199 +15490,3246,8122 +19456,5034,53379 +35039,38743,53329 +40832,20814,1790 +31238,72026,42621 +72650,50889,24598 +47321,43517,89597 +47263,47940,73891 +72106,94972,48877 +84014,22141,43727 +64136,30376,64636 +26789,98017,57178 +98349,99236,90405 +46262,29994,41998 +99095,4310,51347 +44968,42064,31870 +80883,85934,53790 +16997,82608,36029 +4889,16979,13551 +50896,84609,15953 +54702,41135,75068 +32239,10225,86424 +36175,56291,49066 +59670,35619,14407 +39534,44317,71401 +12278,38995,57227 +50324,30340,41235 +68253,67706,35342 +16755,36556,27031 +81900,65678,52821 +96959,97973,18161 +89885,13591,49396 +88157,64844,42163 +33103,7968,10682 +41752,54663,33581 +41053,63677,53652 +25043,78187,27014 +76600,27919,50493 +78328,90192,37607 +66450,65735,31725 +39399,37494,55817 +15949,25679,71060 +44726,40228,84687 +41581,68616,37920 +90401,91429,93101 +34067,53074,24422 +53876,20420,88069 +54231,61337,27768 +45180,20693,58876 +73124,449,14460 +8292,64895,31762 +69718,45159,79508 +82359,24599,13375 +73594,12901,77779 +20706,63577,72537 +19509,8077,13082 +98196,7181,54418 +92838,14407,24902 +38777,69689,34550 +87515,2609,93738 +9698,60639,31033 +65797,79680,96949 +43360,12104,19689 +76600,24484,77935 +56767,66976,71315 +85597,36444,28511 +87041,21347,28392 +22728,52859,7822 +69483,73837,97240 +47491,96443,82793 +79599,54398,32150 +43785,4397,18214 +68741,7401,86712 +10214,66303,26385 +37662,65764,32785 +1908,21921,83995 +14010,77833,37108 +21341,42452,53718 +60752,21472,30511 +64464,22655,96510 +54338,5085,64217 +31603,34059,26138 +99954,31666,47083 +41668,66146,21697 +5085,43322,26261 +83545,19190,7316 +59175,96725,79674 +84769,23892,9911 +88696,39193,20725 +15744,30490,10463 +34017,23624,11522 +54246,83312,14005 +92039,5348,49379 +30657,94361,7873 +7147,93274,66584 +23426,50893,36966 +2750,88786,57191 +54770,42002,28853 +204,7713,55217 +10233,21748,99253 +63552,30991,7896 +88965,50428,7024 +35102,47061,27797 +23704,5382,56794 +95779,50311,82884 +37167,8773,55717 +97414,41599,93135 +47595,75533,48861 +84073,78472,61714 +86530,90205,4117 +72616,52231,1622 +40683,92385,38031 +24545,83653,28763 +34339,16690,24636 +54585,33809,71214 +21632,10543,66853 +33121,48348,29356 +48957,54869,11566 +2906,77849,2717 +89754,79556,84485 +2364,7000,83629 +65607,72412,24400 +60520,34177,92904 +55487,94723,45447 +20119,6470,32366 +45462,9404,8520 +80848,51991,87007 +64493,4811,97933 +6853,31953,96551 +28713,96551,27705 +59886,59149,91381 +75113,6470,24244 +48747,46764,53129 +41513,47147,43624 +15658,80615,91738 +23464,89634,76346 +57227,60895,70809 +42462,2455,18011 +7771,41640,39468 +96332,67350,38208 +52875,59624,80401 +28528,58504,84470 +46441,61157,8176 +81164,58564,28192 +41912,7510,84099 +61584,65575,14048 +74637,89647,11565 +21195,78859,43918 +99628,99267,7515 +60616,86152,83369 +70782,53804,49954 +47169,59091,48026 +94785,50114,65201 +97430,4,53325 +30875,45301,61109 +69564,96638,88376 +23362,81151,77813 +7949,68346,56057 +38292,50871,85505 +91230,78464,82606 +70360,58637,52361 +68224,86857,63727 +27748,50838,13122 +8833,61736,7877 +34595,91273,82873 +49419,34175,33910 +11954,37797,60489 +16246,70432,19997 +89076,38694,83807 +72880,59941,48602 +93243,22726,13213 +91568,11662,54592 +13435,28236,59217 +20859,65029,98406 +60250,72203,65759 +89306,91325,6246 +12420,11960,13614 +79846,80674,43052 +67703,89330,17860 +3626,33870,49984 +59065,20316,83968 +21442,49862,19532 +54582,30967,7205 +5337,26057,52065 +98413,53520,83809 +44020,68360,48332 +91160,49259,276 +95886,5247,63302 +85818,65964,96822 +27486,86390,58617 +82397,71604,48253 +25983,73782,33892 +48094,35395,90351 +73812,79455,65206 +46892,41389,81450 +27791,22464,80424 +73548,8407,70198 +84932,9720,57812 +45154,44221,44150 +39793,97263,55958 +2846,91385,3011 +44614,51304,28472 +35839,39207,9811 +17377,8539,66235 +93582,24590,57220 +36017,94798,62386 +86127,11031,4384 +23841,4898,68651 +21335,72815,78206 +16398,71258,44587 +74593,1350,59924 +62629,63048,25838 +5010,74057,18309 +45528,4170,7724 +78320,73166,21319 +17907,58727,38906 +67955,65971,92229 +96463,61847,30897 +87114,1338,2013 +15778,14993,93779 +74016,15528,57798 +73738,12018,35393 +97353,69024,89112 +50149,85396,40731 +82353,90213,20020 +93505,86851,48438 +97127,22487,9755 +55982,38131,26290 +11250,58057,91879 +96769,29299,82050 +8239,94832,7399 +77908,10126,78236 +71530,90751,91816 +36256,81659,10605 +24376,38850,23987 +16489,98907,39207 +48834,69596,18512 +587,83004,11235 +8302,6419,19025 +28868,36191,69616 +72380,81953,76493 +78858,94180,37187 +43444,9755,74334 +79832,26694,23821 +89734,18612,68640 +72211,65189,31222 +91267,91331,70285 +46263,54212,8540 +73262,85846,66269 +85944,89914,7367 +78821,94163,79702 +59102,25081,84268 +57541,74119,86115 +80977,64369,62158 +29684,52538,5599 +57153,86766,79264 +58272,46103,72733 +83042,26381,46213 +84187,41515,1751 +34507,81334,73446 +54543,36088,11140 +83749,23244,82559 +14311,18808,16543 +94967,54387,33531 +47379,80321,88772 +72530,38204,57052 +87596,38116,13074 +12657,78885,59554 +136,11614,28918 +1034,32424,99054 +40041,92742,57389 +16641,88955,40903 +49416,62817,24967 +51734,94514,86792 +77295,82359,63793 +20983,74843,32455 +70111,92588,91334 +95768,69935,43890 +88111,65044,15978 +60603,19821,99701 +23160,6402,92424 +28095,95139,82872 +55366,28183,86614 +90314,27818,25089 +43305,30743,12206 +24056,63186,89788 +94702,16661,43068 +54321,34765,76746 +6504,61205,68946 +98178,74137,71103 +27770,83021,8865 +55438,16602,4633 +9723,59403,5547 +9787,64082,62493 +2876,91161,93888 +3225,7112,29984 +25948,49310,31769 +33856,85341,63072 +31504,96455,44555 +45348,81767,92579 +56104,2145,49270 +16640,83632,6025 +55942,37064,13477 +59346,73587,98921 +46531,76336,73930 +77508,17297,4399 +3866,95525,74907 +97433,7953,33951 +58751,32310,99716 +23908,61210,47406 +5364,24884,51851 +54544,3795,8903 +33754,84264,46187 +54916,64169,22473 +8328,51245,31449 +63811,55678,33692 +79565,75032,51992 +94574,84211,38079 +29142,63878,42341 +36970,41360,32692 +54594,987,29095 +94697,79645,6691 +14252,71555,76385 +37069,83290,49314 +36949,63391,1127 +36414,46691,46391 +46228,99325,89977 +92081,95015,93460 +89483,64196,86458 +77654,15795,71987 +10528,37517,10611 +67330,27352,92359 +15524,99005,98119 +82530,6950,61205 +99910,28180,81742 +16035,81057,80021 +75709,70781,62857 +73,94651,6413 +99429,82150,93773 +17015,7352,53564 +12894,65112,78059 +60667,1567,46226 +91602,90454,97232 +99986,83328,90790 +31065,93999,44044 +35184,68318,31056 +97683,9942,63405 +7524,32850,47161 +53342,49669,20000 +65223,87955,20695 +24258,27371,20674 +71372,94989,70724 +61752,74817,42517 +63831,36378,66390 +85477,5932,35919 +2042,79853,27668 +99932,23933,62507 +89409,90415,49439 +60269,51387,62598 +35582,42365,10855 +91539,74295,99177 +4814,43561,89967 +64301,72172,88144 +88779,47555,96370 +22546,51102,34586 +3328,37824,60349 +15250,55210,60511 +454,51354,22646 +74801,83174,78559 +16102,70044,72195 +27547,35881,10468 +97603,18058,54590 +95591,29006,24516 +66328,66906,33024 +83869,33890,29359 +48890,41596,94897 +44290,99910,38799 +76304,27090,26845 +86705,35655,50487 +98022,61089,38789 +29440,69082,60975 +84537,1746,39403 +98049,54868,39296 +72091,26419,56792 +37053,7223,49376 +3191,53131,33979 +89835,72125,75562 +84500,24743,76835 +95379,41367,28397 +55657,86421,90318 +64048,56838,58809 +11493,2808,97469 +33420,55429,30717 +38443,11003,46267 +52456,53852,3038 +53979,88518,19224 +87319,72681,43608 +79346,23820,83578 +50604,34497,54061 +2278,46518,50230 +37427,52064,45824 +17321,92118,41302 +50225,77322,87281 +86026,81818,67936 +8793,49424,23545 +97023,40594,55508 +11561,10185,92145 +42008,91562,84419 +94537,64716,55396 +47374,98610,14808 +96950,38713,10261 +78842,14134,74417 +12883,38163,79526 +25608,42212,75575 +4165,81611,56490 +82004,85192,96937 +64736,59610,35537 +83241,44030,99894 +17811,78618,69340 +39032,3632,12329 +68074,10473,19569 +39767,88227,93286 +20931,82972,70785 +99254,11330,10784 +51614,22148,38918 +90858,88083,47435 +96788,55787,34428 +62823,15427,36686 +45685,31145,97306 +20532,11822,63261 +28457,99537,45403 +24578,37844,70784 +22261,3691,23982 +57638,4816,83438 +48692,8074,32036 +65568,12273,52468 +3722,81378,82560 +99888,5628,57358 +94955,18870,46801 +21410,72046,89558 +12668,19961,13334 +68649,57434,44119 +51085,57403,17495 +32769,30628,11217 +89459,67815,7511 +64566,38041,95395 +35172,69082,71803 +26635,66938,67204 +97204,90489,87430 +93129,70952,71392 +56985,19097,7979 +42594,40408,86642 +77530,24865,87913 +42066,57498,30910 +51140,77040,89049 +93458,57793,86308 +78587,9838,31002 +29448,81919,78593 +34050,90524,3149 +10267,97158,93550 +76266,91226,53747 +61288,25596,87765 +81647,16296,28441 +39768,26433,64984 +12430,95993,35067 +84733,95578,44192 +68027,40240,30124 +41515,95599,85656 +4188,27302,41974 +93898,27608,19621 +80892,81696,20429 +47834,34751,39445 +1948,39888,249 +7130,63636,69541 +46862,73155,96228 +24871,77668,80896 +26566,5348,37526 +60347,27177,5682 +22454,19204,65992 +36373,21570,21753 +16705,44156,83428 +5550,5462,81856 +80383,68339,6383 +82896,75239,42150 +48383,87908,15311 +31846,66717,61674 +70786,63459,34095 +10563,41483,77831 +74160,41526,12533 +39863,82160,91708 +92837,68228,17957 +46315,7228,37586 +60840,65284,84974 +61174,16171,65629 +33557,29494,84577 +85493,61467,97343 +65713,62575,10267 +70691,92251,38826 +31414,24026,24656 +95385,43529,62687 +83115,87303,91233 +50899,26830,92680 +96600,30385,90494 +91660,12121,14728 +58463,18841,2305 +27269,54714,80042 +66048,54151,84539 +28129,69401,65902 +16189,60336,57865 +60274,98574,34045 +17613,43196,87174 +22384,28763,73952 +83695,13851,12901 +92935,76446,40107 +27284,64510,51604 +35004,62969,8026 +66635,4920,53188 +81197,65388,84751 +87217,38111,37708 +20783,66972,59867 +39826,30808,71170 +6900,50744,37651 +89098,63185,47627 +33544,40681,6875 +68407,17899,27625 +32236,21606,95136 +65264,44398,29772 +76890,63271,36940 +9777,66248,96222 +25462,62277,20310 +60047,96152,61842 +96206,61847,30409 +45237,48083,54146 +48575,89169,3916 +42558,36934,40233 +65276,62118,61554 +12984,26522,2349 +55274,49999,46720 +36670,84868,47574 +54904,76400,54784 +88629,61920,73546 +92243,632,57739 +66421,42083,20220 +17342,26149,4596 +11147,29190,75022 +97506,50539,14242 +15923,55921,86859 +69197,18385,88850 +36852,51971,35985 +45242,47842,19891 +92465,59176,14734 +29040,33088,16188 +28938,27528,7217 +18728,19540,57672 +69594,95399,61760 +84019,7542,4052 +43477,32722,62568 +23474,17914,63001 +1397,75191,41277 +76199,64052,79653 +59839,29562,44595 +25753,46861,79474 +49201,42014,80072 +27270,77998,41413 +44849,16662,20832 +33431,93463,62851 +84227,87908,53697 +20893,50961,3463 +72805,5535,46804 +88212,87982,1121 +65498,38231,9838 +81932,5422,87226 +89060,48346,54718 +63504,52016,59120 +39013,93125,52108 +56012,12901,23480 +99535,73556,36919 +53246,31909,58343 +71989,63180,46813 +81508,37686,69468 +79818,72506,96149 +15900,17950,77880 +24887,83070,49946 +15752,46783,98812 +76650,54623,69847 +62304,13872,57053 +10862,49625,87683 +47371,2280,7260 +40133,54272,9379 +95068,69135,49506 +71554,46076,27192 +22514,67237,28082 +2582,56538,33710 +34144,26791,77071 +31111,84657,61716 +40520,62287,83671 +53648,79108,44143 +34682,44831,94262 +45453,60239,23207 +95421,27228,89969 +31684,91769,38660 +51751,66106,25772 +94533,88982,36164 +56075,68467,43985 +92800,33894,83086 +32951,1639,47737 +18257,78349,55911 +26300,89727,13089 +33904,87562,31341 +66801,72722,65891 +75084,70287,11946 +70625,59179,33850 +43280,57269,88902 +41400,23399,73899 +25626,59968,80901 +74465,23487,56634 +90351,30825,71018 +16918,31130,70004 +50498,68950,62589 +14591,81038,95805 +63096,11644,79215 +40660,35214,28850 +18683,68520,10690 +54146,70348,80384 +18838,18429,97504 +45006,96633,59873 +20382,49901,96893 +77497,83063,35835 +44904,74,25364 +93439,83181,47937 +68361,19857,57725 +84040,19245,74558 +59457,73427,63283 +15011,20915,86133 +98073,42059,35553 +15036,28323,33825 +14409,6418,2807 +90707,85105,25933 +88166,99286,38279 +28976,16252,66907 +881,2517,26361 +33960,91061,99827 +48481,12810,69030 +79383,57566,46203 +75420,91062,72101 +81128,56847,40176 +77805,690,10324 +93399,91484,64566 +43654,85405,97611 +86837,57428,23330 +35681,42787,41674 +45978,23598,66275 +34324,74137,18967 +31416,73483,30795 +33023,19697,56844 +29397,71910,52126 +91664,33537,27103 +19024,21513,11969 +24857,4246,71703 +23453,66868,70023 +86153,11530,7831 +20419,82691,10302 +19309,16145,31484 +42070,4559,43981 +8942,92286,99974 +79346,49076,90413 +90584,4292,42115 +19131,47528,62674 +98357,80198,92641 +65012,26842,9042 +4541,24792,97837 +58498,41494,12826 +59821,58666,72266 +53340,88423,37736 +42785,20264,97307 +27176,2883,731 +59646,90886,7449 +39979,2621,80989 +44548,46581,7421 +77956,29143,37446 +92943,66961,4942 +20362,84762,9085 +84003,19135,81838 +10459,9653,28046 +74546,76272,83987 +62501,39408,62941 +57984,39932,21711 +40537,36664,56591 +8107,30053,20697 +13351,11216,44203 +51480,17619,18992 +95667,81705,43542 +67631,29059,85419 +52555,50528,19947 +98870,58786,82397 +80290,39374,5613 +60068,30189,47849 +1738,45610,83370 +667,37419,96745 +42093,17296,67889 +70592,76499,76851 +54763,73736,46039 +43788,4282,51582 +4737,81257,29971 +37743,68070,10448 +6757,87539,33600 +11701,23301,23996 +68510,84524,92487 +49177,26227,72466 +36098,65998,53729 +64062,5030,7649 +42777,35963,62565 +41510,29393,89118 +9817,36168,82381 diff --git a/inputs/input8_test b/inputs/input8_test new file mode 100644 index 0000000..20c6fd2 --- /dev/null +++ b/inputs/input8_test @@ -0,0 +1,20 @@ +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 \ No newline at end of file