fix eols
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
260e10ec9e
commit
8f84143d73
|
@ -7,7 +7,7 @@ public sealed partial class Day16() : Day(2015, 16, "Aunt Sue")
|
|||
{
|
||||
[GeneratedRegex(@": \d\d")]
|
||||
private static partial Regex TwoDigitsRegex();
|
||||
|
||||
|
||||
public override void ProcessInput()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -35,10 +35,10 @@ public sealed partial class Day07() : Day(2016, 7, "Internet Protocol Version 7"
|
|||
private static bool SupportsSsl(string input)
|
||||
{
|
||||
foreach (var ip in BracketsRegex().Split(input))
|
||||
foreach (var aba in CheckAba(ip))
|
||||
foreach (var m in InsideBracketsRegex().Matches(input).Cast<Match>())
|
||||
if (m.Value.Contains($"{aba[1]}{aba[0]}{aba[1]}"))
|
||||
return true;
|
||||
foreach (var aba in CheckAba(ip))
|
||||
foreach (var m in InsideBracketsRegex().Matches(input).Cast<Match>())
|
||||
if (m.Value.Contains($"{aba[1]}{aba[0]}{aba[1]}"))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ public sealed class Day14() : Day(2020, 14, "Docking Data")
|
|||
}
|
||||
|
||||
private static readonly char[] SquareBrackets = ['[', ']'];
|
||||
private static readonly char[] BracketsAndEquals = [..SquareBrackets, '='];
|
||||
private static readonly char[] BracketsAndEquals = [.. SquareBrackets, '='];
|
||||
|
||||
public override object Part1()
|
||||
{
|
||||
|
|
|
@ -21,27 +21,27 @@ public sealed class Day18() : Day(2020, 18, "Operation Order")
|
|||
postfixNotation.Append(c);
|
||||
}
|
||||
else switch (c)
|
||||
{
|
||||
case '(':
|
||||
postfixStack.Push(c);
|
||||
break;
|
||||
case ')':
|
||||
{
|
||||
while (postfixStack.Count > 0 && postfixStack.Peek() != '(')
|
||||
postfixNotation.Append(postfixStack.Pop());
|
||||
|
||||
postfixStack.TryPop(out _);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
while (postfixStack.Count > 0 && precedence(c) <= precedence(postfixStack.Peek()))
|
||||
postfixNotation.Append(postfixStack.Pop());
|
||||
|
||||
{
|
||||
case '(':
|
||||
postfixStack.Push(c);
|
||||
break;
|
||||
}
|
||||
}
|
||||
case ')':
|
||||
{
|
||||
while (postfixStack.Count > 0 && postfixStack.Peek() != '(')
|
||||
postfixNotation.Append(postfixStack.Pop());
|
||||
|
||||
postfixStack.TryPop(out _);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
while (postfixStack.Count > 0 && precedence(c) <= precedence(postfixStack.Peek()))
|
||||
postfixNotation.Append(postfixStack.Pop());
|
||||
|
||||
postfixStack.Push(c);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
while (postfixStack.Count > 0)
|
||||
postfixNotation.Append(postfixStack.Pop());
|
||||
|
|
|
@ -7,7 +7,7 @@ public sealed partial class Day20() : Day(2020, 20, "Jurassic Jigsaw")
|
|||
{
|
||||
[GeneratedRegex("(?<=#.{77})#.{4}#{2}.{4}#{2}.{4}#{3}(?=.{77}#.{2}#.{2}#.{2}#.{2}#.{2}#)")]
|
||||
private static partial Regex MonsterRegex();
|
||||
|
||||
|
||||
public override void ProcessInput()
|
||||
{
|
||||
}
|
||||
|
@ -255,5 +255,5 @@ public sealed partial class Day20() : Day(2020, 20, "Jurassic Jigsaw")
|
|||
piece.Sides.Value.Concat(piece.Sides.Value.Select(s => new string(s.Reverse().ToArray()))).ToHashSet();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue