Merge pull request #12 from StevanFreeborn/stevanfreeborn/feat/solve-puzzle-12
feat: solve puzzle 12
This commit is contained in:
@@ -0,0 +1,253 @@
|
||||
namespace HotSprings.Tests;
|
||||
|
||||
public class ConditionTests
|
||||
{
|
||||
[Theory]
|
||||
[MemberData(nameof(TestData.ParseTestData), MemberType = typeof(TestData))]
|
||||
public void Parse_WhenGivenConditionRecordInput_ItShouldReturnExpectedConditionInstance(string input, Condition expected)
|
||||
{
|
||||
var result = Condition.Parse(input);
|
||||
result.Should().BeEquivalentTo(expected);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[MemberData(nameof(TestData.GetNumberOfPossibleConfigurationsTestData), MemberType = typeof(TestData))]
|
||||
public void GetNumberOfPossibleConfigurations_WhenGivenCondition_ItShouldReturnExpectedNumberOfPossibleConfigurations(Condition condition, long expected)
|
||||
{
|
||||
var result = condition.GetNumberOfPossibleConfigurations();
|
||||
result.Should().Be(expected);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[MemberData(nameof(TestData.ParseAndUnFoldTestData), MemberType = typeof(TestData))]
|
||||
public void ParseAndUnFold_WhenGivenConditionRecordInput_ItShouldReturnExpectedConditionInstance(string input, Condition expected)
|
||||
{
|
||||
var result = Condition.Parse(input, true);
|
||||
result.Should().BeEquivalentTo(expected);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Condition_WhenGivenInput_ItShouldReturnExpectedCount()
|
||||
{
|
||||
var input = File.ReadAllLines("INPUT.txt");
|
||||
var result = input
|
||||
.Select(c => Condition.Parse(c))
|
||||
.Select(c => c.GetNumberOfPossibleConfigurations())
|
||||
.Sum();
|
||||
|
||||
result.Should().Be(6958);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Condition_WhenGivenInputAndPartTwo_ItShouldReturnExpectedCount()
|
||||
{
|
||||
var input = File.ReadAllLines("INPUT.txt");
|
||||
var result = input
|
||||
.Select(c => Condition.Parse(c, true))
|
||||
.Select(c => c.GetNumberOfPossibleConfigurations())
|
||||
.Sum();
|
||||
|
||||
result.Should().Be(6555315065024);
|
||||
}
|
||||
|
||||
public static class TestData
|
||||
{
|
||||
public static IEnumerable<object[]> GetNumberOfPossibleConfigurationsTestData =>
|
||||
new List<object[]>
|
||||
{
|
||||
new object[]
|
||||
{
|
||||
new Condition(
|
||||
[1, 1, 3],
|
||||
[7, 5, 3],
|
||||
[
|
||||
SpringCondition.Unknown,
|
||||
SpringCondition.Unknown,
|
||||
SpringCondition.Unknown,
|
||||
SpringCondition.Operational,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Damaged
|
||||
]
|
||||
),
|
||||
1,
|
||||
},
|
||||
new object[]
|
||||
{
|
||||
new Condition(
|
||||
[1, 1, 3],
|
||||
[7, 5, 3],
|
||||
[
|
||||
SpringCondition.Operational,
|
||||
SpringCondition.Unknown,
|
||||
SpringCondition.Unknown,
|
||||
SpringCondition.Operational,
|
||||
SpringCondition.Operational,
|
||||
SpringCondition.Unknown,
|
||||
SpringCondition.Unknown,
|
||||
SpringCondition.Operational,
|
||||
SpringCondition.Operational,
|
||||
SpringCondition.Operational,
|
||||
SpringCondition.Unknown,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Operational,
|
||||
]
|
||||
),
|
||||
4,
|
||||
},
|
||||
new object[]
|
||||
{
|
||||
new Condition(
|
||||
[1, 3, 1, 6],
|
||||
[11, 10, 6, 1],
|
||||
[
|
||||
SpringCondition.Unknown,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Unknown,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Unknown,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Unknown,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Unknown,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Unknown,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Unknown,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Unknown,
|
||||
]
|
||||
),
|
||||
1,
|
||||
},
|
||||
new object[]
|
||||
{
|
||||
new Condition(
|
||||
[1, 6, 5],
|
||||
[12, 6, 1],
|
||||
[
|
||||
SpringCondition.Unknown,
|
||||
SpringCondition.Unknown,
|
||||
SpringCondition.Unknown,
|
||||
SpringCondition.Unknown,
|
||||
SpringCondition.Operational,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Operational,
|
||||
SpringCondition.Operational,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Damaged,
|
||||
]
|
||||
),
|
||||
4,
|
||||
},
|
||||
new object[]
|
||||
{
|
||||
new Condition(
|
||||
[3, 2, 1],
|
||||
[6, 3, 1],
|
||||
[
|
||||
SpringCondition.Unknown,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Unknown,
|
||||
SpringCondition.Unknown,
|
||||
SpringCondition.Unknown,
|
||||
SpringCondition.Unknown,
|
||||
SpringCondition.Unknown,
|
||||
SpringCondition.Unknown,
|
||||
SpringCondition.Unknown,
|
||||
SpringCondition.Unknown,
|
||||
]
|
||||
),
|
||||
10,
|
||||
}
|
||||
};
|
||||
|
||||
public static IEnumerable<object[]> ParseAndUnFoldTestData =>
|
||||
new List<object[]>
|
||||
{
|
||||
new object[]
|
||||
{
|
||||
"#.#.### 1,1,3",
|
||||
new Condition(
|
||||
[1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3],
|
||||
[39, 37, 35, 31, 29, 27, 23, 21, 19, 15, 13, 11, 7, 5, 3],
|
||||
[
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Operational,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Operational,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Unknown,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Operational,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Operational,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Unknown,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Operational,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Operational,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Unknown,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Operational,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Operational,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Unknown,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Operational,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Operational,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Damaged,
|
||||
]
|
||||
)
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
public static IEnumerable<object[]> ParseTestData =>
|
||||
new List<object[]>
|
||||
{
|
||||
new object[]
|
||||
{
|
||||
"#.#.### 1,1,3",
|
||||
new Condition(
|
||||
[1, 1, 3],
|
||||
[7, 5, 3],
|
||||
[
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Operational,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Operational,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Damaged,
|
||||
SpringCondition.Damaged
|
||||
]
|
||||
)
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
global using Xunit;
|
||||
global using FluentAssertions;
|
||||
@@ -0,0 +1,36 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
<IsTestProject>true</IsTestProject>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="FluentAssertions" Version="6.12.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.0" />
|
||||
<PackageReference Include="xunit" Version="2.4.2" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="coverlet.collector" Version="6.0.0">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\HotSprings\HotSprings.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="..\INPUT.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,237 @@
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace HotSprings;
|
||||
|
||||
public class Program
|
||||
{
|
||||
public static async Task<int> Main(string[] args)
|
||||
{
|
||||
if (args.Length is 0)
|
||||
{
|
||||
Console.WriteLine("Please provide a path to the input file.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (File.Exists(args[0]) is false)
|
||||
{
|
||||
Console.WriteLine("The provided file does not exist.");
|
||||
return -2;
|
||||
}
|
||||
|
||||
var isPart2 = args.Length > 1 && args[1] == "part2";
|
||||
var input = await File.ReadAllLinesAsync(args[0]);
|
||||
|
||||
var stopwatch = new Stopwatch();
|
||||
stopwatch.Start();
|
||||
|
||||
var result = input
|
||||
.Select(r => Condition.Parse(r, isPart2))
|
||||
.Sum(c => c.GetNumberOfPossibleConfigurations());
|
||||
|
||||
stopwatch.Stop();
|
||||
|
||||
Console.WriteLine($"The number of possible configurations is {result}. ({stopwatch.ElapsedMilliseconds}ms)");
|
||||
|
||||
return (int)result;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a condition for a set of springs.
|
||||
/// </summary>
|
||||
/// <param name="DamagedContiguousGroupSizes">The sizes of the contiguous groups of damaged springs.</param>
|
||||
/// <param name="TotalSpringsRequired">The total number of springs required to be available for each contiguous group of damaged springs.</param>
|
||||
/// <param name="Springs">The conditions of the springs.</param>
|
||||
public class Condition(
|
||||
List<int> damagedContiguousGroupSizes,
|
||||
List<int> totalSpringsRequired,
|
||||
List<SpringCondition> springs
|
||||
)
|
||||
{
|
||||
private const char OperationalSymbol = '.';
|
||||
private const char DamagedSymbol = '#';
|
||||
private const char UnknownSymbol = '?';
|
||||
|
||||
public List<int> DamagedContiguousGroupSizes { get; set; } = damagedContiguousGroupSizes;
|
||||
public List<int> TotalSpringsRequired { get; set; } = totalSpringsRequired;
|
||||
public List<SpringCondition> Springs { get; set; } = springs;
|
||||
private readonly Dictionary<(int, int), long> _resultCache = [];
|
||||
private bool IsNotOperational(int index) => Springs[index] is not SpringCondition.Operational;
|
||||
private bool IsNotOperational(int index, int length) => Enumerable.Range(index, length).All(IsNotOperational);
|
||||
|
||||
private bool IsDamaged(int index) =>
|
||||
index >= 0 && index < Springs.Count && Springs[index] is SpringCondition.Damaged;
|
||||
|
||||
private bool RemainingSpringsAreNotDamaged(int index) =>
|
||||
Springs.Skip(index).All(sc => sc is not SpringCondition.Damaged);
|
||||
|
||||
private long CalculateConfigurations(int springIndex, int groupIndex)
|
||||
{
|
||||
// check if all damaged groups have been checked
|
||||
if (groupIndex == DamagedContiguousGroupSizes.Count)
|
||||
{
|
||||
// if none of remaining springs are damaged, then we have a valid configuration
|
||||
return RemainingSpringsAreNotDamaged(springIndex) ? 1 : 0;
|
||||
}
|
||||
|
||||
// if the number of springs required for current group size is
|
||||
// greater than the number of remaining springs, then we won't
|
||||
// be able to achieve a valid configuration
|
||||
if (springIndex + TotalSpringsRequired[groupIndex] > Springs.Count)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
long sum = 0;
|
||||
var groupSize = DamagedContiguousGroupSizes[groupIndex];
|
||||
var nextIndex = springIndex + groupSize + 1;
|
||||
|
||||
// if the number of springs next to current spring
|
||||
// equal to the group size are not operational
|
||||
// and the spring next to the last spring in the group
|
||||
// is not damaged, then we have a configuration that
|
||||
// satisfies the current group size and can move
|
||||
// on to the next group
|
||||
if (IsNotOperational(springIndex, groupSize) && IsDamaged(springIndex + groupSize) is false)
|
||||
{
|
||||
sum += CountConfigurations(nextIndex, groupIndex + 1);
|
||||
}
|
||||
|
||||
// if the current spring is not damaged
|
||||
// then we can move on to checking configuration
|
||||
// with next spring but same group size.
|
||||
if (IsDamaged(springIndex) is false)
|
||||
{
|
||||
sum += CountConfigurations(springIndex + 1, groupIndex);
|
||||
}
|
||||
|
||||
return sum;
|
||||
}
|
||||
|
||||
private long CountConfigurations(int springIndex, int groupIndex)
|
||||
{
|
||||
// use a tuple consisting of springIndex and groupIndex
|
||||
// as a key for the cache
|
||||
var key = (springIndex, groupIndex);
|
||||
|
||||
// if the result for the current key is not in the cache
|
||||
// then calculate it and add it to the cache
|
||||
if (_resultCache.TryGetValue(key, out var result) is false)
|
||||
{
|
||||
result = CalculateConfigurations(springIndex, groupIndex);
|
||||
_resultCache[key] = result;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the number of possible configurations for the condition.
|
||||
/// </summary>
|
||||
/// <returns>The number of possible configurations.</returns>
|
||||
public long GetNumberOfPossibleConfigurations() => CountConfigurations(0, 0);
|
||||
|
||||
/// <summary>
|
||||
/// Parses the given input into a <see cref="Condition"/> instance.
|
||||
/// </summary>
|
||||
/// <param name="input">The input to parse.</param>
|
||||
/// <param name="unfold">Whether to unfold the condition.</param>
|
||||
/// <returns>The parsed <see cref="Condition"/> instance.</returns>
|
||||
public static Condition Parse(string input, bool unfold = false)
|
||||
{
|
||||
var springs = new List<SpringCondition>();
|
||||
|
||||
var parts = input.Split(
|
||||
' ',
|
||||
StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries
|
||||
);
|
||||
var springsInput = parts[0];
|
||||
var contiguousGroupSizesInput = parts[1];
|
||||
|
||||
foreach (var spring in springsInput)
|
||||
{
|
||||
switch (spring)
|
||||
{
|
||||
case OperationalSymbol:
|
||||
springs.Add(SpringCondition.Operational);
|
||||
break;
|
||||
case DamagedSymbol:
|
||||
springs.Add(SpringCondition.Damaged);
|
||||
break;
|
||||
case UnknownSymbol:
|
||||
springs.Add(SpringCondition.Unknown);
|
||||
break;
|
||||
default:
|
||||
throw new Exception($"Invalid spring condition: {spring}");
|
||||
}
|
||||
}
|
||||
|
||||
var contiguousGroupSizes = contiguousGroupSizesInput
|
||||
.Split(
|
||||
',',
|
||||
StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries
|
||||
)
|
||||
.Select(int.Parse)
|
||||
.ToList();
|
||||
|
||||
if (unfold)
|
||||
{
|
||||
springs = [
|
||||
..springs,
|
||||
SpringCondition.Unknown,
|
||||
..springs,
|
||||
SpringCondition.Unknown,
|
||||
..springs,
|
||||
SpringCondition.Unknown,
|
||||
..springs,
|
||||
SpringCondition.Unknown,
|
||||
..springs,
|
||||
];
|
||||
|
||||
contiguousGroupSizes = [
|
||||
..contiguousGroupSizes,
|
||||
..contiguousGroupSizes,
|
||||
..contiguousGroupSizes,
|
||||
..contiguousGroupSizes,
|
||||
..contiguousGroupSizes,
|
||||
];
|
||||
}
|
||||
|
||||
var springsRequired = 0;
|
||||
var totalSpringsRequired = new int[contiguousGroupSizes.Count];
|
||||
|
||||
for (var i = contiguousGroupSizes.Count - 1; i >= 0; i--)
|
||||
{
|
||||
springsRequired += contiguousGroupSizes[i];
|
||||
totalSpringsRequired[i] = springsRequired;
|
||||
springsRequired += 1;
|
||||
}
|
||||
|
||||
return new Condition(
|
||||
contiguousGroupSizes,
|
||||
[.. totalSpringsRequired],
|
||||
springs
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents the condition of a spring.
|
||||
/// </summary>
|
||||
public enum SpringCondition
|
||||
{
|
||||
/// <summary>
|
||||
/// The spring is operational.
|
||||
/// </summary>
|
||||
Operational,
|
||||
|
||||
/// <summary>
|
||||
/// The spring is damaged.
|
||||
/// </summary>
|
||||
Damaged,
|
||||
|
||||
/// <summary>
|
||||
/// The condition of the spring is unknown.
|
||||
/// </summary>
|
||||
Unknown,
|
||||
}
|
||||
@@ -69,6 +69,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CosmicExpansion", "11\Cosmi
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CosmicExpansion.Tests", "11\CosmicExpansion.Tests\CosmicExpansion.Tests.csproj", "{0D6CD658-65BB-47DC-A865-E3428EBE3075}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "12", "12", "{ABF03698-B81C-45DE-B76A-C7FBC0C72DB6}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HotSprings", "12\HotSprings\HotSprings.csproj", "{DB4A8A1F-54A8-4534-AE0A-027B365AA73B}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HotSprings.Tests", "12\HotSprings.Tests\HotSprings.Tests.csproj", "{2731DE56-AF4B-4009-8259-2EA5A9A102FE}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -166,6 +172,14 @@ Global
|
||||
{0D6CD658-65BB-47DC-A865-E3428EBE3075}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0D6CD658-65BB-47DC-A865-E3428EBE3075}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0D6CD658-65BB-47DC-A865-E3428EBE3075}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{DB4A8A1F-54A8-4534-AE0A-027B365AA73B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DB4A8A1F-54A8-4534-AE0A-027B365AA73B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DB4A8A1F-54A8-4534-AE0A-027B365AA73B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DB4A8A1F-54A8-4534-AE0A-027B365AA73B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2731DE56-AF4B-4009-8259-2EA5A9A102FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2731DE56-AF4B-4009-8259-2EA5A9A102FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2731DE56-AF4B-4009-8259-2EA5A9A102FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2731DE56-AF4B-4009-8259-2EA5A9A102FE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{3F8EAC09-4BC7-43AA-B72B-48DDD2710F6D} = {8C29858C-623A-461A-BF0B-254E151CD9C2}
|
||||
@@ -190,5 +204,7 @@ Global
|
||||
{B1DA407F-DA29-4BDA-B10E-8B9A976B0C5E} = {9703A36A-A019-4ADC-93A7-9DF4EFBCBFBC}
|
||||
{580A3C98-7A39-4323-839A-5C2E0B6E8E74} = {01A6D73F-996E-48B3-B111-2725016A49C2}
|
||||
{0D6CD658-65BB-47DC-A865-E3428EBE3075} = {01A6D73F-996E-48B3-B111-2725016A49C2}
|
||||
{DB4A8A1F-54A8-4534-AE0A-027B365AA73B} = {ABF03698-B81C-45DE-B76A-C7FBC0C72DB6}
|
||||
{2731DE56-AF4B-4009-8259-2EA5A9A102FE} = {ABF03698-B81C-45DE-B76A-C7FBC0C72DB6}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
@@ -55,7 +55,7 @@ dotnet build
|
||||
| 09 | [Problem](./09/PROBLEM.md) | [Solution](./09/MirageMaintenance/) | ✅ | Part 1 took me unnecessarily long. The bug was summing a line to check for all zeros is bad idea when negative numbers are involved. |
|
||||
| 10 | [Problem](./10/PROBLEM.md) | [Solution](./10/PipeMaze/) | ✅ | So...my solutions are rather slow, but they work. Part 2 appears to have a mathematical solution, but scanning is what I came up with on my own. |
|
||||
| 11 | [Problem](./11/PROBLEM.md) | [Solution](./11/CosmicExpansion/) | ✅ | Expanding the universe was fine in part 1, but part 2 showed I actually needed to calculate the expansion instead of expanding the input. |
|
||||
| 12 | [Problem](./12/PROBLEM.md) | [Solution](./12/) | ⌛ |
|
||||
| 12 | [Problem](./12/PROBLEM.md) | [Solution](./12/HotSprings/) | ✅ | This one stretched my skills. I needed lots of help from the interwebz. |
|
||||
| 13 | [Problem](./13/PROBLEM.md) | [Solution](./13/) | ⌛ |
|
||||
| 14 | [Problem](./14/PROBLEM.md) | [Solution](./14/) | ⌛ |
|
||||
| 15 | [Problem](./15/PROBLEM.md) | [Solution](./15/) | ⌛ |
|
||||
|
||||
Reference in New Issue
Block a user