示例#1
0
        public void FindAllKeys()
        {
            var input = new[]
            {
                "########################",
                "#[email protected].#",
                "######################.#",
                "#d.....................#",
                "########################",
            };

            var steps = Day18.FindAllKeys(input);

            steps.Should().Be(86);
        }
示例#2
0
        public void FindAllKeys2()
        {
            var input = new[]
            {
                "...#####################",
                "[email protected]#",
                "..#d#e#f################",
                "###A#B#C################",
                "###g#h#i################",
                "########################",
            };

            var steps = Day18.FindAllKeys(input);

            steps.Should().Be(81);
        }
示例#3
0
        public void FindAllKeys3()
        {
            var input = new[]
            {
                "#################",
                "#i.G..c...e..H.p#",
                "########.########",
                "#j.A..b...f..D.o#",
                "########@########",
                "#k.E..a...g..B.n#",
                "########.########",
                "#l.F..d...h..C.m#",
                "#################",
            };

            var steps = Day18.FindAllKeys(input);

            steps.Should().Be(136);
        }