From 03541178510a95cddc305cbba35391ceea3f2429 Mon Sep 17 00:00:00 2001 From: Rob Date: Thu, 7 Dec 2023 23:41:07 +0100 Subject: [PATCH] Completed day 7 --- AdvendOfCode.Runner/Program.cs | 4 +- AdventOfCode.Solutions/2023/Day 05/Day05.cs | 2 +- .../AdventOfCode.Solutions.csproj | 6 +++ AdventOfCode.Solutions/day-00-input.txt | 38 +++---------------- 4 files changed, 14 insertions(+), 36 deletions(-) diff --git a/AdvendOfCode.Runner/Program.cs b/AdvendOfCode.Runner/Program.cs index a28ec21..3247e8a 100644 --- a/AdvendOfCode.Runner/Program.cs +++ b/AdvendOfCode.Runner/Program.cs @@ -4,12 +4,12 @@ using AdventOfCode.Core; InputReader inputReader = new() { - IsDebug = true + //IsDebug = true }; //inputReader.SetInputByChallange(3); -IChallange challange = new Day05(inputReader); +IChallange challange = new Day07(inputReader); Console.WriteLine($"Part 1: {await challange.GetSolutionPart1()}"); diff --git a/AdventOfCode.Solutions/2023/Day 05/Day05.cs b/AdventOfCode.Solutions/2023/Day 05/Day05.cs index 88a0da5..d30b027 100644 --- a/AdventOfCode.Solutions/2023/Day 05/Day05.cs +++ b/AdventOfCode.Solutions/2023/Day 05/Day05.cs @@ -81,7 +81,7 @@ namespace AdventOfCode.Solutions._2023 long lowestLocation = long.MaxValue; List proccessed = []; - + // change to use ranges and shift those for (int seedDataIndex = 0; seedDataIndex < seedData.Length; seedDataIndex += 2) { for (long seedLocaton = seedData[seedDataIndex]; seedLocaton < seedData[seedDataIndex] + seedData[seedDataIndex + 1]; seedLocaton++) diff --git a/AdventOfCode.Solutions/AdventOfCode.Solutions.csproj b/AdventOfCode.Solutions/AdventOfCode.Solutions.csproj index 9180b0c..af4cf49 100644 --- a/AdventOfCode.Solutions/AdventOfCode.Solutions.csproj +++ b/AdventOfCode.Solutions/AdventOfCode.Solutions.csproj @@ -12,6 +12,12 @@ + + Always + + + Always + Always diff --git a/AdventOfCode.Solutions/day-00-input.txt b/AdventOfCode.Solutions/day-00-input.txt index bd902a4..bf2815e 100644 --- a/AdventOfCode.Solutions/day-00-input.txt +++ b/AdventOfCode.Solutions/day-00-input.txt @@ -1,33 +1,5 @@ -seeds: 79 14 55 13 - -seed-to-soil map: -50 98 2 -52 50 48 - -soil-to-fertilizer map: -0 15 37 -37 52 2 -39 0 15 - -fertilizer-to-water map: -49 53 8 -0 11 42 -42 0 7 -57 7 4 - -water-to-light map: -88 18 7 -18 25 70 - -light-to-temperature map: -45 77 23 -81 45 19 -68 64 13 - -temperature-to-humidity map: -0 69 1 -1 0 69 - -humidity-to-location map: -60 56 37 -56 93 4 \ No newline at end of file +32T3K 765 +T55J5 684 +KK677 28 +KTJJT 220 +QQQJA 483 \ No newline at end of file