예제 #1
0
        static void Main(string[] args)
        {
            Day01.Solve();
            Day02.Solve();
            Day03.Solve();
            Day04.Solve();
            Day05.Solve();
            Day06.Solve();
            Day07.Solve();
            Day08.Solve();
            Day09.Solve();
            Day10.Solve();
            Day11.Solve();
            Day12.Solve();
            Day13.Solve();
            Day14.Solve();
            Day15.Solve();
            Day16.Solve();
            Day17.Solve();
            Day18.Solve();
            Day19.Solve();
            Day20.Solve();
            Day21.Solve();
            Day22.Solve();
            Day23.Solve();
            Day24.Solve();
            Day25.Solve();

            Console.WriteLine("Press any key to exit");
            Console.ReadKey();
        }
예제 #2
0
        public void Test1PuzzleInput()
        {
            var day = new Day15();

            Assert.AreEqual(
                1294ul,
                day.Solve(Day15.PUZZLE_INPUT, 2020ul));
        }
예제 #3
0
        public void Test1FromExample()
        {
            var day = new Day15();

            Assert.AreEqual(436ul, day.Solve(new int[] { 0, 3, 6 }, 2020ul));
            Assert.AreEqual(1ul, day.Solve(new int[] { 1, 3, 2 }, 2020ul));
            Assert.AreEqual(10ul, day.Solve(new int[] { 2, 1, 3 }, 2020ul));
            Assert.AreEqual(27ul, day.Solve(new int[] { 1, 2, 3 }, 2020ul));
            Assert.AreEqual(78ul, day.Solve(new int[] { 2, 3, 1 }, 2020ul));
            Assert.AreEqual(438ul, day.Solve(new int[] { 3, 2, 1 }, 2020ul));
            Assert.AreEqual(1836ul, day.Solve(new int[] { 3, 1, 2 }, 2020ul));
        }
예제 #4
0
        public void Test2FromExample()
        {
            var day = new Day15();

            Assert.AreEqual(175594ul, day.Solve(new int[] { 0, 3, 6 }, 30000000ul));
            Assert.AreEqual(2578ul, day.Solve(new int[] { 1, 3, 2 }, 30000000ul));
            Assert.AreEqual(3544142ul, day.Solve(new int[] { 2, 1, 3 }, 30000000ul));
            Assert.AreEqual(261214ul, day.Solve(new int[] { 1, 2, 3 }, 30000000ul));
            Assert.AreEqual(6895259ul, day.Solve(new int[] { 2, 3, 1 }, 30000000ul));
            Assert.AreEqual(18ul, day.Solve(new int[] { 3, 2, 1 }, 30000000ul));
            Assert.AreEqual(362ul, day.Solve(new int[] { 3, 1, 2 }, 30000000ul));
        }