Пример #1
0
        public void Test2_a()
        {
            var input = File.ReadAllText("C:\\Code\\aoc2018\\aoc2018\\Data\\input23_a.txt");

            var(distance, count) = Day23.Solve2(input);
            Assert.Equal(975, count);
        }
Пример #2
0
        public void Solve2()
        {
            var input  = File.ReadAllText("C:\\Code\\aoc2018\\aoc2018\\Data\\input23.txt");
            var result = Day23.Solve2(input);

            _output.WriteLine(result.ToString());
        }
Пример #3
0
        public void Solve2()
        {
            const string input  = "643719258";
            var          solver = new Day23();
            var          result = solver.Solve2(input);

            Output.WriteLine(result.ToString());
        }
Пример #4
0
        public void Part2()
        {
            const string input  = "389125467";
            var          solver = new Day23();
            var          result = solver.Solve2(input);

            result.ShouldBe(149245887792);
        }
Пример #5
0
        public void Test2()
        {
            var input = @"
pos=<10,12,12>, r=2
pos=<12,14,12>, r=2
pos=<16,12,12>, r=4
pos=<14,14,14>, r=6
pos=<50,50,50>, r=200
pos=<10,10,10>, r=5";

            var(distance, count) = Day23.Solve2(input.Trim());
            Assert.Equal(36, distance);
            Assert.Equal(5, count);
        }