Esempio n. 1
0
 static void Main(string[] args)
 {
     //Day01.RunDay();
     //Day02.RunDay();
     //Day03.RunDay();
     //Day04.RunDay();
     //Day05.RunDay();
     //Day06.RunDay();
     //Day07.RunDay();
     //Day08.RunDay();
     //Day09.RunDay();
     //Day10.RunDay();
     //Day11.RunDay();
     //Day12.RunDay();
     //Day13.RunDay();
     //Day14.RunDay();
     //Day15.RunDay();
     //Day16.RunDay();
     //Day17.RunDay();
     //Day18.RunDay();
     Day19.RunDay();
     //Day20.RunDay();
     //Day21.RunDay();
     //Day22.RunDay();
     //Day23.RunDay();
     //Day24.RunDay();
     //Day25.RunDay();
 }
Esempio n. 2
0
 private static async Task Day19_Part2()
 {
     Console.CursorVisible = false;
     Console.Clear();
     Console.BackgroundColor = ConsoleColor.Gray;
     Console.ForegroundColor = ConsoleColor.DarkMagenta;
     Console.WindowLeft      = 0;
     Console.WindowTop       = 0;
     Console.WindowWidth     = Console.LargestWindowWidth / 2;
     Console.WindowHeight    = (Console.LargestWindowHeight / 4) * 3;
     Day19.CheckSantaFits();
 }
Esempio n. 3
0
        static void Main(string[] args)
        {
            while (true)
            {
                Console.WriteLine("*******************");
                Console.WriteLine("Advent of Code 2019");
                Console.WriteLine("*******************");
                Console.WriteLine();
                Console.Write("Run day: ");
                int dayToRun = int.Parse(Console.ReadLine());

                switch (dayToRun)
                {
                case 1:
                    Day01.Run();
                    break;

                case 2:
                    Day02.Run();
                    break;

                case 3:
                    Day03.Run();
                    break;

                case 4:
                    Day04.Run();
                    break;

                case 5:
                    Day05.Run();
                    break;

                case 6:
                    Day06.Run();
                    break;

                case 7:
                    Day07.Run();
                    break;

                case 8:
                    Day08.Run();
                    break;

                case 9:
                    Day09.Run();
                    break;

                case 10:
                    Day10.Run();
                    break;

                case 11:
                    Day11.Run();
                    break;

                case 12:
                    Day12.Run();
                    break;

                case 13:
                    Day13.Run();
                    break;

                case 14:
                    Day14.Run();
                    break;

                case 15:
                    Day15.Run();
                    break;

                case 16:
                    Day16.Run();
                    break;

                case 17:
                    Day17.Run();
                    break;

                case 18:
                    Day18.Run();
                    break;

                case 19:
                    Day19.Run();
                    break;

                case 20:
                    Day20.Run();
                    break;

                case 21:
                    Day21.Run();
                    break;

                case 22:
                    Day22.Run();
                    break;

                case 23:
                    Day23.Run();
                    break;

                case 24:
                    Day24.Run();
                    break;

                case 25:
                    Day25.Run();
                    break;
                }
                Console.WriteLine();
            }
        }
Esempio n. 4
0
 static void Main(string[] args)
 {
     Console.WriteLine("---Welcome to erjicle's solutions to Advent of Code 2019!!---");
     // Day 1
     Console.WriteLine($"Day 1 - Part 1: {Day01.GetDay1Part1Answer()}");
     Console.WriteLine($"Day 1 - Part 2: {Day01.GetDay1Part2Answer()}");
     // Day 2
     Console.WriteLine($"Day 2 - Part 1: {Day02.GetDay2Part1Answer()}");
     Console.WriteLine($"Day 2 - Part 2: {Day02.GetDay2Part2Answer()}");
     // Day 3.
     Console.WriteLine($"Day 3 - Part 1: {Day03.GetDay3Part1Answer()}");
     Console.WriteLine($"Day 3 - Part 2: {Day03.GetDay3Part2Answer()}");
     // Day 4
     Console.WriteLine($"Day 4 - Part 1: {Day04.GetDay4Part1Answer()}");
     Console.WriteLine($"Day 4 - Part 2: {Day04.GetDay4Part2Answer()}");
     // Day 5
     Console.WriteLine("Day 5 - Part 1:");
     Day05.RunDay5Part1();
     Console.WriteLine("Day 5 - Part 2:");
     Day05.RunDay5Part2();
     // Day 6
     Console.WriteLine($"Day 6 - Part 1: {Day06.GetDay6Part1Answer()}");
     Console.WriteLine($"Day 6 - Part 2: {Day06.GetDay6Part2Answer()}");
     // Day 7
     Console.WriteLine($"Day 7 - Part 1: {Day07.GetDay7Part1Answer()}");
     Console.WriteLine($"Day 7 - Part 2: {Day07.GetDay7Part2Answer()}");
     // Day 8
     Console.WriteLine($"Day 8 - Part 1: {Day08.GetDay8Part1Answer()}");
     Console.WriteLine($"Day 8 - Part 2:");
     Day08.RunDay8Part2();
     // Day 9
     Console.WriteLine($"Day 9 - Part 1: {Day09.GetDay9Part1Answer()}");
     Console.WriteLine($"Day 9 - Part 2: {Day09.GetDay9Part2Answer()}");
     // Day 10
     Console.WriteLine($"Day 10 - Part 1: {Day10.GetDay10Part1Answer()}");
     Console.WriteLine($"Day 10 - Part 2: {Day10.GetDay10Part2Answer()}");
     // Day 11
     Console.WriteLine($"Day 11 - Part 1: {Day11.GetDay11Part1Answer()}");
     Console.WriteLine($"Day 11 - Part 2: {Day11.RunDay11Part2()}");
     // Day 12
     Console.WriteLine($"Day 12 - Part 1: {Day12.GetDay12Part1Answer()}");
     Console.WriteLine($"Day 12 - Part 2: {Day12.GetDay12Part2Answer()}");
     // Day 13
     Console.WriteLine($"Day 13 - Part 1: {Day13.GetDay13Part1Answer()}");
     Console.WriteLine($"Day 13 - Part 2: {Day13.GetDay13Part2Answer()}");
     // Day 14
     Console.WriteLine($"Day 14 - Part 1: {Day14.GetDay14Part1Answer()}");
     Console.WriteLine($"Day 14 - Part 2: {Day14.GetDay14Part2Answer()}");
     // Day 15
     Console.WriteLine($"Day 15 - Part 1: {Day15.GetDay15Part1Answer()}");
     Console.WriteLine($"Day 15 - Part 2: {Day15.GetDay15Part2Answer()}");
     // Day 16
     Console.WriteLine($"Day 16 - Part 1: {Day16.GetDay16Part1Answer()}");
     Console.WriteLine($"Day 16 - Part 2: {Day16.GetDay16Part2Answer()}");
     // Day 17
     Console.WriteLine($"Day 17 - Part 1: {Day17.GetDay17Part1Answer()}");
     Console.WriteLine($"Day 17 - Part 2: {Day17.GetDay17Part2Answer()}");
     // Day 18
     Console.WriteLine($"Day 18 - Part 1: {Day18.GetDay18Part1Answer()}");
     Console.WriteLine($"Day 18 - Part 2: {Day18.GetDay18Part2Answer()}");
     // Day 19
     Console.WriteLine($"Day 19 - Part 1: {Day19.GetDay19Part1Answer()}");
     Console.WriteLine($"Day 19 - Part 2: {Day19.GetDay19Part2Answer()}");
     // Day 20
     Console.WriteLine($"Day 20 - Part 1: {Day20.GetDay20Part1Answer()}");
     Console.WriteLine($"Day 20 - Part 2: {Day20.GetDay20Part2Answer()}");
     // Day 21
     Console.WriteLine($"Day 21 - Part 1: {Day21.GetDay21Part1Answer()}");
     Console.WriteLine($"Day 21 - Part 2: {Day21.GetDay21Part2Answer()}");
     // Day 22
     Console.WriteLine($"Day 22 - Part 1: {Day22.GetDay22Part1Answer()}");
     Console.WriteLine($"Day 22 - Part 2: {Day22.GetDay22Part2Answer()}");
     // Day 23
     Console.WriteLine($"Day 23 - Part 1: {Day23.GetDay23Part1Answer()}");
     Console.WriteLine($"Day 23 - Part 2: {Day23.GetDay23Part2Answer()}");
     // Day 24
     Console.WriteLine($"Day 24 - Part 1: {Day24.GetDay24Part1Answer()}");
     Console.WriteLine($"Day 24 - Part 2 Test: {Day24.GetDay24Part2AnswerTest()}");
     Console.WriteLine($"Day 24 - Part 2: {Day24.GetDay24Part2Answer()}");
     // Day 24
     Console.WriteLine($"Day 25 - Part 1: {Day25.GetDay25Part1Answer()}");
 }
Esempio n. 5
0
        static void Main(string[] args)
        {
            // Round 01
            //List<string> input = InputParser.GetInputLines("input01.txt");
            //var result = Day01.AdventOfCode2019_01(input);
            //Console.WriteLine(result);


            // Round 02
            //List<int> input = InputParser.GetInputCommaSeperated<int>("input02.txt");
            //var result = Day02.AdventOfCode2019_02(input);
            //Console.WriteLine(result);


            // Round 03
            //List<List<string>> input = InputParser.GetInputCommaSeperatedStringByLine("input03.txt");
            //var result1 = Day03.AdventOfCode2019_03_1(input);
            //var result2 = Day03.AdventOfCode2019_03_2(input);
            //Console.WriteLine($"{result1} - {result2}");


            // Round 04
            //var result1 = Day04.AdventOfCode2019_04_1(264360, 746325);
            //var result2 = Day04.AdventOfCode2019_04_2(264360, 746325);
            //Console.WriteLine($"{result1} - {result2}");


            // Round 05
            //List<int> input = InputParser.GetInputCommaSeperated<int>("input05.txt");
            //var result = Day05.AdventOfCode2019_05_IntCode(input, 5);
            //Console.WriteLine(result.Last());


            // Round 06
            //var input = InputParser.GetInputLines("input06.txt");
            //var result1 = Day06.AdventOfCode2019_06_1(input);
            //var result2 = Day06.AdventOfCode2019_06_2(input);
            //Console.WriteLine($"{result1} - {result2}");


            // Round 7
            //var input = InputParser.GetInputCommaSeperated<int>("Input07.txt");
            //var result1 = Day07.AdventOfCode2019_07_1(input);
            //var result2 = Day07.AdventOfCode2019_07_2(input);
            //Console.WriteLine($"{result1} - {result2}");

            // Round 08
            //var input = InputParser.GetInputText("Input08.txt");
            //var result1 = Day08.AdventOfCode2019_08_1(input);
            //Console.WriteLine(result1);
            //Day08.AdventOfCode2019_08_2(input);


            // Round 09
            //var input = InputParser.GetInputCommaSeperated<long>("input09.txt");
            //var result1 = Day09.AdventOfCode2019_09_1(input);
            //var result2 = Day09.AdventOfCode2019_09_2(input);
            //Console.WriteLine($"{result1} - {result2}");


            // Round 10
            //var input = InputParser.GetInputLines("input10.txt");
            //var result1 = Day10.AdventOfCode2019_10_1(input);
            //var result2 = Day10.AdventOfCode2019_10_2(input);
            //Console.WriteLine($"{result1} - {result2}");


            // Round 11
            //var input = InputParser.GetInputCommaSeperated<long>("input11.txt");
            //var result1 = Day11.AdventOfCode2019_11_1(input);
            //Console.WriteLine(result1);
            //Day11.AdventOfCode2019_11_2(input);


            // Round 12
            //var input = InputParser.GetInputLines("input12.txt");
            //var result1 = Day12.AdventOfCode2019_12_1(input);
            //var result2 = Day12.AdventOfCode2019_12_2(input);
            //Console.WriteLine($"{result1} - {result2}");


            // Round 13
            //var input = InputParser.GetInputCommaSeperated<long>("input13.txt");
            //var result1 = Day13.AdventOfCode2019_13_1(input);
            //var result2 = Day13.AdventOfCode2019_13_2(input);
            //Console.WriteLine($"{result1} - {result2}");


            // Round 14
            //var input = InputParser.GetInputLines("input14.txt");
            //var result1 = Day14.AdventOfCode2019_14_1(input);
            //var result2 = Day14.AdventOfCode2019_14_2(input);
            //Console.WriteLine($"{result1} - {result2}");


            // Round 15
            //var input = InputParser.GetInputCommaSeperated<long>("input15.txt");
            //var result1 = Day15.AdventOfCode2019_15_1(input);
            //var result2 = Day15.AdventOfCode2019_15_2(input);
            //Console.WriteLine($"{result1} - {result2}");

            // Round 16
            //var input = InputParser.GetInputText("input16.txt");
            //var result1 = Day16.AdventOfCode2019_16_1(input);
            //var result2 = Day16.AdventOfCode2019_16_2(input);
            //Console.WriteLine($"{result1} - {result2}");


            // Round 17
            //var input = InputParser.GetInputCommaSeperated<long>("input17.txt");
            //var result1 = Day17.AdventOfCode2019_17_1(input);
            //var result2 = Day17.AdventOfCode2019_17_2(input);
            //Console.WriteLine($"{result1} - {result2}");

            // Round 18
            //var input = InputParser.GetInputLines("input18.txt");
            //var result1 = Day18.AdventOfCode2019_18_1(input);
            //var input2 = InputParser.GetInputLines("input18_2.txt");
            //var result2 = Day18.AdventOfCode2019_18_2(input2);
            //Console.WriteLine($"{result1} - {result2}");


            // Round 19
            var input   = InputParser.GetInputCommaSeperated <long>("input19.txt");
            var result1 = Day19.AdventOfCode2019_19_1(input);
            var result2 = Day19.AdventOfCode2019_19_2(input);

            Console.WriteLine($"{result1} - {result2}");

            Console.ReadLine();
        }