Solve() public method

public Solve ( ReadOnlySpan input, Solution solution ) : void
input ReadOnlySpan
solution Solution
return void
Example #1
0
        public void Solve()
        {
            var input  = File.ReadAllText("C:\\Code\\aoc2018\\aoc2018\\Data\\input23.txt");
            var result = Day23.Solve(input);

            _output.WriteLine(result.ToString());
        }
Example #2
0
        public void Solve()
        {
            const string input  = "643719258";
            var          solver = new Day23();
            var          result = solver.Solve(input, 100);

            Output.WriteLine(result); // 54896723
        }
Example #3
0
        public void Part1(int rounds, string expected)
        {
            const string input  = "389125467";
            var          solver = new Day23();
            var          result = solver.Solve(input, rounds);

            result.ShouldBe(expected);
        }
Example #4
0
        public void Test()
        {
            var input  = @"
pos=<0,0,0>, r=4
pos=<1,0,0>, r=1
pos=<4,0,0>, r=3
pos=<0,2,0>, r=1
pos=<0,5,0>, r=3
pos=<0,0,3>, r=1
pos=<1,1,1>, r=1
pos=<1,1,2>, r=1
pos=<1,3,1>, r=1";
            var result = Day23.Solve(input.Trim());

            Assert.Equal(7, result);
        }