From 3a37ea61c6b83fc84fcf3369c77c399a91fd9759 Mon Sep 17 00:00:00 2001 From: Neil Smith Date: Wed, 20 Dec 2017 17:06:09 +0000 Subject: [PATCH] Day 20 --- advent-of-code.cabal | 10 + data/advent20.txt | 1000 +++++++++++++++++++++++++++++++++++ problems/day20.html | 173 ++++++ src/advent20/advent20.hs | 121 +++++ src/advent20/advent20.ipynb | 991 ++++++++++++++++++++++++++++++++++ 5 files changed, 2295 insertions(+) create mode 100644 data/advent20.txt create mode 100644 problems/day20.html create mode 100644 src/advent20/advent20.hs create mode 100644 src/advent20/advent20.ipynb diff --git a/advent-of-code.cabal b/advent-of-code.cabal index fbfac7d..e2dd2a8 100644 --- a/advent-of-code.cabal +++ b/advent-of-code.cabal @@ -209,3 +209,13 @@ executable advent19 main-is: advent19.hs default-language: Haskell2010 build-depends: base >= 4.7 && < 5 + +executable advent20 + hs-source-dirs: src/advent20 + main-is: advent20.hs + default-language: Haskell2010 + build-depends: base >= 4.7 && < 5 + , containers + , text + , megaparsec + , vector diff --git a/data/advent20.txt b/data/advent20.txt new file mode 100644 index 0000000..011172a --- /dev/null +++ b/data/advent20.txt @@ -0,0 +1,1000 @@ +p=<-833,-499,-1391>, v=<84,17,61>, a=<-4,1,1> +p=<-168,3586,-2721>, v=<-61,-58,61>, a=<7,-13,8> +p=<364,223,1877>, v=<31,-11,-71>, a=<-5,0,-3> +p=<769,-854,-8705>, v=<-20,4,64>, a=<0,1,9> +p=<6985,-3666,3653>, v=<-112,99,-23>, a=<-4,0,-4> +p=<7688,-2445,1026>, v=<-55,66,-142>, a=<-8,0,6> +p=<7281,-151,-5042>, v=<-177,99,41>, a=<-1,-5,5> +p=<-2191,71,1322>, v=<174,17,-93>, a=<-6,-1,3> +p=<1509,2624,-5338>, v=<-40,5,-8>, a=<0,-4,8> +p=<1213,5658,175>, v=<120,-39,-119>, a=<-8,-6,6> +p=<621,-6996,-7410>, v=<117,113,-9>, a=<-7,4,11> +p=<5468,6435,-787>, v=<-33,-3,21>, a=<-6,-9,0> +p=<-489,5399,-5375>, v=<-81,-32,-83>, a=<5,-6,12> +p=<2591,1300,629>, v=<-103,-48,44>, a=<-5,-3,-9> +p=<-44,-1216,-2499>, v=<-2,73,93>, a=<1,0,6> +p=<-129,773,-272>, v=<21,-44,-20>, a=<-1,0,4> +p=<-2033,790,-289>, v=<88,-27,-82>, a=<4,-2,11> +p=<-10,3459,-748>, v=<5,-121,35>, a=<0,-9,1> +p=<-2016,-978,-408>, v=<69,14,-57>, a=<6,5,9> +p=<-1472,1419,782>, v=<82,-28,-73>, a=<1,-6,3> +p=<-2262,1939,268>, v=<-49,75,47>, a=<6,-7,-3> +p=<348,-3515,5362>, v=<8,97,-150>, a=<-1,0,0> +p=<7872,7213,10510>, v=<-53,21,3>, a=<-9,-12,-16> +p=<942,229,1456>, v=<-27,-44,-23>, a=<0,2,-1> +p=<519,3012,1233>, v=<-58,-115,-62>, a=<3,-11,-2> +p=<264,-48,-987>, v=<7,-47,14>, a=<-3,6,7> +p=<39,1497,-192>, v=<-10,-54,41>, a=<1,-6,-3> +p=<309,-3558,-1647>, v=<28,139,74>, a=<-6,12,5> +p=<1881,-7333,4674>, v=<-12,59,9>, a=<-3,11,-10> +p=<-3513,1502,-1774>, v=<130,46,57>, a=<-1,-6,0> +p=<10437,13809,2349>, v=<-80,-143,-12>, a=<-16,-19,-4> +p=<802,125,1425>, v=<-81,-70,-113>, a=<4,7,3> +p=<190,-3394,1153>, v=<27,164,-52>, a=<-4,4,-2> +p=<-371,720,-2706>, v=<24,-24,139>, a=<0,-2,2> +p=<3,-708,218>, v=<-16,-3,-15>, a=<2,5,0> +p=<20,-1388,932>, v=<-35,118,-57>, a=<4,-4,0> +p=<-2394,-827,677>, v=<-1,-14,-24>, a=<16,7,-2> +p=<428,669,-921>, v=<31,-66,52>, a=<-6,3,0> +p=<496,-1099,-224>, v=<27,92,29>, a=<-6,-3,-2> +p=<-405,-2544,-2638>, v=<44,105,90>, a=<-2,5,7> +p=<-677,295,2547>, v=<42,-26,-8>, a=<0,1,-16> +p=<-1893,-2194,-216>, v=<66,45,45>, a=<9,15,-4> +p=<-2257,382,-2610>, v=<152,-19,81>, a=<1,-1,14> +p=<620,1222,141>, v=<-46,-64,-78>, a=<0,-3,9> +p=<200,886,701>, v=<14,-70,2>, a=<-4,1,-7> +p=<-815,-87,-531>, v=<19,-38,105>, a=<5,6,-9> +p=<2262,-790,1231>, v=<-121,81,-16>, a=<0,-4,-5> +p=<-1120,-2538,-99>, v=<-3,53,-16>, a=<6,8,2> +p=<-256,3019,-787>, v=<-30,-24,-18>, a=<4,-11,5> +p=<-802,-2441,1418>, v=<-37,115,75>, a=<7,0,-13> +p=<3419,-908,809>, v=<4,-2,-28>, a=<-15,4,-1> +p=<-634,373,2657>, v=<-12,3,-72>, a=<4,-2,-5> +p=<-214,-2252,683>, v=<100,40,22>, a=<-8,6,-5> +p=<17,-572,1775>, v=<56,26,3>, a=<-5,0,-8> +p=<1403,4867,578>, v=<-32,-57,-61>, a=<-3,-16,3> +p=<-1096,4867,935>, v=<-23,-57,10>, a=<7,-16,-5> +p=<-4750,-1076,95>, v=<140,50,-115>, a=<8,0,10> +p=<-1453,-614,-619>, v=<126,-60,29>, a=<-5,8,0> +p=<2433,-2706,3506>, v=<74,74,-116>, a=<-10,1,0> +p=<-207,-1806,2921>, v=<7,-80,43>, a=<0,9,-9> +p=<-2337,-1311,-2239>, v=<47,43,-33>, a=<2,0,7> +p=<4833,3084,-3379>, v=<-68,67,67>, a=<-6,-11,3> +p=<2575,-2395,-3713>, v=<-105,-9,103>, a=<-1,10,6> +p=<1277,4975,-666>, v=<-69,-160,-47>, a=<1,-6,7> +p=<3147,80,-1502>, v=<-131,28,-55>, a=<-1,-3,11> +p=<2025,3369,907>, v=<-126,5,-38>, a=<3,-14,0> +p=<-2533,-2136,-6908>, v=<16,-26,171>, a=<6,8,7> +p=<925,4559,-3710>, v=<-63,-54,102>, a=<2,-9,3> +p=<-492,-8181,-3047>, v=<-22,85,90>, a=<3,17,2> +p=<-1259,-2552,346>, v=<48,-91,-54>, a=<0,14,3> +p=<1861,-3072,-6427>, v=<-18,-17,58>, a=<-4,10,14> +p=<379,2323,-4399>, v=<-96,59,88>, a=<6,-11,6> +p=<1588,-4840,-3177>, v=<-48,78,14>, a=<-1,8,8> +p=<-1038,-264,-278>, v=<53,-44,159>, a=<-1,4,-11> +p=<808,3220,-512>, v=<-18,-97,87>, a=<-1,-2,-5> +p=<-638,6801,4430>, v=<19,80,-43>, a=<0,-16,-5> +p=<10446,1786,1132>, v=<-97,-35,-16>, a=<-12,-1,-1> +p=<-710,-239,-516>, v=<38,-28,-33>, a=<1,6,9> +p=<-297,1497,2053>, v=<61,-92,-134>, a=<-6,-2,-2> +p=<2447,-841,-957>, v=<-75,45,66>, a=<-14,2,0> +p=<1740,139,562>, v=<13,-25,-50>, a=<-19,2,1> +p=<-402,937,-600>, v=<16,-7,-12>, a=<1,-8,7> +p=<-1564,1518,884>, v=<24,19,-88>, a=<11,-17,3> +p=<-87,-645,-362>, v=<-29,-29,-14>, a=<4,10,5> +p=<354,-715,-40>, v=<-38,96,-67>, a=<1,-6,9> +p=<2664,2204,765>, v=<-188,-75,-72>, a=<-1,-11,2> +p=<-3106,3879,-4272>, v=<104,-34,139>, a=<-1,-4,-1> +p=<-6094,-5859,-9726>, v=<39,107,13>, a=<7,3,14> +p=<-8668,801,5898>, v=<-19,-4,23>, a=<14,-1,-10> +p=<368,532,808>, v=<-67,-131,-44>, a=<6,15,-6> +p=<-417,92,493>, v=<28,12,-62>, a=<3,-3,3> +p=<1218,-1663,1788>, v=<-108,127,-175>, a=<-2,8,0> +p=<108,592,823>, v=<36,-82,-51>, a=<-8,5,-5> +p=<-1062,792,118>, v=<109,-69,36>, a=<0,-1,-8> +p=<313,117,-1407>, v=<10,-40,84>, a=<-7,6,11> +p=<2526,-4412,2808>, v=<-97,88,29>, a=<1,3,-7> +p=<-6258,-604,-3064>, v=<95,2,64>, a=<6,1,2> +p=<-4866,-3788,872>, v=<68,-80,40>, a=<5,12,-4> +p=<3406,1380,632>, v=<24,6,130>, a=<-8,-3,-9> +p=<-8898,-3356,3192>, v=<62,154,83>, a=<13,-3,-11> +p=<3852,-267,1655>, v=<0,12,-95>, a=<-14,0,2> +p=<793,1021,344>, v=<-59,-8,-26>, a=<2,-3,1> +p=<1230,9,-3313>, v=<18,24,13>, a=<-6,-2,11> +p=<-5808,-1279,574>, v=<48,68,12>, a=<17,-1,-3> +p=<972,-346,1421>, v=<38,14,-36>, a=<-5,0,-1> +p=<4290,4120,259>, v=<-8,-15,-38>, a=<-10,-9,2> +p=<-5510,-948,-2233>, v=<-6,79,22>, a=<14,-3,4> +p=<3394,2258,2611>, v=<-34,66,81>, a=<-6,-10,-12> +p=<2512,-3034,3045>, v=<-17,110,-36>, a=<-5,0,-5> +p=<-5482,1040,1183>, v=<80,-21,-42>, a=<8,-1,0> +p=<2988,-7738,-3675>, v=<53,133,1>, a=<-11,10,9> +p=<3842,4568,2849>, v=<37,27,29>, a=<-12,-13,-9> +p=<-6014,2454,-805>, v=<-17,-57,29>, a=<16,-2,0> +p=<-8408,-850,-203>, v=<112,-84,22>, a=<13,8,-1> +p=<1079,-2814,-212>, v=<59,22,36>, a=<-7,6,-2> +p=<3806,2478,-131>, v=<42,-48,-121>, a=<-13,-3,9> +p=<3779,2532,-995>, v=<-55,62,65>, a=<-6,-11,-2> +p=<2024,2721,-536>, v=<-74,-15,-78>, a=<0,-6,7> +p=<2537,4260,-2615>, v=<-65,-2,69>, a=<-2,-11,2> +p=<-919,534,4513>, v=<-63,24,-111>, a=<7,-3,-4> +p=<-3446,8037,9158>, v=<77,-2,-125>, a=<1,-12,-7> +p=<4942,-1503,-2128>, v=<-8,78,-52>, a=<-7,-2,6> +p=<1252,-2259,13568>, v=<-35,62,-81>, a=<0,0,-16> +p=<-1592,1593,1256>, v=<7,-45,-72>, a=<2,0,2> +p=<-4184,3213,-13882>, v=<116,-90,145>, a=<0,0,13> +p=<-6938,2781,-8662>, v=<-11,-41,-37>, a=<11,-2,15> +p=<8362,-1197,8888>, v=<-103,-60,-25>, a=<-7,5,-12> +p=<-3248,-387,-12442>, v=<-58,84,142>, a=<8,-4,11> +p=<3731,-1805,-652>, v=<-101,-67,43>, a=<-6,13,-1> +p=<-2935,-4500,1823>, v=<110,67,-58>, a=<2,12,-2> +p=<-427,-1035,-3457>, v=<-4,-79,90>, a=<2,11,6> +p=<4248,4487,1218>, v=<-90,-8,4>, a=<-9,-17,-5> +p=<-955,-980,-146>, v=<-118,114,43>, a=<14,-6,-3> +p=<-4937,-1970,767>, v=<63,21,36>, a=<14,6,-6> +p=<2070,-1937,-4645>, v=<32,77,190>, a=<-11,1,2> +p=<-3826,-683,-3908>, v=<139,-26,99>, a=<3,5,7> +p=<-3444,-3030,-2594>, v=<45,15,-105>, a=<3,4,10> +p=<2996,2920,-2244>, v=<-175,-65,119>, a=<5,-1,-3> +p=<4988,9764,-12441>, v=<-128,-91,98>, a=<0,-8,11> +p=<8654,3719,-10530>, v=<-142,44,89>, a=<-4,-7,9> +p=<-1486,-5329,3276>, v=<18,136,75>, a=<1,0,-8> +p=<3194,-1663,-2652>, v=<-82,2,87>, a=<0,2,-1> +p=<-5971,3017,11661>, v=<-107,2,-20>, a=<13,-4,-14> +p=<-8857,4343,4836>, v=<147,8,55>, a=<4,-6,-9> +p=<-628,-9346,1131>, v=<36,-1,10>, a=<-1,12,-2> +p=<-4138,4967,-4017>, v=<-54,32,82>, a=<8,-8,1> +p=<5768,3563,-4836>, v=<-108,-52,63>, a=<-2,-2,3> +p=<14933,-688,2418>, v=<-123,-43,17>, a=<-13,3,-4> +p=<7224,-3092,-808>, v=<-33,112,43>, a=<-11,-1,-1> +p=<3429,-518,-8893>, v=<14,-17,67>, a=<-7,2,12> +p=<199,1711,-191>, v=<-15,-124,96>, a=<0,-3,-12> +p=<-1079,997,805>, v=<111,-84,-13>, a=<-3,0,-8> +p=<-935,-299,-1523>, v=<47,76,116>, a=<5,-8,2> +p=<325,-1187,1867>, v=<-58,85,-108>, a=<5,2,-7> +p=<-1697,1141,-1187>, v=<130,-161,179>, a=<2,10,-12> +p=<859,-671,-1133>, v=<-96,29,51>, a=<4,4,7> +p=<595,-3438,-4651>, v=<-21,165,79>, a=<0,-3,6> +p=<63,-2794,-3615>, v=<-2,-61,-45>, a=<0,11,12> +p=<679,1588,-1263>, v=<63,0,16>, a=<-6,-4,2> +p=<875,-1758,-2159>, v=<-31,76,-68>, a=<0,-1,10> +p=<-2219,-708,-535>, v=<-80,53,-68>, a=<11,-2,6> +p=<2499,-330,7151>, v=<-60,-120,-67>, a=<-2,9,-13> +p=<-1155,846,1047>, v=<-31,12,6>, a=<5,-3,-3> +p=<-7454,-5579,4859>, v=<16,11,73>, a=<16,12,-16> +p=<-88,-185,3757>, v=<92,-10,-84>, a=<-6,1,-3> +p=<-1016,-3781,-3377>, v=<-86,114,102>, a=<8,1,1> +p=<-1828,1642,1727>, v=<-43,-88,31>, a=<7,2,-6> +p=<-88,1700,-42>, v=<92,30,-28>, a=<-6,-6,2> +p=<1594,1816,3322>, v=<-26,56,36>, a=<-2,-8,-10> +p=<-7793,5931,-1780>, v=<-51,34,-3>, a=<20,-15,4> +p=<-383,1566,-1735>, v=<-19,40,-20>, a=<2,-6,5> +p=<-2453,-2289,-3250>, v=<19,29,-16>, a=<4,3,8> +p=<-863,4146,1400>, v=<28,-108,-47>, a=<0,-2,0> +p=<-1793,5091,-2500>, v=<90,-124,145>, a=<-2,-3,-4> +p=<982,4641,-4600>, v=<-80,-47,29>, a=<3,-7,8> +p=<1147,3711,-3430>, v=<23,77,114>, a=<-4,-13,0> +p=<3382,6531,1490>, v=<-160,-141,12>, a=<3,-5,-4> +p=<-5005,12388,3235>, v=<8,3,-163>, a=<6,-16,4> +p=<1937,-560,-1952>, v=<-30,-105,-30>, a=<-1,6,4> +p=<-1183,-1067,10450>, v=<-50,28,-148>, a=<4,0,-6> +p=<-286,10087,8734>, v=<27,-138,-44>, a=<-1,-6,-9> +p=<-2080,-677,5926>, v=<-7,-22,-52>, a=<3,2,-5> +p=<-6136,7591,5614>, v=<-43,6,-64>, a=<10,-10,-4> +p=<5213,2911,115>, v=<6,-14,37>, a=<-7,-3,-2> +p=<4667,-1067,-4994>, v=<-180,-12,-12>, a=<3,2,7> +p=<7709,7552,-6320>, v=<-58,-33,42>, a=<-7,-8,6> +p=<9932,-14,-1601>, v=<65,-99,61>, a=<-16,5,-1> +p=<1482,689,-1116>, v=<-56,-9,100>, a=<-3,-3,-4> +p=<1257,-1435,1944>, v=<-53,-24,-70>, a=<-2,11,-4> +p=<11,1170,2140>, v=<-1,27,-52>, a=<0,-4,-1> +p=<-857,4983,8092>, v=<27,-112,-116>, a=<0,-3,-9> +p=<-51,1418,-2014>, v=<1,51,-14>, a=<0,-6,5> +p=<1840,-2395,3287>, v=<100,-34,-41>, a=<-10,7,-4> +p=<7172,-4534,1644>, v=<-104,3,-196>, a=<-8,9,9> +p=<3793,1108,-2386>, v=<-59,-35,-18>, a=<-4,0,6> +p=<4940,5324,-3099>, v=<-64,-123,5>, a=<-6,-3,6> +p=<693,-1000,-2448>, v=<-87,-15,128>, a=<4,3,-3> +p=<2305,-70,1985>, v=<37,-13,81>, a=<-7,1,-9> +p=<415,68,-1398>, v=<-25,-13,98>, a=<0,1,-2> +p=<687,816,-1415>, v=<13,51,81>, a=<-6,-11,0> +p=<653,0,-769>, v=<-39,-36,52>, a=<0,4,-1> +p=<-2543,1615,744>, v=<167,-104,53>, a=<-2,1,-11> +p=<1180,1717,-2350>, v=<-34,-38,82>, a=<-4,-7,6> +p=<2778,1700,-2231>, v=<-155,26,174>, a=<-1,-14,-5> +p=<-2653,3627,-1955>, v=<90,35,-99>, a=<-1,-7,8> +p=<-1765,-9323,-4693>, v=<9,138,-44>, a=<2,6,9> +p=<11296,704,3003>, v=<-40,-133,-5>, a=<-14,6,-4> +p=<4155,-5660,-5840>, v=<-113,115,44>, a=<0,2,6> +p=<9890,7845,-7875>, v=<-78,-41,118>, a=<-10,-9,5> +p=<-5798,-3292,9367>, v=<42,-6,-63>, a=<6,5,-10> +p=<-766,-184,857>, v=<-94,-71,72>, a=<6,4,-5> +p=<10704,-1479,709>, v=<-24,-74,114>, a=<-14,6,-7> +p=<5675,-39,-2630>, v=<-11,-72,-112>, a=<-8,4,10> +p=<4289,4731,1150>, v=<46,-112,-32>, a=<-9,-1,0> +p=<-1813,-28,85>, v=<-54,-59,17>, a=<5,3,-1> +p=<6026,10931,280>, v=<5,-80,32>, a=<-8,-10,-2> +p=<6455,2585,-4673>, v=<-26,-46,-101>, a=<-7,-1,11> +p=<-5479,713,-7130>, v=<120,2,-38>, a=<1,-1,11> +p=<-6844,6407,-539>, v=<-5,-84,13>, a=<9,-4,0> +p=<-7819,14636,-7832>, v=<80,-55,20>, a=<6,-16,9> +p=<-19,-6814,-3308>, v=<40,155,4>, a=<-2,1,4> +p=<2672,8474,1957>, v=<31,-57,-71>, a=<-5,-8,1> +p=<1426,-9028,-713>, v=<-33,129,9>, a=<-1,11,1> +p=<5296,6047,2827>, v=<24,14,-78>, a=<-13,-14,-1> +p=<-11762,3422,-6437>, v=<171,-67,109>, a=<11,-2,5> +p=<-14963,4181,-2972>, v=<98,114,21>, a=<21,-14,4> +p=<3398,2476,3910>, v=<-84,-108,112>, a=<-1,2,-13> +p=<-6207,827,-4301>, v=<-64,-7,-49>, a=<14,-1,10> +p=<5132,-9475,425>, v=<-65,86,57>, a=<-5,11,-4> +p=<2588,525,-602>, v=<-35,-69,-21>, a=<-15,4,7> +p=<-444,1181,-1962>, v=<-7,-59,64>, a=<4,-2,7> +p=<-1812,-1691,-2050>, v=<104,44,27>, a=<1,7,12> +p=<-1756,-851,-2610>, v=<92,17,62>, a=<2,4,12> +p=<1524,645,1982>, v=<-130,-68,-55>, a=<4,3,-8> +p=<-228,-1843,358>, v=<22,113,38>, a=<-1,0,-7> +p=<-1796,709,-1426>, v=<35,-4,-12>, a=<9,-5,12> +p=<36,2301,-42>, v=<-37,-95,46>, a=<4,-6,-5> +p=<2460,925,1254>, v=<7,-9,-120>, a=<-19,-6,5> +p=<4431,-1315,-1309>, v=<-43,107,15>, a=<-17,-4,5> +p=<-99,3095,-449>, v=<-37,-40,14>, a=<4,-11,1> +p=<961,-1355,1541>, v=<-48,25,-33>, a=<0,4,-4> +p=<1411,-445,1381>, v=<-39,53,-25>, a=<-3,-3,-4> +p=<-272,-665,90>, v=<74,92,16>, a=<-7,-6,-3> +p=<-2117,610,-675>, v=<29,-113,-5>, a=<14,9,6> +p=<283,2320,945>, v=<109,-19,-41>, a=<-16,-17,-3> +p=<-1217,-1385,-30>, v=<129,52,-8>, a=<-6,5,1> +p=<-47,445,30>, v=<-77,82,28>, a=<10,-14,-4> +p=<-644,-5230,-1865>, v=<-123,85,-36>, a=<10,7,7> +p=<-4494,8840,3343>, v=<145,-84,-135>, a=<1,-16,1> +p=<-5306,-890,-2341>, v=<0,-12,-77>, a=<13,3,11> +p=<1417,99,2452>, v=<-17,100,-149>, a=<-3,-8,4> +p=<767,1374,3552>, v=<22,-16,-102>, a=<-4,-3,-3> +p=<542,1874,377>, v=<44,16,-105>, a=<-5,-7,7> +p=<708,1037,-4669>, v=<4,-13,96>, a=<-4,-4,15> +p=<-1040,-1927,-3377>, v=<56,33,68>, a=<0,7,11> +p=<2019,2519,1658>, v=<5,-21,-27>, a=<-11,-11,-6> +p=<1582,467,-2541>, v=<-62,17,134>, a=<-2,-4,0> +p=<-3491,1892,-3016>, v=<95,-98,69>, a=<9,0,9> +p=<-3282,2785,2304>, v=<104,-65,-31>, a=<7,-8,-9> +p=<-3529,-1072,917>, v=<77,68,-18>, a=<11,-1,-3> +p=<-394,-1699,4071>, v=<112,11,-104>, a=<-9,8,-11> +p=<-2883,2729,-570>, v=<137,-19,-84>, a=<0,-10,10> +p=<-531,-2416,-1704>, v=<25,61,47>, a=<0,5,3> +p=<3707,-2056,2383>, v=<-55,-22,-32>, a=<-6,7,-4> +p=<-6769,4235,-3665>, v=<95,-73,-4>, a=<11,-6,10> +p=<2060,779,-236>, v=<-64,-71,-61>, a=<-1,3,5> +p=<2978,-5296,9052>, v=<70,112,-139>, a=<-13,6,-14> +p=<5064,8105,8494>, v=<0,-14,-44>, a=<-8,-12,-11> +p=<7059,-9045,-46>, v=<-93,134,38>, a=<-6,7,-2> +p=<-326,-4145,5974>, v=<100,84,-26>, a=<-5,2,-8> +p=<-1166,3310,5064>, v=<16,-75,-90>, a=<1,-1,-3> +p=<-2819,-6760,-582>, v=<63,84,-103>, a=<3,12,9> +p=<1366,-2413,1038>, v=<20,63,75>, a=<-5,2,-8> +p=<1580,-377,3914>, v=<-86,29,-156>, a=<0,-1,-5> +p=<-1156,-3094,-437>, v=<58,92,-17>, a=<0,7,4> +p=<630,1219,-874>, v=<14,-5,-4>, a=<-5,-6,5> +p=<1409,-2999,-1900>, v=<-97,67,60>, a=<2,9,4> +p=<-1764,573,95>, v=<50,-11,95>, a=<4,-2,-10> +p=<-1935,-719,-1596>, v=<69,47,124>, a=<3,-1,-4> +p=<-5054,-3765,7287>, v=<58,132,-38>, a=<10,1,-18> +p=<146,-1685,5350>, v=<-34,-2,-112>, a=<2,5,-7> +p=<-5691,-216,709>, v=<-66,9,26>, a=<21,0,-4> +p=<5294,3554,280>, v=<-124,-109,29>, a=<-6,-2,-3> +p=<-3052,-1503,5909>, v=<116,-36,-66>, a=<0,7,-12> +p=<1147,-1971,4882>, v=<-86,63,-148>, a=<3,1,-3> +p=<3032,-476,-4660>, v=<-118,19,30>, a=<0,0,11> +p=<6880,1747,-2710>, v=<-23,-53,36>, a=<-18,-1,5> +p=<1916,1757,-626>, v=<20,-24,26>, a=<-8,-4,0> +p=<-4756,1985,-1862>, v=<198,4,-35>, a=<0,-7,9> +p=<-4768,125,-3782>, v=<-39,-6,-30>, a=<19,0,15> +p=<-2812,-4279,730>, v=<-83,65,-18>, a=<16,9,-1> +p=<6800,401,-2138>, v=<-171,20,-61>, a=<-9,-3,12> +p=<-3604,-1987,406>, v=<150,-43,-17>, a=<0,10,0> +p=<-784,-1015,-4082>, v=<20,129,-5>, a=<1,-7,14> +p=<-1828,1757,-1286>, v=<-149,1,41>, a=<18,-6,1> +p=<-239,3187,1315>, v=<-37,-97,-105>, a=<6,-12,3> +p=<249,-1405,-1861>, v=<-8,105,102>, a=<-1,-2,2> +p=<-327,-1629,475>, v=<79,0,75>, a=<-7,12,-12> +p=<897,3,-2845>, v=<-108,0,138>, a=<6,0,5> +p=<753,2179,299>, v=<105,-119,-67>, a=<-18,-2,6> +p=<1721,843,-301>, v=<-15,-27,81>, a=<-11,-3,-7> +p=<-5674,-5952,4901>, v=<129,78,-110>, a=<1,4,-1> +p=<1793,-4546,1994>, v=<-48,2,25>, a=<0,6,-4> +p=<-6833,5771,-267>, v=<-16,-16,-13>, a=<10,-7,1> +p=<1033,5828,4160>, v=<-67,2,46>, a=<2,-8,-8> +p=<3693,-383,1623>, v=<-118,-65,-194>, a=<-9,9,11> +p=<345,-1148,-2598>, v=<-27,-70,12>, a=<1,14,14> +p=<-546,922,1461>, v=<89,5,62>, a=<-6,-6,-15> +p=<687,-3965,-744>, v=<-27,77,-34>, a=<-1,15,8> +p=<-942,-2003,2514>, v=<16,63,-63>, a=<4,5,-8> +p=<-60,2227,417>, v=<-14,-153,25>, a=<2,3,-5> +p=<444,-554,588>, v=<-42,-65,-70>, a=<2,10,4> +p=<-1806,-788,3000>, v=<64,5,-128>, a=<4,4,-4> +p=<1677,-4028,-519>, v=<-63,166,20>, a=<-3,6,1> +p=<786,535,-1968>, v=<72,-78,72>, a=<-12,5,4> +p=<-1029,1045,-2896>, v=<2,11,154>, a=<4,-5,-2> +p=<1336,935,173>, v=<-2,-30,95>, a=<-5,-1,-9> +p=<4654,-1524,660>, v=<-44,72,-26>, a=<-10,-1,0> +p=<-1625,1466,-2174>, v=<76,-70,-52>, a=<-1,1,10> +p=<-1014,-6008,12961>, v=<46,59,-29>, a=<-1,5,-16> +p=<2425,-403,1067>, v=<-64,9,-67>, a=<0,0,2> +p=<11488,5278,-7236>, v=<-10,35,-63>, a=<-15,-9,13> +p=<-197,-726,9313>, v=<-34,76,-11>, a=<2,-3,-12> +p=<-4339,-707,10491>, v=<114,95,-120>, a=<0,-4,-8> +p=<-4852,-4393,-7027>, v=<69,36,29>, a=<3,4,8> +p=<-13193,-5001,326>, v=<35,52,50>, a=<16,4,-3> +p=<10785,-7965,5475>, v=<-167,13,-27>, a=<-6,10,-6> +p=<8087,-156,-9687>, v=<-57,-17,-18>, a=<-8,1,14> +p=<5311,1364,-4493>, v=<-117,9,15>, a=<-5,-4,10> +p=<-1535,4276,3711>, v=<55,-66,-133>, a=<0,-6,0> +p=<-4307,-1380,967>, v=<-49,136,-180>, a=<14,-6,10> +p=<4107,2988,-4843>, v=<-132,-20,-16>, a=<-1,-6,13> +p=<-106,-18,-2952>, v=<-145,-18,24>, a=<15,2,13> +p=<-1987,191,-2686>, v=<124,51,90>, a=<-2,-6,5> +p=<1262,1236,601>, v=<13,-44,-43>, a=<-8,-2,1> +p=<1224,932,4078>, v=<-65,-18,-96>, a=<0,-3,-12> +p=<3143,400,-140>, v=<-6,50,-4>, a=<-16,-7,1> +p=<4359,-1500,50>, v=<-110,140,-34>, a=<-12,-6,3> +p=<-1265,1312,4268>, v=<-24,-38,-96>, a=<9,-3,-13> +p=<768,2262,-1223>, v=<-11,-148,73>, a=<-3,3,-1> +p=<3641,3799,-4840>, v=<-72,134,90>, a=<-2,-14,3> +p=<-6321,-774,-1066>, v=<11,6,14>, a=<10,1,1> +p=<-7902,3272,753>, v=<40,-8,83>, a=<11,-5,-6> +p=<-7188,-3511,430>, v=<89,174,5>, a=<7,-4,-1> +p=<224,10225,-3820>, v=<11,-55,-115>, a=<-1,-14,13> +p=<-4434,-1318,685>, v=<-132,57,15>, a=<15,-1,-2> +p=<513,-1845,6210>, v=<-50,-50,-25>, a=<2,6,-9> +p=<694,4542,2375>, v=<-38,-120,-122>, a=<1,-1,3> +p=<265,-7470,1022>, v=<60,74,72>, a=<-4,9,-6> +p=<1948,3651,6995>, v=<9,-42,-41>, a=<-4,-4,-10> +p=<-3596,-2652,3629>, v=<-10,47,-109>, a=<7,2,0> +p=<6502,7941,3728>, v=<-61,-2,-61>, a=<-8,-14,-3> +p=<-758,6357,-2278>, v=<40,97,-15>, a=<-1,-17,5> +p=<-4949,-2916,2177>, v=<65,123,-99>, a=<5,-2,2> +p=<3466,978,2705>, v=<14,-148,4>, a=<-7,7,-5> +p=<-2870,-5655,3398>, v=<87,-83,-17>, a=<0,15,-5> +p=<13201,879,4322>, v=<-94,-26,-45>, a=<-18,0,-5> +p=<3501,2002,6330>, v=<-32,90,-115>, a=<-9,-14,-12> +p=<-5835,634,3390>, v=<7,-28,-80>, a=<19,0,-5> +p=<753,-710,-750>, v=<20,3,-95>, a=<-4,2,10> +p=<3585,-4550,-5310>, v=<2,13,-5>, a=<-12,14,18> +p=<-295,562,-8829>, v=<-15,-51,158>, a=<2,2,15> +p=<1505,-1688,2896>, v=<17,-39,-25>, a=<-6,8,-7> +p=<-3895,87,571>, v=<103,20,94>, a=<4,-2,-9> +p=<2280,-1763,-29>, v=<-14,-23,27>, a=<-6,7,-2> +p=<2755,-3738,-2429>, v=<-59,-22,97>, a=<-4,13,0> +p=<-2095,-538,1746>, v=<83,45,-5>, a=<0,-2,-5> +p=<-745,2712,-1629>, v=<-23,-137,65>, a=<4,2,0> +p=<-5795,4862,6121>, v=<166,-67,-128>, a=<5,-10,-9> +p=<-443,1290,2766>, v=<-35,-95,-104>, a=<9,0,-12> +p=<369,-1041,57>, v=<-78,94,52>, a=<7,-3,-7> +p=<607,-362,2850>, v=<-20,-37,-95>, a=<-3,8,-14> +p=<-394,-621,-167>, v=<-46,4,8>, a=<10,5,1> +p=<-1034,8022,2236>, v=<0,-51,-5>, a=<3,-19,-6> +p=<1553,-714,1118>, v=<-32,-12,173>, a=<-2,3,-16> +p=<-5129,-1871,1014>, v=<-18,46,-39>, a=<16,2,0> +p=<1882,457,-2228>, v=<-4,-45,66>, a=<-21,2,15> +p=<504,-1337,-2033>, v=<-10,16,156>, a=<-5,13,0> +p=<-523,-310,2569>, v=<111,7,-142>, a=<-11,3,-8> +p=<49,-401,918>, v=<46,-42,-15>, a=<-8,11,-8> +p=<1193,-2689,1022>, v=<-28,204,-114>, a=<-10,1,5> +p=<-1316,-1610,996>, v=<81,107,-7>, a=<2,3,-10> +p=<283,704,-785>, v=<-84,20,74>, a=<8,-10,-2> +p=<1037,-973,2465>, v=<-37,65,-106>, a=<-7,2,-12> +p=<634,-102,-1396>, v=<-48,-16,58>, a=<-1,4,7> +p=<-2343,327,1347>, v=<146,14,-97>, a=<4,-5,-1> +p=<-5127,-1697,4261>, v=<-2,-1,-85>, a=<12,4,-4> +p=<325,449,1216>, v=<-40,-75,-70>, a=<2,4,2> +p=<-1676,8859,4638>, v=<14,-170,-68>, a=<3,-9,-6> +p=<-168,-3437,6436>, v=<-53,134,-115>, a=<4,-1,-7> +p=<-1647,-2770,7103>, v=<-17,6,-78>, a=<5,6,-11> +p=<1224,1638,3942>, v=<49,-41,-194>, a=<-6,-1,4> +p=<-3979,2255,-780>, v=<64,-8,82>, a=<13,-10,-4> +p=<841,145,2690>, v=<12,-39,-102>, a=<-5,3,-3> +p=<-809,-915,1420>, v=<42,-91,-49>, a=<0,13,-2> +p=<-867,1058,-160>, v=<66,-15,-29>, a=<4,-17,8> +p=<-637,1278,910>, v=<76,-103,-48>, a=<-2,-5,-8> +p=<298,733,20>, v=<-1,-43,-14>, a=<-5,-6,2> +p=<533,1753,-310>, v=<-8,-134,8>, a=<-8,-8,4> +p=<-237,-147,670>, v=<91,-10,-13>, a=<-12,4,-10> +p=<-387,468,-390>, v=<40,-44,-6>, a=<0,-1,8> +p=<953,-462,440>, v=<-83,104,-89>, a=<-2,-11,8> +p=<48,1553,-790>, v=<13,-92,155>, a=<-3,-12,-14> +p=<-1696,991,-291>, v=<92,-10,47>, a=<3,-7,-4> +p=<-2626,-389,-51>, v=<34,-14,-1>, a=<18,5,0> +p=<1040,6169,4171>, v=<25,-212,-47>, a=<-3,2,-4> +p=<-7955,-3491,-4509>, v=<84,46,21>, a=<8,3,6> +p=<-3405,-1671,8441>, v=<8,-24,-115>, a=<5,4,-7> +p=<-1340,9774,2036>, v=<39,-27,-22>, a=<0,-14,-2> +p=<-4770,1129,-4754>, v=<137,-122,136>, a=<0,5,0> +p=<1663,5742,172>, v=<-78,-157,62>, a=<1,-4,-5> +p=<-497,1800,-2744>, v=<58,3,-12>, a=<-3,-5,8> +p=<2041,-1089,793>, v=<-50,-44,-31>, a=<-2,6,0> +p=<-4169,4311,-3338>, v=<82,-62,66>, a=<5,-7,4> +p=<1285,-603,955>, v=<-22,22,-37>, a=<-2,0,0> +p=<-6679,-38,-891>, v=<100,-88,25>, a=<5,5,0> +p=<5221,-73,1839>, v=<-6,-33,37>, a=<-8,2,-5> +p=<3576,-8998,-3621>, v=<-103,-12,-59>, a=<0,15,9> +p=<-1219,-1753,10134>, v=<70,-93,-56>, a=<-2,8,-13> +p=<-4824,2202,5234>, v=<-7,-26,30>, a=<8,-2,-10> +p=<2701,-9488,-4426>, v=<-78,128,-18>, a=<0,8,8> +p=<4451,5737,-2326>, v=<106,-55,66>, a=<-13,-6,0> +p=<-8709,6997,1069>, v=<104,-1,-31>, a=<8,-11,0> +p=<3984,2409,-2230>, v=<15,-90,16>, a=<-8,1,3> +p=<-4926,-3597,-3451>, v=<13,58,-32>, a=<8,3,8> +p=<1971,-1518,-3649>, v=<93,-5,59>, a=<-9,3,3> +p=<1344,1584,-5167>, v=<78,-116,-31>, a=<-7,4,11> +p=<948,-6567,-1372>, v=<22,46,24>, a=<-3,9,1> +p=<-273,-330,7076>, v=<8,27,-96>, a=<0,-1,-7> +p=<5865,7524,-6949>, v=<9,-7,142>, a=<-11,-13,4> +p=<-2847,-2211,4040>, v=<-33,-103,-140>, a=<7,10,1> +p=<-9381,4488,-4111>, v=<46,-17,-29>, a=<14,-7,9> +p=<-5605,-5309,-5145>, v=<-34,109,-66>, a=<12,3,13> +p=<4823,1390,-1086>, v=<24,25,83>, a=<-10,-4,-3> +p=<-3988,268,-11811>, v=<53,-9,136>, a=<4,0,13> +p=<1424,-8147,1521>, v=<-77,42,72>, a=<2,12,-7> +p=<-2107,1885,-2505>, v=<-21,27,41>, a=<5,-5,2> +p=<3340,-1280,4419>, v=<-11,59,-123>, a=<-7,-1,-2> +p=<-1039,-7892,-3208>, v=<-25,77,65>, a=<4,13,3> +p=<3949,4172,-1439>, v=<-137,-99,19>, a=<0,-3,2> +p=<614,-1251,446>, v=<-22,43,-151>, a=<0,0,9> +p=<2760,3273,-5354>, v=<54,7,109>, a=<-10,-8,5> +p=<-3417,3331,-4629>, v=<117,-115,-6>, a=<0,0,11> +p=<5,-1048,-975>, v=<-76,51,33>, a=<5,-1,0> +p=<-3301,-5630,2708>, v=<38,59,56>, a=<5,9,-10> +p=<-2750,-4151,7609>, v=<-11,38,-98>, a=<7,7,-11> +p=<-1408,2242,-1675>, v=<54,-171,126>, a=<8,0,0> +p=<-1512,1514,184>, v=<-1,-87,-52>, a=<17,-4,5> +p=<399,331,67>, v=<-29,-38,34>, a=<0,2,-6> +p=<1101,539,2173>, v=<-83,-40,-79>, a=<0,0,-13> +p=<-667,-1554,-960>, v=<53,72,71>, a=<0,7,0> +p=<3233,2151,-2091>, v=<-142,-94,158>, a=<-15,-10,0> +p=<-628,1423,1523>, v=<113,-73,-43>, a=<-9,-5,-11> +p=<906,2099,-180>, v=<-68,-104,-24>, a=<0,-8,5> +p=<10374,2759,3961>, v=<-8,-150,-47>, a=<-17,4,-4> +p=<-6677,-3701,-2125>, v=<56,110,62>, a=<8,0,0> +p=<-6762,-845,3859>, v=<41,26,-44>, a=<9,0,-4> +p=<-1271,294,5831>, v=<37,-25,-172>, a=<0,1,0> +p=<3727,-2103,-5185>, v=<-5,98,82>, a=<-6,-2,4> +p=<293,4068,-2176>, v=<166,-101,11>, a=<-10,-1,3> +p=<-3481,-4789,-918>, v=<-38,142,-26>, a=<8,0,3> +p=<-265,4681,-2828>, v=<14,-89,171>, a=<0,-14,-3> +p=<-455,811,1822>, v=<97,-53,-93>, a=<-7,1,0> +p=<975,-2299,602>, v=<36,71,10>, a=<-8,4,-4> +p=<-371,367,361>, v=<26,-44,-33>, a=<2,1,-1> +p=<-171,627,-424>, v=<17,-81,95>, a=<0,3,-10> +p=<-901,222,-604>, v=<90,20,25>, a=<0,-8,6> +p=<629,-403,-19>, v=<-85,55,38>, a=<4,-3,-7> +p=<-381,652,-339>, v=<27,-45,59>, a=<2,-4,-5> +p=<-971,1542,-779>, v=<97,-156,37>, a=<0,0,7> +p=<1769,-168,-1114>, v=<-89,15,98>, a=<-16,0,2> +p=<5277,8455,-4580>, v=<47,-116,112>, a=<-11,-7,1> +p=<1637,-3935,-7310>, v=<-65,58,-80>, a=<1,3,16> +p=<-10228,-4530,-5630>, v=<22,21,142>, a=<15,6,1> +p=<-6308,3205,-13435>, v=<0,-92,167>, a=<10,0,12> +p=<3842,-785,-2165>, v=<-20,22,79>, a=<-5,0,-1> +p=<-5993,-2115,7530>, v=<-81,114,-36>, a=<14,-3,-10> +p=<6642,-3900,4345>, v=<-136,-33,19>, a=<-3,8,-8> +p=<-6413,1315,3400>, v=<-15,-38,28>, a=<11,0,-7> +p=<1357,6915,2210>, v=<69,-18,-64>, a=<-6,-10,0> +p=<-2699,4182,2636>, v=<167,-122,-21>, a=<-5,-2,-5> +p=<1795,4280,788>, v=<50,5,45>, a=<-8,-11,-5> +p=<1543,2054,-4406>, v=<-57,-17,13>, a=<0,-4,10> +p=<4875,-3322,-1984>, v=<56,1,57>, a=<-16,8,1> +p=<6737,-354,508>, v=<-54,11,-3>, a=<-13,0,-1> +p=<2299,5806,-1970>, v=<-55,-93,71>, a=<-2,-8,0> +p=<2971,1578,2048>, v=<-79,-116,0>, a=<-2,4,-5> +p=<7507,-5366,4414>, v=<-96,16,17>, a=<-12,12,-12> +p=<451,1018,18>, v=<11,-9,0>, a=<-2,-2,0> +p=<4749,-2664,-2572>, v=<-70,-95,49>, a=<-7,13,3> +p=<-603,-266,-842>, v=<35,-39,59>, a=<0,6,-1> +p=<-1589,3372,3289>, v=<102,-208,-112>, a=<-1,1,-9> +p=<-1776,516,-1148>, v=<104,-85,-4>, a=<0,6,8> +p=<2236,2199,-1454>, v=<-114,-58,32>, a=<-2,-8,6> +p=<-1079,142,3612>, v=<-27,90,-176>, a=<10,-11,-4> +p=<536,-436,569>, v=<-32,25,21>, a=<0,0,-6> +p=<1267,-96,671>, v=<-75,50,6>, a=<0,-5,-5> +p=<4240,6035,-1297>, v=<190,-50,-3>, a=<-16,-6,2> +p=<-2124,-847,-12915>, v=<1,-54,159>, a=<3,4,10> +p=<-1125,6812,7213>, v=<-121,5,-100>, a=<8,-10,-5> +p=<3611,1299,-4812>, v=<17,-17,111>, a=<-6,-1,1> +p=<-8155,4185,-3702>, v=<12,38,-71>, a=<11,-8,9> +p=<-3012,-1698,-3591>, v=<-51,121,59>, a=<7,-4,2> +p=<-5972,-1402,11764>, v=<181,18,-109>, a=<-1,1,-11> +p=<-4196,10364,-39>, v=<114,-91,-170>, a=<0,-10,9> +p=<-5824,7330,5400>, v=<-13,-142,25>, a=<9,-3,-9> +p=<-1976,1262,9359>, v=<35,22,-63>, a=<1,-3,-10> +p=<3138,-3783,-513>, v=<37,83,-7>, a=<-11,4,2> +p=<-372,2967,4212>, v=<13,-69,-28>, a=<0,-3,-9> +p=<60,672,2322>, v=<39,16,-84>, a=<-3,-3,0> +p=<937,1299,4314>, v=<0,65,10>, a=<-3,-9,-14> +p=<2862,2199,4314>, v=<27,-49,-16>, a=<-11,-3,-12> +p=<-1788,-2601,1339>, v=<70,52,-66>, a=<0,4,1> +p=<-7413,1474,1214>, v=<35,-72,69>, a=<20,1,-9> +p=<1562,-5926,-1586>, v=<53,120,77>, a=<-9,9,-1> +p=<3387,-701,-436>, v=<19,41,-99>, a=<-12,-1,9> +p=<1037,1299,2789>, v=<74,-117,19>, a=<-9,5,-10> +p=<6887,1999,2264>, v=<-212,63,27>, a=<-5,-11,-9> +p=<-2454,3908,4493>, v=<40,-41,-104>, a=<4,-8,-5> +p=<-1414,138,-330>, v=<54,-58,-40>, a=<0,4,4> +p=<-530,2764,1165>, v=<-7,-105,-138>, a=<2,0,7> +p=<-2584,-4100,4194>, v=<99,78,29>, a=<0,6,-14> +p=<4514,-5452,2088>, v=<15,49,2>, a=<-14,12,-6> +p=<2369,1308,1542>, v=<-51,59,-31>, a=<-3,-8,-2> +p=<783,-4581,-1370>, v=<37,110,135>, a=<-5,5,-6> +p=<1477,-678,-914>, v=<1,-160,64>, a=<-5,15,-2> +p=<-791,-366,-1370>, v=<33,-23,58>, a=<0,3,0> +p=<-743,-750,-6386>, v=<-119,68,67>, a=<12,-3,16> +p=<-23,-234,-2210>, v=<1,-91,-82>, a=<0,8,14> +p=<5569,3198,862>, v=<-32,-34,-35>, a=<-16,-8,0> +p=<1321,-2850,1738>, v=<-80,18,-59>, a=<2,8,-1> +p=<-563,2046,2626>, v=<-64,39,-96>, a=<7,-10,-1> +p=<-383,-5370,1438>, v=<66,98,-34>, a=<-4,10,-2> +p=<3121,1139,-482>, v=<-84,-23,29>, a=<-11,-5,0> +p=<-653,-1530,130>, v=<39,35,-34>, a=<0,6,3> +p=<-5063,-11650,8566>, v=<86,28,3>, a=<3,16,-13> +p=<-2561,-6700,4390>, v=<-113,57,-29>, a=<10,7,-5> +p=<-977,-2254,3256>, v=<65,-11,-53>, a=<-2,4,-2> +p=<-7434,6703,7006>, v=<50,-51,19>, a=<7,-6,-10> +p=<-3300,8809,2170>, v=<-16,-65,-97>, a=<5,-8,2> +p=<-7278,-3242,7708>, v=<66,44,-59>, a=<6,2,-7> +p=<13158,-11588,-3485>, v=<-78,-2,148>, a=<-13,15,-3> +p=<4695,-3515,4705>, v=<-61,51,-42>, a=<-3,2,-4> +p=<2002,639,-1916>, v=<-111,-71,21>, a=<0,4,9> +p=<-347,2052,1387>, v=<48,-7,-20>, a=<-3,-11,-6> +p=<-770,-477,2323>, v=<81,67,-34>, a=<-4,-4,-10> +p=<697,-1323,3682>, v=<-10,-19,-138>, a=<-3,10,-7> +p=<1141,-1102,1582>, v=<-22,-40,-140>, a=<-8,16,4> +p=<-1813,-934,-658>, v=<129,-67,35>, a=<0,18,2> +p=<1001,592,1162>, v=<-42,-71,-5>, a=<-4,4,-10> +p=<-189,-1165,-1456>, v=<28,47,62>, a=<-2,5,6> +p=<-2793,277,-658>, v=<154,-56,-10>, a=<6,5,8> +p=<-2843,830,-240>, v=<-412,119,-35>, a=<29,-12,0> +p=<561,-879,2757>, v=<85,-126,396>, a=<-5,1,-27> +p=<483,-2524,422>, v=<71,-362,65>, a=<-2,20,-4> +p=<-2418,-1522,-852>, v=<-345,-217,-122>, a=<26,15,9> +p=<92,-3025,215>, v=<13,-435,32>, a=<0,22,-2> +p=<3087,-796,-1114>, v=<439,-116,-159>, a=<-33,10,13> +p=<906,70,2639>, v=<129,6,379>, a=<-10,-5,-26> +p=<-182,-50,2623>, v=<-27,-10,377>, a=<-3,-2,-26> +p=<2507,221,1319>, v=<357,30,182>, a=<-25,2,-15> +p=<-1120,-1672,1737>, v=<-163,-238,246>, a=<9,12,-17> +p=<-1240,-2710,1243>, v=<-175,-384,177>, a=<13,22,-11> +p=<-2314,2561,328>, v=<-330,367,40>, a=<27,-24,-3> +p=<2371,-389,-1955>, v=<334,-56,-281>, a=<-20,3,21> +p=<-434,-2848,-913>, v=<-67,-408,-130>, a=<-1,24,10> +p=<2056,-1628,-1558>, v=<291,-235,-227>, a=<-22,21,15> +p=<1053,2653,-1626>, v=<154,379,-227>, a=<-10,-26,13> +p=<-2181,1285,-1166>, v=<-310,181,-162>, a=<20,-14,9> +p=<-2189,-1315,-2270>, v=<-311,-188,-322>, a=<22,8,16> +p=<-1086,-2194,1448>, v=<-158,-313,199>, a=<12,17,-18> +p=<2885,-1247,1039>, v=<413,-177,151>, a=<-27,12,-10> +p=<1593,2580,-1214>, v=<224,368,-176>, a=<-10,-25,12> +p=<-446,-1930,-1797>, v=<-68,-278,-259>, a=<4,20,21> +p=<642,2024,1663>, v=<92,292,242>, a=<-10,-17,-14> +p=<1097,-2987,1234>, v=<157,-424,177>, a=<-10,28,-5> +p=<-2374,-1019,1757>, v=<-335,-145,250>, a=<23,10,-17> +p=<-712,1767,1196>, v=<-101,251,170>, a=<2,-18,-15> +p=<-1122,1692,-1744>, v=<-164,246,-247>, a=<10,-19,21> +p=<-1846,942,-2533>, v=<-260,137,-358>, a=<18,-8,22> +p=<-1690,2012,785>, v=<-242,290,113>, a=<19,-24,-15> +p=<1638,-2984,539>, v=<235,-426,81>, a=<-16,26,-8> +p=<-2618,-1700,1297>, v=<-374,-247,185>, a=<29,15,-13> +p=<2933,153,982>, v=<419,13,142>, a=<-29,2,-8> +p=<2567,1801,491>, v=<366,257,73>, a=<-27,-16,-7> +p=<1783,-924,1676>, v=<254,-134,239>, a=<-16,13,-18> +p=<2029,-1462,-1914>, v=<283,-205,-274>, a=<-24,13,19> +p=<1217,-1225,-2739>, v=<177,-180,-391>, a=<-12,11,25> +p=<-2157,-342,1702>, v=<-309,-51,245>, a=<22,3,-17> +p=<-2605,-432,628>, v=<-372,-61,87>, a=<28,4,-6> +p=<160,698,-2721>, v=<22,99,-386>, a=<-1,-6,19> +p=<895,2760,1095>, v=<127,397,157>, a=<-9,-29,-7> +p=<-1993,-1733,-409>, v=<-284,-248,-60>, a=<23,24,3> +p=<948,904,3052>, v=<133,124,434>, a=<-14,-14,-26> +p=<3186,-1032,-896>, v=<453,-148,-126>, a=<-30,9,10> +p=<-931,3471,56>, v=<-133,496,10>, a=<5,-34,-2> +p=<3270,-206,-851>, v=<458,-27,-118>, a=<-30,0,8> +p=<1531,-2061,1996>, v=<215,-296,283>, a=<-10,17,-19> +p=<316,-1984,1728>, v=<46,-288,242>, a=<-3,24,-17> +p=<-254,-748,-2958>, v=<-36,-109,-422>, a=<3,6,33> +p=<132,-1586,-2317>, v=<22,-223,-326>, a=<1,18,18> +p=<2073,-1463,-1932>, v=<294,-206,-278>, a=<-18,17,17> +p=<-1089,-45,2877>, v=<-157,-5,412>, a=<11,-1,-32> +p=<-410,2889,1122>, v=<-61,415,166>, a=<0,-23,-13> +p=<654,-1230,-2552>, v=<93,-174,-365>, a=<-9,16,29> +p=<-2106,-1937,768>, v=<-295,-275,109>, a=<18,18,-3> +p=<2929,-725,-238>, v=<414,-104,-39>, a=<-26,7,1> +p=<840,-2609,-1590>, v=<120,-372,-227>, a=<-8,24,18> +p=<822,-2523,1355>, v=<118,-357,187>, a=<-11,29,-9> +p=<1470,503,-2578>, v=<211,69,-370>, a=<-16,-10,27> +p=<1786,121,1675>, v=<259,18,240>, a=<-14,-1,-16> +p=<3009,198,1286>, v=<431,27,183>, a=<-30,-2,-8> +p=<1298,-2606,-100>, v=<185,-378,-14>, a=<-10,27,-1> +p=<906,536,2696>, v=<132,79,379>, a=<-9,-5,-32> +p=<3302,481,743>, v=<473,63,102>, a=<-35,-5,-7> +p=<175,-2676,1265>, v=<25,-381,184>, a=<-1,22,-13> +p=<-1819,196,2632>, v=<-260,31,377>, a=<16,-8,-26> +p=<2983,-1160,-333>, v=<426,-170,-50>, a=<-32,12,6> +p=<-15,2565,99>, v=<-7,367,14>, a=<-1,-29,-5> +p=<661,-2416,1867>, v=<94,-345,268>, a=<-7,16,-18> +p=<77,39,3045>, v=<13,4,435>, a=<4,5,-34> +p=<820,-2014,843>, v=<117,-287,123>, a=<-4,18,-8> +p=<-2569,-1447,-432>, v=<-366,-210,-60>, a=<25,13,4> +p=<2156,-1773,-510>, v=<305,-257,-73>, a=<-19,16,0> +p=<-2188,939,-1>, v=<-312,135,-1>, a=<23,-7,1> +p=<-2478,1649,1401>, v=<-354,237,193>, a=<26,-18,-13> +p=<-2228,2035,69>, v=<-313,290,5>, a=<25,-24,5> +p=<-1167,2674,33>, v=<-163,380,2>, a=<10,-26,7> +p=<-2810,737,-14>, v=<-401,103,-4>, a=<30,-7,-5> +p=<-2518,-1475,1125>, v=<-353,-211,160>, a=<25,16,-14> +p=<2866,-596,-822>, v=<407,-89,-119>, a=<-28,5,5> +p=<66,1045,2622>, v=<11,146,370>, a=<-1,-10,-28> +p=<-1326,1976,2227>, v=<-189,284,320>, a=<13,-19,-19> +p=<199,-2682,-889>, v=<25,-382,-127>, a=<1,23,7> +p=<-1703,293,-2055>, v=<-244,43,-290>, a=<19,-2,23> +p=<-1725,984,2303>, v=<-247,140,329>, a=<18,-9,-21> +p=<-2376,539,-2230>, v=<-339,73,-317>, a=<25,-6,22> +p=<-1178,-534,-2732>, v=<-171,-76,-390>, a=<13,3,29> +p=<-1745,-2288,426>, v=<-252,-327,60>, a=<12,24,0> +p=<-2811,-1675,538>, v=<-402,-238,81>, a=<30,19,-5> +p=<-948,-775,3082>, v=<-135,-110,441>, a=<9,13,-30> +p=<549,1427,-2381>, v=<76,203,-346>, a=<-5,-15,20> +p=<-210,2385,-1528>, v=<-27,340,-212>, a=<-1,-23,16> +p=<3012,1221,-262>, v=<431,179,-36>, a=<-23,-12,3> +p=<2163,2316,561>, v=<313,329,80>, a=<-16,-25,-9> +p=<1858,1047,-2395>, v=<265,150,-344>, a=<-17,-15,24> +p=<-1322,-391,-2833>, v=<-189,-53,-409>, a=<16,6,24> +p=<-975,-2214,-2230>, v=<-133,-318,-318>, a=<9,17,21> +p=<-1172,2355,1378>, v=<-170,338,198>, a=<14,-32,-18> +p=<1778,874,-1604>, v=<256,126,-227>, a=<-21,-8,19> +p=<1579,811,2590>, v=<219,116,374>, a=<-15,-12,-21> +p=<-1518,-2441,1048>, v=<-216,-348,152>, a=<9,23,-10> +p=<2204,1505,1740>, v=<315,215,250>, a=<-20,-13,-16> +p=<-1723,-2674,890>, v=<-246,-385,127>, a=<13,27,-7> +p=<-806,1341,1967>, v=<-114,197,283>, a=<11,-17,-18> +p=<466,19,3093>, v=<66,2,440>, a=<-9,0,-30> +p=<-710,-2201,-2248>, v=<-101,-317,-323>, a=<8,24,18> +p=<3052,-96,123>, v=<436,-11,17>, a=<-26,-4,3> +p=<2058,535,1117>, v=<296,75,164>, a=<-21,-4,-11> +p=<2233,1477,1314>, v=<311,213,186>, a=<-23,-8,-17> +p=<2060,-63,2115>, v=<290,-12,299>, a=<-19,-3,-14> +p=<-503,2332,-1873>, v=<-79,335,-272>, a=<6,-28,20> +p=<2393,-340,-1098>, v=<344,-48,-153>, a=<-21,3,10> +p=<-2547,1377,1267>, v=<-364,200,182>, a=<28,-15,-14> +p=<-1034,2302,-1172>, v=<-149,332,-161>, a=<12,-22,13> +p=<-2776,-104,-523>, v=<-399,-16,-73>, a=<29,0,1> +p=<1771,1362,-2101>, v=<250,192,-299>, a=<-20,-7,21> +p=<2975,-496,-1298>, v=<420,-73,-184>, a=<-34,7,8> +p=<-750,-2930,895>, v=<-105,-420,127>, a=<4,27,-8> +p=<2358,-515,2215>, v=<332,-79,316>, a=<-21,1,-20> +p=<1896,1218,-1722>, v=<266,171,-248>, a=<-18,-17,22> +p=<-2787,-585,-1023>, v=<-403,-86,-149>, a=<20,1,6> +p=<1006,-2944,-75>, v=<145,-420,-9>, a=<-10,28,2> +p=<2223,-2611,211>, v=<316,-373,28>, a=<-22,24,4> +p=<-3237,622,-127>, v=<-460,88,-21>, a=<32,-4,0> +p=<2468,940,809>, v=<352,133,114>, a=<-23,-7,-14> +p=<745,2723,-1771>, v=<104,387,-253>, a=<-7,-27,11> +p=<3079,954,-475>, v=<441,134,-65>, a=<-32,-9,6> +p=<2898,-724,1296>, v=<415,-103,188>, a=<-28,12,-17> +p=<-1534,-2251,2106>, v=<-219,-323,300>, a=<18,24,-22> +p=<1118,-1993,2096>, v=<164,-284,297>, a=<-10,21,-23> +p=<-980,2460,-919>, v=<-138,353,-127>, a=<7,-21,9> +p=<-1579,837,-3110>, v=<-225,114,-444>, a=<14,-8,27> +p=<1206,-2091,1026>, v=<172,-296,143>, a=<-10,18,-8> +p=<3433,-601,-719>, v=<487,-87,-104>, a=<-35,8,7> +p=<725,-490,2434>, v=<98,-68,345>, a=<0,4,-22> +p=<366,3042,837>, v=<48,428,120>, a=<-1,-28,-6> +p=<-1110,-981,-2006>, v=<-165,-135,-286>, a=<11,9,18> +p=<-1837,-666,-2584>, v=<-266,-94,-369>, a=<13,5,24> +p=<-1223,-2493,1004>, v=<-174,-359,141>, a=<13,22,-9> +p=<-282,-1529,2340>, v=<-40,-217,339>, a=<3,17,-23> +p=<-1740,-2697,-232>, v=<-248,-384,-27>, a=<13,25,2> +p=<-489,2888,-479>, v=<-67,413,-69>, a=<5,-28,5> +p=<2864,-1237,-1254>, v=<414,-176,-181>, a=<-28,12,10> +p=<-1263,-861,2591>, v=<-177,-124,376>, a=<11,7,-25> +p=<1578,-1602,2035>, v=<227,-228,288>, a=<-12,20,-22> +p=<1470,-2535,214>, v=<213,-361,27>, a=<-10,25,1> +p=<-779,2562,764>, v=<-112,365,108>, a=<9,-20,-7> +p=<2406,-243,2005>, v=<346,-31,286>, a=<-23,2,-20> +p=<1682,382,1836>, v=<246,57,265>, a=<-16,-3,-16> +p=<558,-2913,351>, v=<77,-416,47>, a=<-1,31,-4> +p=<2737,-217,1442>, v=<395,-31,205>, a=<-25,2,-11> +p=<2643,903,1168>, v=<382,131,166>, a=<-28,-9,-9> +p=<-1097,-1662,-1197>, v=<-157,-232,-176>, a=<6,10,8> +p=<2154,-1785,-1040>, v=<305,-253,-148>, a=<-21,16,11> +p=<-1577,-502,2281>, v=<-223,-76,323>, a=<18,5,-23> +p=<150,-2685,531>, v=<24,-383,76>, a=<-5,29,1> +p=<1830,-2571,319>, v=<261,-367,44>, a=<-19,26,-4> +p=<631,2434,-302>, v=<88,349,-46>, a=<-2,-24,0> +p=<-1816,-2338,-1168>, v=<-262,-334,-165>, a=<17,18,13> +p=<-1291,-189,-2567>, v=<-183,-27,-366>, a=<12,7,27> +p=<2577,1399,469>, v=<368,197,68>, a=<-23,-7,0> +p=<-281,3177,325>, v=<-36,453,46>, a=<2,-33,-3> +p=<-1386,-353,2531>, v=<-204,-48,368>, a=<15,7,-20> +p=<700,2432,-1803>, v=<100,347,-257>, a=<-10,-27,21> +p=<-1191,-2167,318>, v=<-172,-311,46>, a=<4,21,1> +p=<1235,1073,2522>, v=<178,158,361>, a=<-12,-13,-26> +p=<3009,-18,-1884>, v=<425,-3,-269>, a=<-29,-1,20> +p=<1775,-1388,-1149>, v=<253,-204,-164>, a=<-15,13,11> +p=<-2724,644,37>, v=<-388,92,6>, a=<27,-2,7> +p=<652,1410,2373>, v=<91,204,334>, a=<-9,-20,-21> +p=<-680,-2082,2558>, v=<-97,-299,363>, a=<11,16,-25> +p=<-2404,-1258,1398>, v=<-344,-180,201>, a=<27,13,-12> +p=<-2003,440,1820>, v=<-290,62,264>, a=<18,-3,-20> +p=<2337,-947,-1272>, v=<333,-137,-184>, a=<-23,9,11> +p=<1364,-2612,-1713>, v=<200,-372,-246>, a=<-14,29,22> +p=<795,-2582,895>, v=<115,-362,129>, a=<-11,22,-1> +p=<-517,984,-2530>, v=<-77,135,-357>, a=<8,-3,25> +p=<-668,-2394,992>, v=<-95,-340,141>, a=<7,20,-11> +p=<-744,1390,-1984>, v=<-107,203,-288>, a=<2,-15,23> +p=<3337,-1467,-429>, v=<471,-209,-63>, a=<-33,15,13> +p=<-585,2326,1872>, v=<-79,332,269>, a=<1,-22,-19> +p=<2001,-1110,1636>, v=<288,-153,229>, a=<-15,9,-12> +p=<-682,1455,-2671>, v=<-101,207,-379>, a=<6,-19,27> +p=<-1068,-2223,-1617>, v=<-146,-313,-232>, a=<11,20,17> +p=<6,-794,-2839>, v=<1,-117,-402>, a=<0,10,22> +p=<-1163,2809,-121>, v=<-168,402,-18>, a=<11,-31,1> +p=<-1962,2406,724>, v=<-283,341,101>, a=<16,-23,-3> +p=<508,-3140,633>, v=<72,-449,92>, a=<-4,26,-6> +p=<1008,-2458,1931>, v=<145,-351,273>, a=<-10,23,-20> +p=<-1239,-283,-2424>, v=<-172,-44,-347>, a=<12,-3,22> +p=<391,-2979,-414>, v=<53,-426,-58>, a=<-9,28,4> +p=<2090,-394,-1342>, v=<301,-58,-192>, a=<-22,3,16> +p=<1999,1243,-1580>, v=<286,180,-224>, a=<-17,-11,15> +p=<-216,-1168,3369>, v=<-27,-165,484>, a=<7,9,-38> +p=<1742,-1711,1487>, v=<246,-249,208>, a=<-13,14,-14> +p=<-2451,-229,314>, v=<-350,-34,46>, a=<20,2,-4> +p=<305,-2475,1423>, v=<44,-355,202>, a=<-4,24,-15> +p=<-3194,-544,371>, v=<-453,-77,53>, a=<33,8,1> +p=<894,-1024,2681>, v=<127,-146,377>, a=<-8,13,-25> +p=<-1218,642,2875>, v=<-170,91,409>, a=<10,-6,-27> +p=<217,2300,576>, v=<30,326,79>, a=<-5,-23,-5> +p=<1685,2321,494>, v=<240,329,68>, a=<-16,-25,1> +p=<1194,1893,-2627>, v=<170,273,-380>, a=<-11,-18,26> +p=<3427,-161,-785>, v=<490,-20,-110>, a=<-28,1,4> +p=<-1457,-2725,663>, v=<-212,-389,92>, a=<15,26,-5> +p=<-623,-2456,-677>, v=<-89,-353,-97>, a=<6,24,6> +p=<-2003,262,-1900>, v=<-291,36,-275>, a=<15,-2,23> +p=<2152,-1487,-889>, v=<307,-213,-127>, a=<-24,14,10> +p=<2596,-1310,-825>, v=<370,-183,-114>, a=<-22,12,11> +p=<-1268,2212,1195>, v=<-185,313,170>, a=<6,-21,-11> +p=<-550,2547,-736>, v=<-78,363,-105>, a=<2,-27,9> +p=<-1114,333,-2308>, v=<-166,46,-327>, a=<11,-4,23> +p=<-1573,1832,-401>, v=<-224,264,-59>, a=<13,-17,7> +p=<1133,868,-2422>, v=<163,130,-345>, a=<-12,-10,24> +p=<1594,2314,-923>, v=<225,329,-131>, a=<-13,-23,7> +p=<438,2775,-25>, v=<64,398,-1>, a=<1,-27,2> +p=<313,-2694,-317>, v=<45,-383,-47>, a=<-1,27,3> +p=<1577,-786,-2102>, v=<229,-113,-305>, a=<-11,4,23> +p=<-2823,-794,-278>, v=<-407,-115,-34>, a=<29,8,3> +p=<-719,-1430,2220>, v=<-103,-205,318>, a=<9,14,-17> +p=<-315,2344,2368>, v=<-41,332,334>, a=<4,-21,-24> +p=<1641,1093,-2327>, v=<229,159,-331>, a=<-19,-9,20> +p=<-948,-825,2651>, v=<-134,-112,379>, a=<8,9,-27> +p=<271,-758,-2783>, v=<40,-108,-392>, a=<-2,3,28> +p=<2603,-270,-1799>, v=<371,-37,-260>, a=<-26,2,20> +p=<1294,3159,-110>, v=<184,450,-12>, a=<-10,-31,-2> +p=<-20,3020,548>, v=<1,426,75>, a=<-2,-26,-4> +p=<560,1186,-2831>, v=<76,172,-409>, a=<-4,-14,26> +p=<-2338,915,2315>, v=<-333,128,330>, a=<27,-9,-20> +p=<-1694,-2185,-728>, v=<-239,-314,-104>, a=<17,19,9> +p=<2313,272,1427>, v=<324,38,206>, a=<-25,-3,-15> +p=<411,2384,918>, v=<60,335,129>, a=<-9,-23,-10> +p=<2342,933,-1901>, v=<335,134,-271>, a=<-22,-10,27> +p=<2206,498,-921>, v=<313,75,-131>, a=<-23,-8,9> +p=<-1438,-2211,1044>, v=<-204,-313,142>, a=<15,25,-8> +p=<-631,-2348,956>, v=<-87,-338,139>, a=<6,33,-12> +p=<-1194,-2558,-576>, v=<-172,-366,-77>, a=<10,29,2> +p=<1204,-3261,-154>, v=<176,-465,-25>, a=<-12,34,1> +p=<1022,-2003,-2357>, v=<146,-283,-337>, a=<-18,17,25> +p=<369,-43,-3329>, v=<46,-1,-477>, a=<1,0,33> +p=<734,-2281,1529>, v=<103,-327,217>, a=<-10,22,-16> +p=<1929,-2250,577>, v=<278,-320,80>, a=<-17,27,-8> +p=<2462,788,-1145>, v=<352,110,-158>, a=<-21,-7,12> +p=<-2112,1442,1144>, v=<-301,206,159>, a=<23,-14,-8> +p=<-536,262,2755>, v=<-78,38,393>, a=<5,1,-23> +p=<2621,-94,-1415>, v=<374,-11,-204>, a=<-27,0,10> +p=<-775,391,2918>, v=<-110,55,413>, a=<4,-2,-27> +p=<2716,392,1401>, v=<387,53,204>, a=<-33,-2,-14> +p=<-2469,747,1452>, v=<-346,106,205>, a=<29,-8,-17> +p=<-39,-451,-2707>, v=<-4,-72,-388>, a=<3,3,21> +p=<-347,2381,-1062>, v=<-51,341,-144>, a=<3,-25,11> +p=<-347,338,2665>, v=<-54,52,377>, a=<-1,-3,-23> +p=<1079,1614,1775>, v=<158,229,249>, a=<-11,-16,-15> +p=<1087,-2561,-354>, v=<155,-364,-50>, a=<-11,28,3> +p=<2108,-579,-1619>, v=<298,-81,-228>, a=<-22,4,19> +p=<939,-1919,-1931>, v=<134,-274,-268>, a=<-12,21,18> +p=<876,-422,2874>, v=<125,-60,405>, a=<-9,4,-26> +p=<1336,-2226,30>, v=<189,-323,4>, a=<-20,22,-2> +p=<112,2882,1381>, v=<16,411,196>, a=<1,-21,-8> +p=<-2344,-1273,-1683>, v=<-337,-187,-247>, a=<17,14,16> +p=<-1653,791,-1953>, v=<-235,113,-281>, a=<17,-15,20> +p=<-1611,1089,-1658>, v=<-230,155,-233>, a=<22,-10,20> +p=<1997,-806,2740>, v=<284,-119,391>, a=<-17,8,-25> +p=<938,725,2467>, v=<133,105,354>, a=<-15,-10,-27> +p=<-322,2612,-813>, v=<-45,374,-115>, a=<3,-21,10> +p=<-361,3022,628>, v=<-53,435,88>, a=<5,-29,-3> +p=<1247,3103,119>, v=<184,447,22>, a=<-14,-31,6> +p=<805,2161,-1401>, v=<115,307,-200>, a=<-7,-20,17> +p=<1346,-670,-2502>, v=<196,-100,-358>, a=<-11,5,25> +p=<-3002,-1297,-584>, v=<-433,-187,-88>, a=<31,15,5> +p=<-1818,-2086,-236>, v=<-261,-299,-29>, a=<14,21,4> +p=<-2404,-4,1476>, v=<-341,4,208>, a=<18,6,-18> +p=<714,-641,2405>, v=<102,-89,342>, a=<-7,7,-26> +p=<-1841,-1778,1081>, v=<-266,-255,158>, a=<16,18,-11> +p=<-1468,-2708,-1426>, v=<-206,-386,-203>, a=<16,24,14> +p=<1190,-400,-2780>, v=<170,-56,-397>, a=<-8,4,27> +p=<1169,358,-3175>, v=<169,54,-448>, a=<-12,-4,27> +p=<1242,1422,2719>, v=<176,200,387>, a=<-14,-14,-27> +p=<-971,2621,-632>, v=<-136,380,-94>, a=<9,-25,9> +p=<-568,-1638,2455>, v=<-82,-235,347>, a=<6,10,-28> +p=<449,2705,-1749>, v=<64,390,-250>, a=<-4,-26,22> +p=<1935,-1854,-1853>, v=<273,-266,-264>, a=<-21,16,16> +p=<-733,-1101,-2582>, v=<-104,-154,-361>, a=<8,10,27> +p=<2409,897,-1330>, v=<343,133,-189>, a=<-30,-8,11> +p=<2572,-1490,55>, v=<370,-211,11>, a=<-21,16,4> +p=<-2652,1556,-311>, v=<-379,225,-47>, a=<28,-15,1> +p=<-366,-3076,62>, v=<-50,-439,10>, a=<1,29,-1> +p=<1091,-852,2463>, v=<155,-122,356>, a=<-6,7,-27> +p=<2155,-1659,-1501>, v=<307,-237,-212>, a=<-23,17,17> +p=<-2627,-1109,-35>, v=<-379,-159,-2>, a=<26,14,2> +p=<1097,1981,1025>, v=<156,279,150>, a=<-11,-19,-13> +p=<-858,-2848,352>, v=<-121,-405,50>, a=<3,30,0> +p=<1971,-1579,-88>, v=<283,-225,-13>, a=<-20,19,-3> +p=<-2270,-1167,1002>, v=<-321,-170,137>, a=<17,6,-10> +p=<-1122,-2278,1688>, v=<-160,-327,236>, a=<11,28,-16> +p=<-2056,-2050,708>, v=<-295,-292,96>, a=<21,19,-7> +p=<-1732,1237,1528>, v=<-250,172,221>, a=<18,-15,-13> +p=<1,2845,383>, v=<0,407,51>, a=<-3,-26,5> +p=<-725,2529,1838>, v=<-102,362,267>, a=<11,-28,-16> +p=<-163,1266,-2778>, v=<-29,175,-399>, a=<0,-18,32> +p=<2654,-1564,-875>, v=<375,-225,-125>, a=<-26,14,12> +p=<-1683,2693,44>, v=<-244,384,4>, a=<19,-27,3> +p=<319,1024,-3061>, v=<48,145,-438>, a=<-3,-3,30> +p=<37,591,2588>, v=<2,87,368>, a=<-7,-5,-25> +p=<2948,-255,-312>, v=<420,-39,-43>, a=<-27,1,-2> +p=<669,-3210,-843>, v=<95,-456,-118>, a=<-7,32,9> +p=<-2679,-1175,570>, v=<-381,-166,81>, a=<26,5,0> +p=<-262,-2313,-2190>, v=<-33,-336,-313>, a=<2,21,22> +p=<-463,2377,1405>, v=<-67,343,200>, a=<2,-23,-14> +p=<-565,346,-3384>, v=<-82,50,-483>, a=<9,-5,30> +p=<2690,-957,-1541>, v=<384,-136,-219>, a=<-25,13,12> +p=<-1562,-1725,-1170>, v=<-223,-248,-171>, a=<16,12,9> +p=<-671,1922,-2094>, v=<-90,271,-298>, a=<4,-25,19> +p=<601,-782,-2192>, v=<88,-109,-319>, a=<-9,11,25> +p=<2089,213,2124>, v=<301,28,299>, a=<-22,-5,-19> +p=<2071,-1475,-1553>, v=<296,-211,-222>, a=<-18,19,14> +p=<-1118,-2581,385>, v=<-158,-365,58>, a=<13,28,-3> +p=<-2703,1488,-1211>, v=<-385,211,-170>, a=<30,-14,12> +p=<1254,-2771,-1270>, v=<183,-392,-179>, a=<-12,27,11> +p=<1645,-37,2489>, v=<235,-10,359>, a=<-18,0,-24> +p=<1244,-1510,2257>, v=<176,-216,322>, a=<-10,17,-24> +p=<670,-2299,-1847>, v=<94,-324,-265>, a=<-3,24,14> +p=<-2186,1337,-464>, v=<-312,190,-66>, a=<26,-13,-1> +p=<-2376,518,1603>, v=<-337,78,232>, a=<23,-5,-16> +p=<-1732,-1782,-719>, v=<-245,-253,-101>, a=<14,15,8> +p=<-724,1296,2446>, v=<-104,179,350>, a=<2,-12,-29> +p=<-106,-734,3156>, v=<-12,-104,449>, a=<1,9,-29> +p=<-234,-483,2732>, v=<-33,-69,386>, a=<2,4,-27> +p=<-2392,627,-946>, v=<-339,88,-138>, a=<24,-5,17> +p=<-897,-2959,-28>, v=<-131,-423,-2>, a=<5,27,0> +p=<-2450,669,1113>, v=<-350,92,155>, a=<24,-9,-9> +p=<3115,-194,-2220>, v=<445,-34,-321>, a=<-34,3,25> +p=<-2648,-173,2094>, v=<-379,-25,301>, a=<28,5,-22> +p=<-2165,-2445,-1136>, v=<-312,-345,-159>, a=<21,27,11> +p=<-135,2066,-2142>, v=<-16,301,-309>, a=<-2,-15,21> +p=<-2238,849,1298>, v=<-316,121,185>, a=<21,-4,-12> +p=<1816,1490,1927>, v=<258,210,276>, a=<-16,-9,-19> +p=<-369,1776,2283>, v=<-53,252,327>, a=<-3,-20,-22> +p=<966,-109,3164>, v=<136,-15,450>, a=<-4,1,-32> +p=<-1343,2610,857>, v=<-196,373,122>, a=<18,-28,-8> +p=<2278,433,1258>, v=<323,65,176>, a=<-19,-1,-9> +p=<-12,-1176,-2612>, v=<5,-164,-370>, a=<7,11,27> +p=<-1832,466,-2493>, v=<-258,69,-359>, a=<19,-2,26> +p=<-467,-1328,-2855>, v=<-69,-189,-407>, a=<4,13,29> +p=<2212,1669,1865>, v=<312,240,269>, a=<-21,-18,-21> +p=<2524,226,-1722>, v=<360,25,-246>, a=<-25,-1,17> +p=<-2231,1435,41>, v=<-320,201,7>, a=<24,-8,-3> +p=<1438,1133,2111>, v=<205,161,302>, a=<-17,-11,-20> +p=<-790,-2028,-1901>, v=<-108,-286,-273>, a=<7,21,22> +p=<-2086,1223,-1266>, v=<-298,177,-184>, a=<22,-14,13> +p=<2143,1649,-73>, v=<311,234,-13>, a=<-21,-16,-8> +p=<-1352,95,-2543>, v=<-192,13,-364>, a=<20,0,25> +p=<144,2836,649>, v=<26,404,88>, a=<-4,-28,-6> +p=<-2315,-381,-2313>, v=<-332,-54,-331>, a=<23,0,18> +p=<2488,194,-1630>, v=<355,27,-236>, a=<-26,4,16> +p=<-224,2463,818>, v=<-33,350,116>, a=<2,-25,-11> +p=<-2147,-591,-1463>, v=<-306,-87,-206>, a=<17,2,14> +p=<1819,1038,3201>, v=<260,146,457>, a=<-18,-6,-29> +p=<1846,2232,-565>, v=<265,318,-74>, a=<-14,-22,4> +p=<-1274,1967,-1751>, v=<-189,279,-247>, a=<12,-23,23> +p=<-2829,1586,554>, v=<-403,221,76>, a=<26,-18,-5> +p=<-691,2884,1024>, v=<-97,414,148>, a=<9,-30,-9> +p=<40,-3158,579>, v=<4,-451,79>, a=<-2,31,-3> +p=<14,-590,2904>, v=<2,-89,410>, a=<2,3,-28> +p=<-1640,288,2031>, v=<-229,39,292>, a=<20,0,-20> +p=<-2111,-22,822>, v=<-303,0,120>, a=<21,-3,-7> +p=<1175,2311,-311>, v=<169,330,-46>, a=<-11,-20,2> +p=<563,2848,-398>, v=<80,405,-55>, a=<-9,-32,3> +p=<2943,319,-1074>, v=<420,44,-153>, a=<-30,-4,10> +p=<3207,-36,58>, v=<452,0,9>, a=<-32,-3,-1> +p=<-719,-2708,536>, v=<-100,-387,76>, a=<1,27,-4> +p=<1340,-873,2808>, v=<192,-120,405>, a=<-7,8,-26> +p=<-708,-889,2518>, v=<-96,-122,361>, a=<5,6,-25> +p=<2505,983,-1358>, v=<357,140,-197>, a=<-30,-2,10> +p=<406,831,-3220>, v=<56,120,-456>, a=<-4,-6,34> +p=<899,2683,-376>, v=<128,383,-53>, a=<-8,-25,2> +p=<1301,-1757,2505>, v=<184,-247,357>, a=<-19,17,-29> +p=<-647,2496,-913>, v=<-92,358,-128>, a=<7,-16,5> +p=<-1699,1246,-1636>, v=<-241,178,-233>, a=<18,-13,16> +p=<1951,1901,-1288>, v=<274,271,-184>, a=<-20,-20,14> +p=<2011,-1065,1073>, v=<292,-151,157>, a=<-20,14,-10> +p=<-1761,-872,-1502>, v=<-252,-124,-213>, a=<13,4,18> +p=<92,-382,-3013>, v=<14,-52,-432>, a=<3,4,31> +p=<-482,-643,2587>, v=<-66,-91,366>, a=<5,6,-31> +p=<-1939,-1497,-528>, v=<-276,-211,-71>, a=<19,13,3> +p=<-2123,-1949,-323>, v=<-306,-275,-46>, a=<21,15,1> +p=<-3073,48,665>, v=<-440,11,95>, a=<35,2,-6> +p=<352,-1263,2998>, v=<52,-183,424>, a=<2,9,-32> +p=<-1191,1016,-2178>, v=<-173,145,-314>, a=<15,-10,21> +p=<-2760,-942,290>, v=<-395,-132,45>, a=<26,13,0> +p=<2734,-2213,976>, v=<391,-316,142>, a=<-25,19,-12> +p=<2131,-456,1805>, v=<304,-65,257>, a=<-18,2,-20> +p=<1480,-150,-2818>, v=<215,-20,-405>, a=<-13,3,34> +p=<-2797,826,-579>, v=<-399,121,-84>, a=<30,-7,8> +p=<-193,-2709,-1780>, v=<-28,-387,-250>, a=<1,25,17> +p=<-535,-1328,-2812>, v=<-76,-187,-406>, a=<6,14,28> +p=<65,2411,-424>, v=<10,344,-60>, a=<-1,-28,-2> +p=<1262,2389,1652>, v=<179,338,229>, a=<-14,-25,-15> +p=<-1429,1644,-2031>, v=<-203,231,-290>, a=<16,-16,21> +p=<776,2700,1814>, v=<110,383,259>, a=<-7,-28,-19> +p=<2561,942,1239>, v=<367,134,176>, a=<-26,-7,-12> +p=<1084,1811,2581>, v=<154,257,374>, a=<-8,-16,-24> +p=<1918,432,-2140>, v=<270,62,-301>, a=<-23,-6,18> +p=<566,1897,2782>, v=<79,278,395>, a=<-6,-17,-27> +p=<114,-1391,2554>, v=<14,-201,363>, a=<-1,14,-23> +p=<-2574,715,-1392>, v=<-368,100,-200>, a=<25,-4,8> +p=<1987,2009,1905>, v=<283,286,272>, a=<-17,-18,-19> +p=<1688,1514,2008>, v=<240,220,284>, a=<-12,-16,-22> +p=<-2447,314,-1691>, v=<-347,49,-245>, a=<24,-2,17> +p=<1217,2601,208>, v=<167,372,29>, a=<-8,-25,-1> +p=<2370,1327,-463>, v=<340,188,-66>, a=<-25,-10,6> +p=<1504,2376,470>, v=<210,341,72>, a=<-15,-24,0> +p=<2009,523,2049>, v=<283,80,294>, a=<-15,-7,-21> +p=<-2209,1407,42>, v=<-319,200,6>, a=<20,-12,0> +p=<2353,-1161,1410>, v=<332,-165,200>, a=<-20,10,-18> +p=<-3005,1094,34>, v=<-429,156,9>, a=<29,-11,2> +p=<-1801,-1231,1264>, v=<-264,-175,179>, a=<21,12,-13> +p=<-1481,2122,1247>, v=<-212,303,180>, a=<14,-16,-12> +p=<1946,-357,1631>, v=<277,-53,229>, a=<-19,5,-16> +p=<2078,1588,630>, v=<294,226,82>, a=<-20,-12,-6> +p=<-396,-2512,-590>, v=<-55,-358,-91>, a=<3,25,5> +p=<2238,1678,1694>, v=<321,243,240>, a=<-23,-22,-14> +p=<-2286,33,829>, v=<-329,5,120>, a=<17,4,-7> +p=<-2947,-396,1406>, v=<-418,-55,197>, a=<29,7,-20> +p=<-2487,-1672,-1318>, v=<-355,-236,-184>, a=<25,12,8> +p=<-2568,-938,-467>, v=<-370,-132,-65>, a=<25,5,2> +p=<-2485,-2140,-714>, v=<-356,-303,-105>, a=<24,26,7> +p=<-63,449,-3279>, v=<-6,64,-463>, a=<-3,-7,32> +p=<2411,-29,-1776>, v=<345,-4,-258>, a=<-25,0,22> +p=<2642,-810,1162>, v=<380,-114,165>, a=<-24,9,-8> +p=<2936,-408,563>, v=<417,-64,79>, a=<-26,6,-4> +p=<-1523,322,2370>, v=<-214,46,341>, a=<17,-1,-23> +p=<336,2015,-1579>, v=<45,288,-225>, a=<-5,-22,14> +p=<2712,781,1259>, v=<387,106,181>, a=<-29,-7,-12> +p=<2073,-499,-1642>, v=<297,-71,-231>, a=<-20,3,10> +p=<-1456,-2625,1183>, v=<-207,-375,176>, a=<17,26,-13> +p=<-2704,1271,-1601>, v=<-385,181,-225>, a=<26,-17,16> +p=<-838,-2449,1045>, v=<-116,-350,149>, a=<5,24,-10> +p=<284,-1816,-2676>, v=<43,-261,-382>, a=<-2,21,26> +p=<-2626,-1010,-880>, v=<-374,-143,-119>, a=<27,10,8> +p=<7,-3124,27>, v=<0,-446,2>, a=<0,31,4> +p=<3255,-402,-164>, v=<468,-58,-27>, a=<-32,1,-1> +p=<-1460,1973,-1848>, v=<-209,280,-266>, a=<8,-26,16> +p=<1204,-553,-2977>, v=<168,-79,-423>, a=<-14,6,29> +p=<-2512,-668,1766>, v=<-362,-92,250>, a=<25,9,-16> +p=<1009,-2893,-2091>, v=<146,-416,-296>, a=<-12,31,27> +p=<42,3281,555>, v=<6,470,79>, a=<4,-28,-3> +p=<-2671,-1394,-56>, v=<-382,-201,-6>, a=<21,16,-1> +p=<1626,2006,-135>, v=<233,285,-14>, a=<-16,-14,3> \ No newline at end of file diff --git a/problems/day20.html b/problems/day20.html new file mode 100644 index 0000000..03828e8 --- /dev/null +++ b/problems/day20.html @@ -0,0 +1,173 @@ + + + + +Day 20 - Advent of Code 2017 + + + + + + + +

Advent of Code

Neil Smith (AoC++) 40*

 {'year':2017}

+ + + +
+

--- Day 20: Particle Swarm ---

Suddenly, the GPU contacts you, asking for help. Someone has asked it to simulate too many particles, and it won't be able to finish them all in time to render the next frame at this rate.

+

It transmits to you a buffer (your puzzle input) listing each particle in order (starting with particle 0, then particle 1, particle 2, and so on). For each particle, it provides the X, Y, and Z coordinates for the particle's position (p), velocity (v), and acceleration (a), each in the format <X,Y,Z>.

+

Each tick, all particles are updated simultaneously. A particle's properties are updated in the following order:

+
    +
  • Increase the X velocity by the X acceleration.
  • +
  • Increase the Y velocity by the Y acceleration.
  • +
  • Increase the Z velocity by the Z acceleration.
  • +
  • Increase the X position by the X velocity.
  • +
  • Increase the Y position by the Y velocity.
  • +
  • Increase the Z position by the Z velocity.
  • +
+

Because of seemingly tenuous rationale involving z-buffering, the GPU would like to know which particle will stay closest to position <0,0,0> in the long term. Measure this using the Manhattan distance, which in this situation is simply the sum of the absolute values of a particle's X, Y, and Z position.

+

For example, suppose you are only given two particles, both of which stay entirely on the X-axis (for simplicity). Drawing the current states of particles 0 and 1 (in that order) with an adjacent a number line and diagram of current X positions (marked in parenthesis), the following would take place:

+
p=< 3,0,0>, v=< 2,0,0>, a=<-1,0,0>    -4 -3 -2 -1  0  1  2  3  4
+p=< 4,0,0>, v=< 0,0,0>, a=<-2,0,0>                         (0)(1)
+
+p=< 4,0,0>, v=< 1,0,0>, a=<-1,0,0>    -4 -3 -2 -1  0  1  2  3  4
+p=< 2,0,0>, v=<-2,0,0>, a=<-2,0,0>                      (1)   (0)
+
+p=< 4,0,0>, v=< 0,0,0>, a=<-1,0,0>    -4 -3 -2 -1  0  1  2  3  4
+p=<-2,0,0>, v=<-4,0,0>, a=<-2,0,0>          (1)               (0)
+
+p=< 3,0,0>, v=<-1,0,0>, a=<-1,0,0>    -4 -3 -2 -1  0  1  2  3  4
+p=<-8,0,0>, v=<-6,0,0>, a=<-2,0,0>                         (0)   
+
+

At this point, particle 1 will never be closer to <0,0,0> than particle 0, and so, in the long run, particle 0 will stay closest.

+

Which particle will stay closest to position <0,0,0> in the long term?

+
+

Your puzzle answer was 457.

--- Part Two ---

To simplify the problem further, the GPU would like to remove any particles that collide. Particles collide if their positions ever exactly match. Because particles are updated simultaneously, more than two particles can collide at the same time and place. Once particles collide, they are removed and cannot collide with anything else after that tick.

+

For example:

+
p=<-6,0,0>, v=< 3,0,0>, a=< 0,0,0>    
+p=<-4,0,0>, v=< 2,0,0>, a=< 0,0,0>    -6 -5 -4 -3 -2 -1  0  1  2  3
+p=<-2,0,0>, v=< 1,0,0>, a=< 0,0,0>    (0)   (1)   (2)            (3)
+p=< 3,0,0>, v=<-1,0,0>, a=< 0,0,0>
+
+p=<-3,0,0>, v=< 3,0,0>, a=< 0,0,0>    
+p=<-2,0,0>, v=< 2,0,0>, a=< 0,0,0>    -6 -5 -4 -3 -2 -1  0  1  2  3
+p=<-1,0,0>, v=< 1,0,0>, a=< 0,0,0>             (0)(1)(2)      (3)   
+p=< 2,0,0>, v=<-1,0,0>, a=< 0,0,0>
+
+p=< 0,0,0>, v=< 3,0,0>, a=< 0,0,0>    
+p=< 0,0,0>, v=< 2,0,0>, a=< 0,0,0>    -6 -5 -4 -3 -2 -1  0  1  2  3
+p=< 0,0,0>, v=< 1,0,0>, a=< 0,0,0>                       X (3)      
+p=< 1,0,0>, v=<-1,0,0>, a=< 0,0,0>
+
+------destroyed by collision------    
+------destroyed by collision------    -6 -5 -4 -3 -2 -1  0  1  2  3
+------destroyed by collision------                      (3)         
+p=< 0,0,0>, v=<-1,0,0>, a=< 0,0,0>
+
+

In this example, particles 0, 1, and 2 are simultaneously destroyed at the time and place marked X. On the next tick, particle 3 passes through unharmed.

+

How many particles are left after all collisions are resolved?

+
+

Your puzzle answer was 448.

Both parts of this puzzle are complete! They provide two gold stars: **

+

At this point, you should return to your advent calendar and try another puzzle.

+

If you still want to see it, you can get your puzzle input.

+

You can also this puzzle.

+
+ + + + + + \ No newline at end of file diff --git a/src/advent20/advent20.hs b/src/advent20/advent20.hs new file mode 100644 index 0000000..5aac088 --- /dev/null +++ b/src/advent20/advent20.hs @@ -0,0 +1,121 @@ +{-# LANGUAGE NegativeLiterals #-} +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE BangPatterns #-} + +import Data.Text (Text) +import qualified Data.Text as T +import qualified Data.Text.IO as TIO + +import Text.Megaparsec hiding (State) +import qualified Text.Megaparsec.Lexer as L +import Text.Megaparsec.Text (Parser) +import qualified Control.Applicative as CA + +-- import Data.Vector ((!), (//)) +import qualified Data.Vector as V + +import Data.List + +import qualified Data.Set as S + + +type Vec = V.Vector Integer + +data Particle = Particle + { position :: Vec + , velocity :: Vec + , acceleration :: Vec + } deriving (Show, Eq) + + +main :: IO () +main = do + text <- TIO.readFile "data/advent20.txt" + let particles = successfulParse text + print $ part1 particles + print $ part2 500 particles + + +part1 :: [Particle] -> Int +part1 particles = head $ withMinX $ simulate particles + +part2 :: Integer -> [Particle] -> Int +part2 n particles = length $ simulateC n particles + +simulate :: [Particle] -> [Particle] +simulate particles = + if all quiescent particles && length withMinXs == 1 + then particles + else simulate (map step particles) + where withMinXs = withMinX particles + + +simulateC :: Integer -> [Particle] -> [Particle] +simulateC 0 particles = particles +simulateC t particles = simulateC (t - 1) (map step particles') + where particles' = removeColliders particles + + +step :: Particle -> Particle +step particle = particle {position = p', velocity = v'} + where pv' = V.zipWith3 updatePV (position particle) (velocity particle) (acceleration particle) + !(p', v') = V.unzip pv' + updatePV p v a = (p + v + a, v + a) + + +-- Checks whether a particle could ever get closer to the origin than it is now. +quiescent :: Particle -> Bool +quiescent particle = and qDimensions + where qDimensions = V.zipWith3 sameSigns (position particle) (velocity particle) (acceleration particle) + sameSigns !p !v !a = if a == 0 && v == 0 + then True + else if a == 0 + then signum p == signum v + else signum p == signum v && signum v == signum a + + +withMinX particles = minX `elemIndices` absXs + where absXs = map pAbsX particles + minX = minimum absXs + +pAbsX :: Particle -> Integer +pAbsX particle = V.foldl1' (+) $ V.map abs (position particle) + + + +removeColliders particles = particles' + where positions = map position particles + duplicatePositions = S.fromList $ concat $ filter (\g -> length g > 1) $ group $ sort positions + particles' = filter (\p -> not (S.member (position p) duplicatePositions)) particles + + + +sc :: Parser () +sc = L.space (skipSome spaceChar) CA.empty CA.empty + +lexeme = L.lexeme sc + +integer = lexeme L.integer +signedInteger = L.signed sc integer + +symbol = L.symbol sc +separator = symbol ", " +comma = symbol "," + +particlesP = particleP `sepBy` space +particleP = particlify <$> (symbol "p=" *> vecP <* separator) + <*> (symbol "v=" *> vecP <* separator) + <*> (symbol "a=" *> vecP) + where particlify p v a = Particle {position = p, velocity = v, acceleration = a} + + +vecP = V.fromList <$> between (symbol "<") (symbol ">") (signedInteger `sepBy` comma) + + +successfulParse :: Text -> [Particle] +successfulParse input = + case parse particlesP "input" input of + Left _error -> [] -- TIO.putStr $ T.pack $ parseErrorPretty err + Right instructions -> instructions \ No newline at end of file diff --git a/src/advent20/advent20.ipynb b/src/advent20/advent20.ipynb new file mode 100644 index 0000000..c73e459 --- /dev/null +++ b/src/advent20/advent20.ipynb @@ -0,0 +1,991 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 50, + "metadata": {}, + "outputs": [], + "source": [ + "{-# LANGUAGE NegativeLiterals #-}\n", + "{-# LANGUAGE FlexibleContexts #-}\n", + "{-# LANGUAGE OverloadedStrings #-}\n", + "{-# LANGUAGE TypeFamilies #-}\n", + "{-# LANGUAGE BangPatterns #-}" + ] + }, + { + "cell_type": "code", + "execution_count": 106, + "metadata": {}, + "outputs": [], + "source": [ + "import Data.Text (Text)\n", + "import qualified Data.Text as T\n", + "import qualified Data.Text.IO as TIO\n", + "\n", + "import Text.Megaparsec hiding (State)\n", + "import qualified Text.Megaparsec.Lexer as L\n", + "import Text.Megaparsec.Text (Parser)\n", + "import qualified Control.Applicative as CA\n", + "\n", + "import qualified Data.Map.Strict as M\n", + "import Data.Map.Strict ((!))\n", + "\n", + "import Data.Vector ((!), (//))\n", + "import qualified Data.Vector as V\n", + "\n", + "import Data.List \n", + "\n", + "import qualified Data.Set as S" + ] + }, + { + "cell_type": "code", + "execution_count": 52, + "metadata": {}, + "outputs": [], + "source": [ + "type Vec = V.Vector Integer\n", + "\n", + "data Particle = Particle \n", + " { position :: Vec\n", + " , velocity :: Vec\n", + " , acceleration :: Vec\n", + " } deriving (Show, Eq)" + ] + }, + { + "cell_type": "code", + "execution_count": 53, + "metadata": {}, + "outputs": [], + "source": [ + "sc :: Parser ()\n", + "sc = L.space (skipSome spaceChar) CA.empty CA.empty\n", + "\n", + "lexeme = L.lexeme sc\n", + "\n", + "integer = lexeme L.integer\n", + "signedInteger = L.signed sc integer\n", + "\n", + "symbol = L.symbol sc\n", + "separator = symbol \", \"\n", + "comma = symbol \",\"\n", + "\n", + "particlesP = particleP `sepBy` space\n", + "particleP = particlify <$> (symbol \"p=\" *> vecP <* separator)\n", + " <*> (symbol \"v=\" *> vecP <* separator)\n", + " <*> (symbol \"a=\" *> vecP)\n", + " where particlify p v a = Particle {position = p, velocity = v, acceleration = a}\n", + "\n", + "\n", + "vecP = V.fromList <$> between (symbol \"<\") (symbol \">\") (signedInteger `sepBy` comma)\n", + "\n", + "\n", + "successfulParse :: Text -> [Particle]\n", + "successfulParse input = \n", + " case parse particlesP \"input\" input of\n", + " Left _error -> [] -- TIO.putStr $ T.pack $ parseErrorPretty err\n", + " Right instructions -> instructions" + ] + }, + { + "cell_type": "code", + "execution_count": 54, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[-833,-499,-1391]" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "parseTest vecP \"<-833,-499,-1391>\"" + ] + }, + { + "cell_type": "code", + "execution_count": 55, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Particle {position = [3,0,0], velocity = [2,0,0], acceleration = [-1,0,0]}" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "parseTest particleP \"p=< 3,0,0>, v=<2,0,0>, a=<-1,0,0>\"" + ] + }, + { + "cell_type": "code", + "execution_count": 56, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Particle {position = [4,0,0], velocity = [0,0,0], acceleration = [-2,0,0]}" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "parseTest particleP \"p=< 4,0,0>, v=< 0,0,0>, a=<-2,0,0>\"" + ] + }, + { + "cell_type": "code", + "execution_count": 57, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[Particle {position = [3,0,0], velocity = [2,0,0], acceleration = [-1,0,0]},Particle {position = [4,0,0], velocity = [0,0,0], acceleration = [-2,0,0]}]" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "parseTest particlesP \"p=< 3,0,0>, v=<2,0,0>, a=<-1,0,0>\\np=< 4,0,0>, v=< 0,0,0>, a=<-2,0,0>\"" + ] + }, + { + "cell_type": "code", + "execution_count": 58, + "metadata": {}, + "outputs": [], + "source": [ + "(p0:p1:_) = successfulParse \"p=< 3,0,0>, v=<2,0,0>, a=<-1,0,0>\\np=< 4,0,0>, v=< 0,0,0>, a=<-2,0,0>\"" + ] + }, + { + "cell_type": "code", + "execution_count": 59, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Particle {position = [3,0,0], velocity = [2,0,0], acceleration = [-1,0,0]}" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "p0" + ] + }, + { + "cell_type": "code", + "execution_count": 60, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Particle {position = [4,0,0], velocity = [0,0,0], acceleration = [-2,0,0]}" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "p1" + ] + }, + { + "cell_type": "code", + "execution_count": 61, + "metadata": {}, + "outputs": [], + "source": [ + "step :: Particle -> Particle\n", + "step particle = particle {position = p', velocity = v'}\n", + " where pv' = V.zipWith3 updatePV (position particle) (velocity particle) (acceleration particle)\n", + " !(p', v') = V.unzip pv'\n", + " updatePV p v a = (p + v + a, v + a)" + ] + }, + { + "cell_type": "code", + "execution_count": 62, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Particle {position = [-2,0,0], velocity = [-4,0,0], acceleration = [-2,0,0]}" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "step $ step p1" + ] + }, + { + "cell_type": "code", + "execution_count": 63, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Particle {position = [3,0,0], velocity = [2,0,0], acceleration = [-2,0,1]}" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "p2 = p0 {acceleration = V.fromList [-2, 0, 1]}\n", + "p2" + ] + }, + { + "cell_type": "code", + "execution_count": 64, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Particle {position = [1,0,3], velocity = [-2,0,2], acceleration = [-2,0,1]}" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "step $ step p2" + ] + }, + { + "cell_type": "code", + "execution_count": 65, + "metadata": {}, + "outputs": [], + "source": [ + "quiescent :: Particle -> Bool\n", + "quiescent particle = and qDimensions\n", + " where qDimensions = V.zipWith3 sameSigns (position particle) (velocity particle) (acceleration particle)\n", + " sameSigns !p !v !a = if a == 0 && v == 0\n", + " then True\n", + " else if a == 0\n", + " then signum p == signum v\n", + " else signum p == signum v && signum v == signum a" + ] + }, + { + "cell_type": "code", + "execution_count": 66, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "False" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "quiescent p2" + ] + }, + { + "cell_type": "code", + "execution_count": 67, + "metadata": {}, + "outputs": [], + "source": [ + "simulate :: [Particle] -> [Particle]\n", + "simulate particles = \n", + " if all quiescent particles\n", + " then particles\n", + " else simulate (map step particles)" + ] + }, + { + "cell_type": "code", + "execution_count": 68, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[Particle {position = [3,0,0], velocity = [2,0,0], acceleration = [-1,0,0]},Particle {position = [4,0,0], velocity = [0,0,0], acceleration = [-2,0,0]},Particle {position = [3,0,0], velocity = [2,0,0], acceleration = [-2,0,1]}]" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "particles = [p0, p1, p2]\n", + "particles" + ] + }, + { + "cell_type": "code", + "execution_count": 69, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[Particle {position = [-2,0,0], velocity = [-3,0,0], acceleration = [-1,0,0]},Particle {position = [-26,0,0], velocity = [-10,0,0], acceleration = [-2,0,0]},Particle {position = [-17,0,15], velocity = [-8,0,5], acceleration = [-2,0,1]}]" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "simulate particles" + ] + }, + { + "cell_type": "code", + "execution_count": 70, + "metadata": {}, + "outputs": [], + "source": [ + "pAbs :: Particle -> Particle\n", + "pAbs particle = particle {position = p', velocity = v', acceleration = a'}\n", + " where !p' = V.map abs (position particle)\n", + " !v' = V.map abs (velocity particle)\n", + " !a' = V.map abs (acceleration particle)\n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": 71, + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "data": { + "text/plain": [ + "Particle {position = [3,0,0], velocity = [2,0,0], acceleration = [-2,0,1]}" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "p2" + ] + }, + { + "cell_type": "code", + "execution_count": 72, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Particle {position = [3,0,0], velocity = [2,0,0], acceleration = [2,0,1]}" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "pAbs p2" + ] + }, + { + "cell_type": "code", + "execution_count": 73, + "metadata": {}, + "outputs": [], + "source": [ + "pMin p1 p2 = Particle {position = p', velocity = v', acceleration = a'}\n", + " where !p' = V.zipWith min (position p1) (position p2)\n", + " !v' = V.zipWith min (velocity p1) (velocity p2)\n", + " !a' = V.zipWith min (acceleration p1) (acceleration p2)" + ] + }, + { + "cell_type": "code", + "execution_count": 74, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Particle {position = [3,0,0], velocity = [2,0,0], acceleration = [-1,0,0]}" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "p0" + ] + }, + { + "cell_type": "code", + "execution_count": 75, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Particle {position = [3,0,0], velocity = [2,0,0], acceleration = [-2,0,1]}" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "p2" + ] + }, + { + "cell_type": "code", + "execution_count": 76, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Particle {position = [3,0,0], velocity = [2,0,0], acceleration = [1,0,0]}" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "pMin (pAbs p0) (pAbs p2)" + ] + }, + { + "cell_type": "code", + "execution_count": 77, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Particle {position = [3,0,0], velocity = [2,0,0], acceleration = [2,0,1]}" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "pAbs p2" + ] + }, + { + "cell_type": "code", + "execution_count": 78, + "metadata": {}, + "outputs": [], + "source": [ + "clearClosest :: [Particle] -> Maybe Int\n", + "clearClosest particles = elemIndex targetParticle absParticles\n", + " where absParticles = map pAbs particles\n", + " targetParticle = foldl1' pMin absParticles" + ] + }, + { + "cell_type": "code", + "execution_count": 79, + "metadata": {}, + "outputs": [], + "source": [ + "pAbsA :: Particle -> Integer\n", + "pAbsA particle = V.foldl1' (+) $ V.map abs (acceleration particle) " + ] + }, + { + "cell_type": "code", + "execution_count": 80, + "metadata": {}, + "outputs": [], + "source": [ + "pAbsX :: Particle -> Integer\n", + "pAbsX particle = V.foldl1' (+) $ V.map abs (position particle) " + ] + }, + { + "cell_type": "code", + "execution_count": 81, + "metadata": {}, + "outputs": [], + "source": [ + "lowestAcc particles = elemIndices minAcc absAccs\n", + " where absAccs = map pAbsA particles\n", + " minAcc = minimum absAccs" + ] + }, + { + "cell_type": "code", + "execution_count": 82, + "metadata": {}, + "outputs": [], + "source": [ + "main :: IO ()\n", + "main = do \n", + " text <- TIO.readFile \"../../data/advent20.txt\"\n", + " let particles = successfulParse text\n", + "-- print particles\n", + " print $ lowestAcc particles\n", + "-- print $ part2 instrs" + ] + }, + { + "cell_type": "code", + "execution_count": 83, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[21,457]" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "main" + ] + }, + { + "cell_type": "code", + "execution_count": 84, + "metadata": {}, + "outputs": [], + "source": [ + "-- particles!!21" + ] + }, + { + "cell_type": "code", + "execution_count": 85, + "metadata": {}, + "outputs": [], + "source": [ + "-- particles!!457" + ] + }, + { + "cell_type": "code", + "execution_count": 86, + "metadata": {}, + "outputs": [], + "source": [ + "withMinX particles = minX `elemIndices` absXs\n", + " where absXs = map pAbsX particles\n", + " minX = minimum absXs" + ] + }, + { + "cell_type": "code", + "execution_count": 87, + "metadata": {}, + "outputs": [], + "source": [ + "simulateQ :: [Particle] -> [Particle]\n", + "simulateQ particles = \n", + " if all quiescent particles\n", + " then particles\n", + " else simulateQ (map step particles)" + ] + }, + { + "cell_type": "code", + "execution_count": 88, + "metadata": {}, + "outputs": [], + "source": [ + "simulate :: [Particle] -> [Particle]\n", + "simulate particles = \n", + " if all quiescent particles && length withMinXs == 1\n", + " then particles\n", + " else simulate (map step particles)\n", + " where withMinXs = withMinX particles" + ] + }, + { + "cell_type": "code", + "execution_count": 89, + "metadata": {}, + "outputs": [], + "source": [ + "pf = simulate particles" + ] + }, + { + "cell_type": "code", + "execution_count": 90, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[0]" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "withMinX pf" + ] + }, + { + "cell_type": "code", + "execution_count": 100, + "metadata": {}, + "outputs": [], + "source": [ + "-- part1 particles = head minInContext\n", + "-- where pf = simulate slowParticles\n", + "-- slowIndices = lowestAcc particles\n", + "-- slowParticles = map (particles !!) slowIndices\n", + "-- minInContext = map (slowIndices !!) $ withMinX pf" + ] + }, + { + "cell_type": "code", + "execution_count": 103, + "metadata": {}, + "outputs": [], + "source": [ + "part1 particles = head $ withMinX pf\n", + " where pf = simulate particles" + ] + }, + { + "cell_type": "code", + "execution_count": 104, + "metadata": {}, + "outputs": [], + "source": [ + "main :: IO ()\n", + "main = do \n", + " text <- TIO.readFile \"../../data/advent20.txt\"\n", + " let particles = successfulParse text\n", + " print $ part1 particles\n", + "-- print $ part2 instrs" + ] + }, + { + "cell_type": "code", + "execution_count": 93, + "metadata": {}, + "outputs": [], + "source": [ + "-- main" + ] + }, + { + "cell_type": "code", + "execution_count": 94, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
Use head
Found:
particles !! 0
Why Not:
head particles
" + ], + "text/plain": [ + "Line 1: Use head\n", + "Found:\n", + "particles !! 0\n", + "Why not:\n", + "head particles" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": [ + "Particle {position = [-833,-499,-1391], velocity = [84,17,61], acceleration = [-4,1,1]}" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "text <- TIO.readFile \"../../data/advent20.txt\"\n", + "particles = successfulParse text\n", + "particles!!0" + ] + }, + { + "cell_type": "code", + "execution_count": 96, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[Particle {position = [-59,74,-188], velocity = [-29,97,-150], acceleration = [-1,0,0]},Particle {position = [98,72,-533], velocity = [37,12,-172], acceleration = [0,1,0]}]" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "simulateQ $ map (particles !!) $ lowestAcc particles" + ] + }, + { + "cell_type": "code", + "execution_count": 97, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[Particle {position = [-59,74,-188], velocity = [-29,97,-150], acceleration = [-1,0,0]},Particle {position = [98,72,-533], velocity = [37,12,-172], acceleration = [0,1,0]}]" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "simulate $ map (particles !!) $ lowestAcc particles" + ] + }, + { + "cell_type": "code", + "execution_count": 105, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "457" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "main" + ] + }, + { + "cell_type": "code", + "execution_count": 116, + "metadata": {}, + "outputs": [], + "source": [ + "removeColliders particles = particles'\n", + " where positions = map position particles\n", + " duplicatePositions = S.fromList $ concat $ filter (\\g -> length g > 1) $ group $ sort positions\n", + " particles' = filter (\\p -> not (S.member (position p) duplicatePositions)) particles" + ] + }, + { + "cell_type": "code", + "execution_count": 117, + "metadata": {}, + "outputs": [], + "source": [ + "simulateC :: Integer -> [Particle] -> [Particle]\n", + "simulateC 0 particles = particles\n", + "simulateC t particles = simulateC (t - 1) (map step particles')\n", + " where particles' = removeColliders particles" + ] + }, + { + "cell_type": "code", + "execution_count": 118, + "metadata": {}, + "outputs": [], + "source": [ + "part2 n particles = length $ simulateC n particles" + ] + }, + { + "cell_type": "code", + "execution_count": 119, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "1000" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "length particles" + ] + }, + { + "cell_type": "code", + "execution_count": 123, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "448" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "part2 500 particles" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Haskell", + "language": "haskell", + "name": "haskell" + }, + "language_info": { + "codemirror_mode": "ihaskell", + "file_extension": ".hs", + "name": "haskell", + "version": "8.0.2" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} -- 2.34.1