diff --git a/2023/24/NeverTellMeTheOdds.csproj b/2023/24/NeverTellMeTheOdds.csproj new file mode 100644 index 0000000..2150e37 --- /dev/null +++ b/2023/24/NeverTellMeTheOdds.csproj @@ -0,0 +1,10 @@ + + + + Exe + net8.0 + enable + enable + + + diff --git a/2023/24/Program.cs b/2023/24/Program.cs new file mode 100644 index 0000000..df1d159 --- /dev/null +++ b/2023/24/Program.cs @@ -0,0 +1,113 @@ +// Day 24 + +using System.Numerics; + +var sample = new MemoryStream(""" + 19, 13, 30 @ -2, 1, -2 + 18, 19, 22 @ -1, -1, -2 + 20, 25, 34 @ -2, -2, -4 + 12, 31, 28 @ -1, -2, -1 + 20, 19, 15 @ 1, -5, -3 + """u8.ToArray()); + +List stones = [ ]; + +using var input = Console.IsInputRedirected ? Console.OpenStandardInput() : sample; +using var reader = new StreamReader(input); +while (!reader.EndOfStream) +{ + stones.Add(Hailstone.Parse(reader.ReadLine()!)); +} + +var min = float.Parse(args[0]); +var max = float.Parse(args[1]); +var useZ = bool.Parse(args[2]); + +// Find where the vectors intercept on X&Y (use args 7 27 false) +var part1 = stones.SelectMany(stone => + stones + .Skip(stones.IndexOf(stone) + 1) + .Select(other => + ( + A: stone.Position, + AV: stone.Vector, + B: other.Position, + BV: other.Vector, + Intersect: FindIntersection( + stone.Position with { Z = 0 }, + stone.Vector with { Z = 0 }, + other.Position with { Z = 0 }, + other.Vector with { Z = 0 }))) + .Where(result => result.Intersect.HasValue) + .Where(result => result.Intersect.Value.X >= min && result.Intersect.Value.X <= max) + .Where(result => result.Intersect.Value.Y >= min && result.Intersect.Value.Y <= max) + .Where(result => !useZ || (result.Intersect.Value.Z >= min && result.Intersect.Value.Z <= max)) + .Where(result => + { + switch (result.AV.X) + { + // Make sure the movement was FORWARD in time and not BACKWARD + case < 0 when !(result.Intersect.Value.X <= result.A.X): + case > 0 when !(result.Intersect.Value.X >= result.A.X): + return false; + } + + switch (result.BV.X) + { + case < 0 when !(result.Intersect.Value.X <= result.B.X): + case > 0 when !(result.Intersect.Value.X >= result.B.X): + return false; + } + + return true; + }) + .Select(result => result) +).ToArray(); + +Console.WriteLine($"Part 1 : {part1.Length}"); + +return; + +Vector3? FindIntersection(Vector3 point1, Vector3 vector1, Vector3 point2, Vector3 vector2) +{ + var cross = Vector3.Cross(vector1, vector2); + var denominator = cross.GetMagnitude() * cross.GetMagnitude(); + if (denominator == 0) + { + return null; + } + + var p = point2 - point1; + var t1 = Vector3.Dot(Vector3.Cross(p, vector2), cross) / denominator; + var t2 = Vector3.Dot(Vector3.Cross(p, vector1), cross) / denominator; + + var intersection = point1 + vector1 * t1; + return intersection; +} + +internal class Hailstone(Vector3 position, Vector3 vector) +{ + private static readonly char[] separators = { ',', '@' }; + + public Vector3 Position => position; + + public Vector3 Vector => vector; + + public static Hailstone Parse(string line) + { + var parts = line + .Split(separators, StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries) + .Select(float.Parse) + .ToArray(); + + return new Hailstone( + new Vector3(parts[0], parts[1], parts[2]), + new Vector3(parts[3], parts[4], parts[5])); + } +} + +internal static class Vector3Extensions +{ + public static float GetMagnitude(this Vector3 input) => + MathF.Sqrt(input.X * input.X + input.Y * input.Y + input.Z * input.Z); +} diff --git a/2023/24/README.md b/2023/24/README.md new file mode 100644 index 0000000..8453d5d --- /dev/null +++ b/2023/24/README.md @@ -0,0 +1,137 @@ +```text + +``` + +## Part One + +At one point I'm positive I knew the formula for vector algebra that this required. I certainly couldn't remember it though. I had to Google/Bing/Copilot my way to the algorithm and then figure out how to bend it so that I could get my answer. + +## Part Two + +Yeah no clue how to do this (yet). Looked at a couple of other solves on GitHub and it looks like they're all using prepackaged libraries to do the work. Not sure how I feel about that. + +----- + +--- Day 24: Never Tell Me The Odds --- + +It seems like something is going wrong with the snow-making process. Instead of forming snow, the water that's been absorbed into the air seems to be forming hail! + +Maybe there's something you can do to break up the hailstones? + +Due to strong, probably-magical winds, the hailstones are all flying through the air in perfectly linear trajectories. You make a note of each hailstone's **position** and **velocity** (your puzzle input). For example: + +```text +19, 13, 30 @ -2, 1, -2 +18, 19, 22 @ -1, -1, -2 +20, 25, 34 @ -2, -2, -4 +12, 31, 28 @ -1, -2, -1 +20, 19, 15 @ 1, -5, -3 +``` + +Each line of text corresponds to the position and velocity of a single hailstone. The positions indicate where the hailstones are **right now** (at time `0`). The velocities are constant and indicate exactly how far each hailstone will move in **one nanosecond.** + +Each line of text uses the format `px py pz @ vx vy vz`. For instance, the hailstone specified by `20, 19, 15 @ 1, -5, -3` has initial X position `20`, Y position `19`, Z position `15`, X velocity `1`, Y velocity `-5`, and Z velocity `-3`. After one nanosecond, the hailstone would be at `21, 14, 12`. + +Perhaps you won't have to do anything. How likely are the hailstones to collide with each other and smash into tiny ice crystals? + +To estimate this, consider only the X and Y axes; **ignore the Z axis**. Looking **forward in time**, how many of the hailstones' **paths** will intersect within a test area? (The hailstones themselves don't have to collide, just test for intersections between the paths they will trace.) + +In this example, look for intersections that happen with an X and Y position each at least `7` and at most `27`; in your actual data, you'll need to check a much larger test area. Comparing all pairs of hailstones' future paths produces the following results: + +```text +Hailstone A: 19, 13, 30 @ -2, 1, -2 +Hailstone B: 18, 19, 22 @ -1, -1, -2 +Hailstones' paths will cross inside the test area (at x=14.333, y=15.333). + +Hailstone A: 19, 13, 30 @ -2, 1, -2 +Hailstone B: 20, 25, 34 @ -2, -2, -4 +Hailstones' paths will cross inside the test area (at x=11.667, y=16.667). + +Hailstone A: 19, 13, 30 @ -2, 1, -2 +Hailstone B: 12, 31, 28 @ -1, -2, -1 +Hailstones' paths will cross outside the test area (at x=6.2, y=19.4). + +Hailstone A: 19, 13, 30 @ -2, 1, -2 +Hailstone B: 20, 19, 15 @ 1, -5, -3 +Hailstones' paths crossed in the past for hailstone A. + +Hailstone A: 18, 19, 22 @ -1, -1, -2 +Hailstone B: 20, 25, 34 @ -2, -2, -4 +Hailstones' paths are parallel; they never intersect. + +Hailstone A: 18, 19, 22 @ -1, -1, -2 +Hailstone B: 12, 31, 28 @ -1, -2, -1 +Hailstones' paths will cross outside the test area (at x=-6, y=-5). + +Hailstone A: 18, 19, 22 @ -1, -1, -2 +Hailstone B: 20, 19, 15 @ 1, -5, -3 +Hailstones' paths crossed in the past for both hailstones. + +Hailstone A: 20, 25, 34 @ -2, -2, -4 +Hailstone B: 12, 31, 28 @ -1, -2, -1 +Hailstones' paths will cross outside the test area (at x=-2, y=3). + +Hailstone A: 20, 25, 34 @ -2, -2, -4 +Hailstone B: 20, 19, 15 @ 1, -5, -3 +Hailstones' paths crossed in the past for hailstone B. + +Hailstone A: 12, 31, 28 @ -1, -2, -1 +Hailstone B: 20, 19, 15 @ 1, -5, -3 +Hailstones' paths crossed in the past for both hailstones. +``` + +So, in this example, `2` hailstones' future paths cross inside the boundaries of the test area. + +However, you'll need to search a much larger test area if you want to see if any hailstones might collide. Look for intersections that happen with an X and Y position each at least `200000000000000` and at most `400000000000000`. Disregard the Z axis entirely. + +Considering only the X and Y axes, check all pairs of hailstones' future paths for intersections. **How many of these intersections occur within the test area?** + +Your puzzle answer was `11246`. + +The first half of this puzzle is complete! It provides one gold star: * + +--- Part Two --- + +Upon further analysis, it doesn't seem like **any** hailstones will naturally collide. It's up to you to fix that! + +You find a rock on the ground nearby. While it seems extremely unlikely, if you throw it just right, you should be able to **hit every hailstone in a single throw!** + +You can use the probably-magical winds to reach **any integer position** you like and to propel the rock at **any integer velocity**. Now **including the Z axis** in your calculations, if you throw the rock at time `0`, where do you need to be so that the rock **perfectly collides with every hailstone?** Due to probably-magical inertia, the rock won't slow down or change direction when it collides with a hailstone. + +In the example above, you can achieve this by moving to position `24, 13, 10` and throwing the rock at velocity `-3, 1, 2`. If you do this, you will hit every hailstone as follows: + +```text +Hailstone: 19, 13, 30 @ -2, 1, -2 +Collision time: 5 +Collision position: 9, 18, 20 + +Hailstone: 18, 19, 22 @ -1, -1, -2 +Collision time: 3 +Collision position: 15, 16, 16 + +Hailstone: 20, 25, 34 @ -2, -2, -4 +Collision time: 4 +Collision position: 12, 17, 18 + +Hailstone: 12, 31, 28 @ -1, -2, -1 +Collision time: 6 +Collision position: 6, 19, 22 + +Hailstone: 20, 19, 15 @ 1, -5, -3 +Collision time: 1 +Collision position: 21, 14, 12 +``` + +Above, each hailstone is identified by its initial position and its velocity. Then, the time and position of that hailstone's collision with your rock are given. + +After 1 nanosecond, the rock has **exactly the same position** as one of the hailstones, obliterating it into ice dust! Another hailstone is smashed to bits two nanoseconds after that. After a total of 6 nanoseconds, all of the hailstones have been destroyed. + +So, at time `0`, the rock needs to be at X position `24`, Y position `13`, and Z position `10`. Adding these three coordinates together produces `47`. (Don't add any coordinates from the rock's velocity.) + +Determine the exact position and velocity the rock needs to have at time `0` so that it perfectly collides with every hailstone. **What do you get if you add up the X, Y, and Z coordinates of that initial position?** + +Answer: (still unsolved :cry::cry::cry:) + +Although it hasn't changed, you can still get your puzzle input. + +You can also [Share] this puzzle. \ No newline at end of file diff --git a/2023/24/input.txt b/2023/24/input.txt new file mode 100644 index 0000000..5ce4905 --- /dev/null +++ b/2023/24/input.txt @@ -0,0 +1,300 @@ +211614908752320, 355884497165907, 259696313651729 @ 15, -119, 26 +403760160726375, 378047702508912, 174017730109516 @ -18, -130, 147 +144186255945915, 328686782113692, 276690520845056 @ -7, 147, -255 +299201969056161, 237456995776920, 10519998213462 @ 93, 50, 366 +318259016385963, 232634818611690, 332436547677046 @ 6, 92, -77 +182094293871285, 72341961784191, 304755840896330 @ 180, 539, -69 +428102985562479, 255668101996532, 347949766680952 @ -6, 6, -51 +265205751494415, 117325248112152, 245027868910001 @ -102, 578, 72 +452217528050943, 286665882818040, 248755982783600 @ -29, -28, 56 +363767786545425, 350244045720012, 277119675028766 @ 69, -96, 26 +175059969021403, 443880319406260, 169810040061584 @ -47, -711, 581 +295365595505560, 310862797921357, 273955223964786 @ -37, -17, 7 +336065438592783, 289623946138428, 321449558987792 @ -122, 27, -91 +374184446251122, 284574855207912, 304174931432690 @ 7, -14, -13 +168237882157272, 346263090253971, 251078077465445 @ 9, -81, 56 +335791575534727, 243083744937704, 386815667680540 @ -28, 78, -168 +323491800090507, 250641321294870, 328399272853310 @ 112, 9, -28 +344319917883000, 213349059867777, 314626310318096 @ 99, 43, -11 +201765060902835, 415682054068614, 365075113180658 @ -20, -371, -414 +323009069498575, 217364865099527, 301782396735226 @ 26, 99, -21 +385074021666669, 349312676692378, 375651665665970 @ 51, -95, -76 +157713165610647, 198310004445402, 22890184788908 @ 222, 301, 655 +176561952524453, 322214397607326, 268798693166474 @ 7, 47, -40 +291779029514815, 331467079175460, 216541908079920 @ 50, -67, 109 +210657150937203, 256486703601870, 135853247956106 @ -72, 299, 548 +551779757708541, 478287219295908, 131467018323890 @ -112, -226, 175 +187861223504779, 454311799319199, 215177214555615 @ 62, -493, 190 +385809457044228, 288546261602878, 276306513548648 @ 69, -36, 29 +165161676196158, 313098140977488, 254687084542802 @ -11, 154, 31 +274495339466845, 216958632951452, 112717680578586 @ 97, 100, 258 +550245748475507, 293045127777944, 193291442627404 @ -109, -38, 112 +221810693352743, 334757450467362, 234341692055314 @ 98, -64, 91 +455233662388727, 212300216045024, 152685923161686 @ -98, 78, 178 +405152080588239, 199145876202792, 236639354391272 @ -18, 86, 71 +318234904498404, 218169564633210, 466437175473194 @ 73, 72, -221 +164866669018875, 331872693136016, 253654504236116 @ -15, 24, 38 +348772979330845, 237791211671167, 100796867119211 @ 76, 27, 218 +162571663403789, 325100399890720, 254651637717786 @ -41, 94, 28 +321477493578440, 145353754491532, 206781095830811 @ -13, 246, 128 +220706950350829, 322939264476282, 255625672837640 @ 23, -19, 41 +364110351231620, 360906415942259, 296612614223727 @ -5, -111, -8 +282142789010131, 373447590903846, 286416598051511 @ -26, -148, -22 +254516059743315, 332015709917304, 257175000505730 @ 60, -62, 42 +333066924583638, 387008748513504, 409950354078731 @ -73, -166, -242 +242151057757047, 308647660001232, 219400356941894 @ 14, 6, 134 +228827179587725, 347035325067872, 194339961778076 @ -11, -90, 227 +361655333991591, 298357671445992, 279056018432828 @ 36, -34, 20 +163789996652823, 285283788844704, 222421318299068 @ 212, 64, 126 +514936975587279, 249710693547413, 265387880955191 @ -102, 13, 38 +330993137893335, 466405780567152, 301940022367256 @ 45, -251, -14 +359211656058084, 278595151721646, 154226481791816 @ 31, -8, 173 +232590030383045, 299373350309501, 278852574489409 @ 20, 37, -20 +151637598287291, 341184375143009, 247633072427896 @ -26, -21, 93 +153132266118769, 457543926115348, 216742652126134 @ 61, -900, 310 +302888695909138, 368376738599425, 304394429485492 @ -107, -141, -71 +347665791890242, 551624946642285, 365737809278091 @ -287, -637, -252 +121774990081803, 73727444507760, 167223368966225 @ 318, 554, 252 +401772686422497, 476227601411638, 243347562730198 @ -156, -312, 67 +132646999830279, 350645285157288, 268873341994304 @ 177, -116, -113 +317753042975691, 283749040224540, 281320165712684 @ 53, -5, 12 +322944551680063, 41872960212008, 277122494304 @ 46, 328, 399 +358447345265590, 288331924204997, 468076259160066 @ -101, 13, -333 +273797917143528, 224859293088372, 323596507578221 @ 101, 86, -52 +346847869379910, 269594425171732, 276001449377636 @ -9, 22, 17 +219572829128505, 315909995386982, 207996574350646 @ 108, -24, 147 +137695808536015, 342484565908782, 246084757827996 @ -46, 11, 151 +255451942323559, 267797877558674, 240388276504590 @ 94, 43, 72 +295801938702255, 249838813844796, 284626774287632 @ 70, 49, 5 +179016424029727, 323016348011000, 241022532170128 @ 52, 19, 100 +167633393777439, 321341610501576, 269126742671696 @ 98, 29, -27 +441947422180851, 359849746462426, 252381197934007 @ -66, -108, 52 +252266663095855, 460002609864472, 438477057945311 @ 58, -318, -322 +465344209689279, 494021580646536, 360613977396992 @ -108, -277, -84 +300673952302918, 266934555313620, 413194881091151 @ -131, 110, -352 +142480241678075, 311774584627968, 284501811398793 @ 110, 218, -228 +369665464372489, 255932214675268, 236678892720774 @ 7, 24, 72 +361019223149160, 462963635705835, 328856918843045 @ 55, -223, -34 +251482411283119, 100707702168680, 138709854343568 @ 158, 222, 197 +383552761608867, 280038804699714, 322425475705550 @ -88, 13, -58 +288135075024436, 250381752412460, 257533557039166 @ 43, 70, 43 +263774935817781, 172282785761106, 253008958063700 @ 127, 149, 51 +309763392284427, 311296114938380, 271062265337016 @ 132, -56, 33 +301001343371127, 327179755069914, 413455488186956 @ 34, -60, -207 +352010002527787, 130157863088311, 342411474373570 @ 14, 199, -69 +275697607581743, 307161844710448, 354053098360152 @ 164, -51, -54 +330459086065363, 269758918563907, 259643567841590 @ -146, 81, 35 +148163101176580, 291698015244111, 269328551145889 @ -65, 617, -170 +198111618682210, 105841304495082, 286120360441411 @ 191, 320, -6 +162961490534353, 332440122891046, 336951600420026 @ 13, 15, -532 +405639449702891, 291706326406886, 145272035969698 @ -124, -5, 220 +243804339318837, 226240285217460, 29859328471577 @ 76, 150, 496 +197800339933047, 271830945164232, 367869903891440 @ 171, 56, -175 +406724693443239, 241807137736104, 314696779559760 @ 36, 14, -11 +173636071165053, 226468404616737, 164705883509192 @ 52, 501, 477 +326654248083001, 293792922566418, 361502076555343 @ 76, -28, -80 +430595905434495, 260282503169916, 347475723896696 @ -30, 7, -57 +232182481602579, 383750910853752, 255984862513976 @ 69, -174, 43 +189025120992543, 328694271503832, 256539473997488 @ 54, -19, 34 +407968304593555, 320079534206223, 263553677553358 @ -10, -61, 39 +364275253471545, 287231197764822, 348936712408196 @ 91, -35, -41 +421249510912695, 188787696184566, 334982833308812 @ -130, 147, -73 +300283114830065, 181321832320222, 205316302947601 @ 64, 148, 120 +340126540612280, 359557604390312, 263467149056871 @ 11, -110, 36 +364165767457087, 200497415869784, 369368090526832 @ 17, 93, -96 +277755329542383, 349940191218093, 336331394887856 @ 26, -97, -107 +138415384470152, 334641691976715, 254526121127635 @ 59, 77, 16 +373143036466180, 254055784510572, 232272237854351 @ -29, 38, 80 +360095961890995, 418090814400102, 75842161857091 @ -26, -196, 310 +387878741741112, 299675709788031, 86219312893558 @ -21, -31, 267 +459492958927327, 419695633132408, 107129902338448 @ -64, -176, 219 +262151018181855, 301075690120368, 267015138943130 @ 10, 10, 19 +172711832038128, 470507998141668, 236795797881179 @ 53, -698, 126 +275282008621855, 398772839429712, 384294979252656 @ -38, -211, -255 +320341543588441, 305571718466405, 296146408946274 @ -8, -23, -21 +463502940217750, 354453016040922, 170195952672736 @ -11, -100, 133 +367095149305728, 478830362368800, 406984113687242 @ 69, -230, -109 +209676334046111, 303673395986349, 259187675809877 @ 74, 29, 32 +377925946296651, 425923156561704, 316583789589164 @ -128, -230, -61 +182812118916647, 402549695969032, 190315001521788 @ 86, -294, 279 +180734246696391, 109687779340184, 272908130196488 @ 96, 778, -25 +172423631308562, 256707146741797, 332355809864504 @ 181, 151, -163 +349216488619770, 189962689806727, 214490299179771 @ -15, 141, 108 +142109299830756, 391599105514608, 344267804805542 @ 109, -470, -753 +471850720396125, 325847388538242, 336681153703046 @ -33, -71, -34 +162563577948905, 319601223302132, 287184221206286 @ -37, 136, -232 +200472390054655, 386881951283192, 337135005576496 @ 143, -180, -138 +428566235863089, 232622832331678, 359441772649266 @ 12, 24, -57 +556082973301542, 382313514850248, 538120882389071 @ -291, -142, -352 +428504116618959, 318934239376392, 330564113690672 @ -41, -59, -41 +125771848734261, 100646862289632, 97157765083994 @ 319, 206, 240 +251105840946552, 226625940982293, 343862992641776 @ 97, 117, -107 +420569472769808, 433894713134428, 358987173728024 @ -281, -266, -163 +468322310949783, 428267301177852, 398834673298310 @ -286, -234, -205 +140079161306313, 305295637965126, 336925114702778 @ 173, 195, -520 +352527886230222, 345103378422816, 321783699214007 @ -251, -86, -120 +404651949499944, 249335201669439, 293346206679878 @ 13, 15, 7 +124898607799303, 327646553468573, 290251890721069 @ 194, 249, -588 +385707055746621, 281566614691761, 211113124805093 @ 44, -23, 96 +213682466545960, 238497873422112, 283818216144276 @ -115, 410, -95 +231007854214189, 370268929443801, 213310422841645 @ 64, -145, 142 +145295172323780, 330684286330813, 196611558076210 @ -125, 187, 927 +204018681225759, 139289655220920, 373732658221712 @ 132, 380, -224 +451601200995447, 241120183381090, 433704868059832 @ -126, 52, -195 +257955604110683, 278578988839665, 378182618847365 @ 166, -13, -94 +440576806663879, 287191129511083, 429870207858869 @ -46, -23, -154 +225569763939479, 301793272650684, 268310668480512 @ -112, 95, -15 +220396020977135, 188346183166872, 113778150813176 @ 190, 122, 239 +381735112974135, 235366483164207, 197191482469136 @ 18, 39, 117 +390945344432775, 314623453078152, 318126822392936 @ 21, -56, -22 +478267976520000, 559072029454752, 428757300169046 @ -123, -358, -169 +157747933639935, 341986647771876, 317869413392084 @ 130, -63, -270 +390049800964891, 352703597593702, 313370636454570 @ 16, -99, -18 +295149869346795, 309147927163668, 346348692606440 @ 25, -27, -109 +316976763160410, 342628227710127, 249016507297356 @ 15, -85, 57 +311810064929405, 434605794025402, 331115485829986 @ 97, -197, -42 +348857295630309, 319667974298114, 275371933774200 @ -99, -41, 9 +304528719401496, 322428097235017, 222446734703593 @ -141, -29, 126 +347423237280059, 280016381064528, 510133620437332 @ -217, 68, -560 +143628874024415, 44704071847896, 46434787400944 @ 260, 695, 586 +378774304740492, 269629243456494, 337961464815746 @ 57, -12, -37 +236729459913485, 283048917695392, 169932580658386 @ 80, 42, 223 +400479285688179, 293099591258496, 321042325031204 @ -9, -28, -30 +526627789459535, 199189964390532, 261706829712936 @ -74, 53, 43 +231873347581497, 228936830810981, 124011484061160 @ -24, 273, 445 +380661871053103, 219931671824280, 404057464337054 @ 34, 50, -118 +238923872836974, 213643317430638, 183374608462102 @ 183, 68, 135 +328838947501529, 121509352098788, 250384495327228 @ -31, 292, 55 +228907785646839, 391257764379060, 260361283293552 @ 126, -172, 37 +402041633758869, 460419763945214, 430493599605756 @ 27, -213, -137 +348003782002079, 181189921736117, 106988334090096 @ 74, 91, 213 +357584701817886, 263773054518984, 279500676646709 @ 11, 18, 16 +380172788570979, 166471097019820, 452803077291020 @ -51, 169, -238 +388999744892525, 280496336994704, 291736779225446 @ 25, -18, 8 +301383255373791, 372720056147988, 188712615629660 @ 42, -132, 151 +329304833316210, 274425964773873, 260718659021138 @ 5, 19, 39 +311466386519507, 96649444008371, 313284948895406 @ 46, 273, -37 +185939224908760, 320011554704831, 257739056710849 @ 5, 39, 24 +230672987393745, 252398417048062, 311449534512026 @ 153, 55, -40 +447928963042282, 120384448339850, 350243227249547 @ -103, 204, -76 +555666261379266, 150862287939305, 274071474487194 @ -99, 99, 31 +294774718261411, 359632149086416, 263244171782098 @ -112, -122, 24 +421976776176347, 288452563320698, 308559702330699 @ 14, -32, -6 +178632708475203, 253670497950012, 266002585656356 @ -56, 496, -37 +178424272883350, 384226854591646, 226865879586490 @ 65, -248, 159 +165242436221217, 249830432809386, 225633446662766 @ 227, 115, 108 +207562723569663, 433865975880060, 235271219924864 @ -94, -493, 129 +204220815116935, 273948999417062, 122013306054280 @ 130, 76, 349 +527266651597413, 396177826803597, 336177020137151 @ -228, -159, -62 +437235429689259, 411408965055240, 170109611905934 @ -36, -166, 146 +137934844791873, 371061400453614, 262304675137592 @ 69, -373, -79 +138043080905860, 258152665669800, 273084376004030 @ 205, 434, -73 +347553200559909, 497733200698074, 281348720100152 @ -197, -435, -15 +355106978155837, 127767507906877, 319142782197272 @ 76, 141, -19 +527503060917879, 384598991061180, 320700051276122 @ -282, -148, -50 +155775739311285, 255846326136597, 238096757766791 @ 60, 545, 146 +140793000076703, 335426528146232, 225646825437520 @ -43, 106, 454 +175141193187309, 240258294189258, 215446294754282 @ -141, 777, 344 +230456206648035, 343457527437032, 243975383701716 @ -135, -74, 84 +137474573402235, 317172925123182, 271763053254146 @ 80, 281, -190 +372843073005479, 258821276278104, 308759208954840 @ -82, 50, -39 +425379130594119, 466047503972188, 373485245454300 @ -108, -261, -120 +182404253597027, 308382346156135, 240525624332081 @ 62, 69, 98 +228491894553271, 329792411385424, 362004434641008 @ 83, -53, -191 +272756208505527, 384060932494020, 215849631281348 @ -24, -175, 134 +371772599919234, 98753159192019, 214988767378696 @ 51, 179, 93 +169175030500965, 313508551305607, 308493432952016 @ -24, 141, -331 +343391147120847, 165822458517783, 332405692217123 @ 58, 125, -44 +135774114828375, 335474272760952, 247306011402956 @ 164, 18, 90 +134761647538829, 335253048797336, 240099372942852 @ 43, 114, 235 +255389747327262, 371985765780894, 48796064450762 @ 107, -132, 379 +416511150760947, 150410133924360, 448530132838140 @ 21, 110, -150 +181669708972125, 207628979557632, 372001097439506 @ 173, 246, -238 +487462723420537, 305743518112066, 196261124488078 @ -79, -47, 114 +348283015996251, 269590133675880, 276875743435292 @ 83, -10, 26 +466536745474320, 550857187204082, 243878559608001 @ -171, -384, 64 +272421916678586, 358752155985756, 232779476910351 @ -209, -130, 118 +388585831346970, 145796987707767, 359831806666826 @ -117, 239, -125 +144810074003995, 282906185857336, 195829724245948 @ 220, 162, 271 +279502959531190, 386709946322157, 289066633848156 @ 139, -139, 9 +337769989927805, 286505021641242, 277151164567256 @ 19, -7, 17 +531944593729485, 335431673262262, 380750352097636 @ -120, -80, -87 +312024176724126, 318350498842017, 225559643612843 @ 37, -49, 92 +379631519194911, 160045802706207, 298122510808988 @ -54, 181, -15 +218940979596253, 316750353909189, 253358234303023 @ -68, 29, 46 +259302924675200, 38580825638515, 418716187246388 @ 115, 373, -199 +380414553845407, 178371604588452, 454504606694500 @ 74, 71, -144 +414254294662485, 353905269739150, 521352034155096 @ -45, -101, -287 +368979047669183, 219670312995304, 264237712285456 @ -68, 109, 33 +305708790093595, 333930686604220, 288194530221880 @ -155, -57, -41 +257141402505311, 346353776273784, 223269738654256 @ -92, -88, 138 +153435127117736, 357029369808985, 249713318957946 @ 131, -141, 63 +218567104021215, 305129869297592, 263522754518856 @ 66, 18, 22 +438386109342504, 227370755621724, 235979085651913 @ -21, 38, 70 +157907708824936, 353727029119893, 329271878017145 @ 77, -127, -424 +156116608023995, 325217829085712, 246072108550236 @ -137, 180, 118 +171670194322083, 184968002527100, 177472208714616 @ 189, 325, 243 +144782907440151, 338525663598904, 257623744031340 @ -36, 34, -26 +540947068892649, 521979318632742, 505208567973728 @ -232, -324, -283 +232260396941316, 373790886879497, 149072328124817 @ 171, -129, 194 +324350482477701, 201654345014034, 363010984717115 @ 112, 60, -64 +490563922367253, 553247038292253, 262988318876930 @ -128, -345, 39 +424865310003758, 501293908349066, 396718489718403 @ -343, -428, -264 +325774618118255, 262771647798968, 214605237901872 @ 115, -6, 91 +288790146461704, 251864021332367, 173189006816973 @ -107, 151, 252 +218454094197103, 240225709111291, 370937684325060 @ 122, 127, -191 +318781766985873, 332020026108936, 301912826084132 @ 33, -70, -21 +162399844340535, 340661112680232, 262097455491136 @ 9, -40, -21 +353388569632685, 331996961927210, 351403863656344 @ 55, -75, -63 +179750014788707, 194959976161392, 12099837575718 @ 256, 86, 334 +131928261996867, 371795167952712, 252992555211692 @ 96, -454, 31 +184275984556008, 293770471864727, 436435929170724 @ 39, 141, -743 +491670834876015, 476749045856952, 217271651149496 @ -184, -270, 100 +287835185454825, 373328761928310, 129444989818088 @ -40, -148, 317 +411744363970055, 310434779548982, 268104978862496 @ -98, -39, 29 +314822872691179, 172150823307908, 345874309185092 @ 59, 147, -76 +304886936172647, 294503829928528, 399238946255544 @ -23, 7, -224 +410469338072089, 249992674832080, 332446393269811 @ -124, 58, -72 +481504227472832, 415874296440288, 199041505533048 @ -59, -166, 109 +310651300588440, 335365825683912, 55974800064041 @ 91, -78, 294 +303257381877081, 293506585687640, 269188312431512 @ -51, 18, 17 +178009589839299, 321504062794200, 144478267906772 @ 129, -6, 404 +160679404143671, 431021643672260, 236580475439919 @ 98, -530, 132 +187257119921325, 366088022902683, 229626620832131 @ -40, -187, 168 +402456207984270, 472427264526666, 294546986934584 @ -255, -348, -35 +391587543800110, 212031358048657, 91139811244361 @ -35, 87, 266 +368513444085315, 292856160909119, 270679814933943 @ -210, 25, 12 +191170667522703, 362132086592424, 334402858248416 @ -151, -183, -482 +176699886002402, 264252947912217, 365351398725180 @ 41, 311, -495 +523831609734848, 288868987307350, 282326255040806 @ -67, -36, 23 +421892209327695, 276869007803844, 254772500652704 @ -50, -5, 49 +235106630522781, 293131895935734, 306778667839634 @ -41, 79, -120 +214081940410320, 431324131960320, 406629042710309 @ -55, -422, -560 +396137050094881, 180070189545147, 209744675982447 @ 56, 71, 94 +488410282986106, 333854644524866, 295048079299634 @ -29, -80, 11 +275254149452451, 278627206170720, 182211178472916 @ -93, 92, 238 +281424652084063, 276279040293476, 348903412766448 @ -22, 60, -155 +131346032057912, 146939872150290, 221300931823248 @ 299, 332, 117 +139977201256908, 369129425829317, 206160337184225 @ 33, -359, 632 +206236782659021, 294007969823612, 242581471053844 @ -49, 136, 91 +376889731787648, 252609346530556, 284760478377643 @ -7, 30, 10 +302437685973959, 311048809396678, 259172474971396 @ 86, -45, 43 +213643839466371, 354927093345667, 313753498413187 @ -186, -129, -278 +164486557030222, 356217592614774, 264194506118758 @ -71, -160, -53 +134715515873262, 340046546733369, 261821912624648 @ 63, 29, -99 +333789386694310, 62917592822417, 248000822620861 @ 25, 307, 58 +467661027149664, 442668688244400, 148172840560298 @ -57, -198, 167 +228853258932283, 442010415446750, 190068978332864 @ -64, -423, 269 +313690246328474, 362554549215595, 276262142993176 @ 11, -117, 13 +325141713204785, 330796843335112, 224790170374098 @ -145, -54, 114 +226748929630273, 301349163564998, 288635604722974 @ -47, 67, -74 +383918037325441, 338015914357250, 286255273442547 @ -32, -80, 6 +326988486100071, 392232035386884, 411354046615148 @ 76, -147, -140 +412579091897449, 224931483839316, 337003928948324 @ -44, 62, -55 +438307001274267, 108654568212894, 463948838511476 @ 12, 143, -157 +343746370290399, 273635388092440, 259322471585104 @ -138, 60, 37 +202888851614568, 312505397135046, 234206148969765 @ 27, 32, 114 +333322107632643, 450194001816576, 91890294357956 @ 79, -212, 238 +299837848564522, 266175602434161, 282711192707542 @ -11, 59, -5 +147759623751543, 365678363953998, 263808687770543 @ 18, -268, -70 +206361211283682, 249044722691094, 174980584061546 @ -33, 308, 363 \ No newline at end of file diff --git a/aoc2023.sln b/aoc2023.sln index 90cc288..51f8c2f 100644 --- a/aoc2023.sln +++ b/aoc2023.sln @@ -17,6 +17,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StepCounter", "2023\21\Step EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SandSlabs", "2023\22\SandSlabs.csproj", "{0E71C84D-C94B-42C9-9889-6A26C67B6957}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NeverTellMeTheOdds", "2023\24\NeverTellMeTheOdds.csproj", "{A87483DF-8A1A-4002-A8BC-DCA3A0859757}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -47,6 +49,10 @@ Global {0E71C84D-C94B-42C9-9889-6A26C67B6957}.Debug|Any CPU.Build.0 = Debug|Any CPU {0E71C84D-C94B-42C9-9889-6A26C67B6957}.Release|Any CPU.ActiveCfg = Release|Any CPU {0E71C84D-C94B-42C9-9889-6A26C67B6957}.Release|Any CPU.Build.0 = Release|Any CPU + {A87483DF-8A1A-4002-A8BC-DCA3A0859757}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A87483DF-8A1A-4002-A8BC-DCA3A0859757}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A87483DF-8A1A-4002-A8BC-DCA3A0859757}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A87483DF-8A1A-4002-A8BC-DCA3A0859757}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -59,5 +65,6 @@ Global {E21398AA-260A-4F4B-85B7-03BBE0F377DB} = {FB48BA6E-3152-4382-8151-BBA4387C9354} {7DBAA651-63ED-49C7-BEF4-4D333B514F9D} = {FB48BA6E-3152-4382-8151-BBA4387C9354} {0E71C84D-C94B-42C9-9889-6A26C67B6957} = {FB48BA6E-3152-4382-8151-BBA4387C9354} + {A87483DF-8A1A-4002-A8BC-DCA3A0859757} = {FB48BA6E-3152-4382-8151-BBA4387C9354} EndGlobalSection EndGlobal