From 163f1fe4f38aaa2b8e739dea3862bc34bed0b82d Mon Sep 17 00:00:00 2001 From: Rob Stoffelen Date: Tue, 3 Dec 2024 08:56:57 +0100 Subject: [PATCH] Completed day 3 --- AdvendOfCode.Runner/Program.cs | 2 +- AdventOfCode.Solutions/2024/Day 02/Day02.cs | 5 ++--- AdventOfCode.Solutions/AdventOfCode.Solutions.csproj | 3 +++ AdventOfCode.Solutions/day-00-input.txt | 7 +------ 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/AdvendOfCode.Runner/Program.cs b/AdvendOfCode.Runner/Program.cs index afa3345..33092fa 100644 --- a/AdvendOfCode.Runner/Program.cs +++ b/AdvendOfCode.Runner/Program.cs @@ -10,7 +10,7 @@ IChallange challange = Host.CreateDefaultBuilder() .Build() .Services .GetService() - .GetChallange(2024, 2); + .GetChallange(2024, 3); Console.WriteLine($"Part 1: {await challange.GetSolutionPart1()}"); diff --git a/AdventOfCode.Solutions/2024/Day 02/Day02.cs b/AdventOfCode.Solutions/2024/Day 02/Day02.cs index 7048d51..ffd53f1 100644 --- a/AdventOfCode.Solutions/2024/Day 02/Day02.cs +++ b/AdventOfCode.Solutions/2024/Day 02/Day02.cs @@ -1,6 +1,4 @@ using AdventOfCode.Core.Shared.IO; -using System; -using System.Reflection; namespace AdventOfCode.Solutions._2024 { @@ -28,7 +26,8 @@ namespace AdventOfCode.Solutions._2024 //4 //301 - public async Task GetSolutionPart2() => (await _inputReader.ReadAsArrayString()) + public async Task GetSolutionPart2() + => (await _inputReader.ReadAsArrayString()) .Select(ParselineToReports) .Where(reports => AreReportsSave(reports, true)) .Count() diff --git a/AdventOfCode.Solutions/AdventOfCode.Solutions.csproj b/AdventOfCode.Solutions/AdventOfCode.Solutions.csproj index 8e1a160..2c63aa9 100644 --- a/AdventOfCode.Solutions/AdventOfCode.Solutions.csproj +++ b/AdventOfCode.Solutions/AdventOfCode.Solutions.csproj @@ -34,6 +34,9 @@ Always + + Always + Always diff --git a/AdventOfCode.Solutions/day-00-input.txt b/AdventOfCode.Solutions/day-00-input.txt index 82cd679..b774ec9 100644 --- a/AdventOfCode.Solutions/day-00-input.txt +++ b/AdventOfCode.Solutions/day-00-input.txt @@ -1,6 +1 @@ -7 6 4 2 1 -1 2 7 8 9 -9 7 6 2 1 -1 3 2 4 5 -8 6 4 4 1 -1 3 6 7 9 \ No newline at end of file +xmul(2,4)&mul[3,7]!^don't()_mul(5,5)+mul(32,64](mul(11,8)undo()?mul(8,5)) \ No newline at end of file