예제 #1
0
 static void Main(string[] args)
 {
     Day01.Run();
     Day02.Run();
     Day03.Run();
     Day04.Run();
     Day05.Run();
     Day06.Run();
     Day07.Run();
     Day08.Run();
     Day09.Run();
     Day10.Run();
     Day11.Run();
     Day12.Run();
     Day13.Run();
     Day14.Run();
     Day15.Run();
     Day16.Run();
     Day17.Run();
     Day18.Run();
     Day19a.Run();
     Day19b.Run();
     Day20.Run();
     Day21.Run();
     Day22.Run();
     Day23.Run();
     Day24.Run();
     Day25.Run();
 }
예제 #2
0
        public static void Main(string[] args)
        {
            var startTime = DateTime.Now;

            Console.BufferHeight = Int16.MaxValue - 1;
            Day20.Part1();
            var duration = DateTime.Now - startTime;

            Console.WriteLine($"---\n{duration}");
            Console.ReadLine();
        }
예제 #3
0
        static void Main()
        {
            var sw = new Stopwatch();

            sw.Start();
            string result = new Day20().CalcB().ToString();

            sw.Stop();

            Console.WriteLine("It took " + sw.Elapsed);

            WindowsClipboard.SetText(result);
            Console.WriteLine(result);
        }
예제 #4
0
        static void Main(string[] args)
        {
            while (true)
            {
                Console.WriteLine("*******************");
                Console.WriteLine("Advent of Code 2020");
                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();
            }
        }
예제 #5
0
        public static void Main(string[] args)
        {
            Logger.ShowDebug = false;

            Leaderboard.Start();

            Day01.StartA();
            Day01.StartB();

            Day02.StartA();
            Day02.StartB();

            Day03.StartA();
            Day03.StartB();

            Day04.StartA();
            Day04.StartB();

            Day05.StartA();
            Day05.StartB();

            Day06.StartA();
            Day06.StartB();

            Day07.StartA();
            Day07.StartB();

            Day08.StartA();
            Day08.StartB();

            Day09.StartA();
            Day09.StartB();

            Day10.StartA();
            Day10.StartB();

            Day11.StartA();
            Day11.StartB();

            Day12.StartA();
            Day12.StartB();

            Day13.StartA();
            Day13.StartB();
            Day13.StartB2();
            Day13.StartB3();

            Day14.StartA();
            Day14.StartB();

            Day15.StartA();
            Day15.StartB();

            Day16.StartA();
            Day16.StartB();

            Day17.StartA();
            Day17.StartB();

            Day18.StartA();
            Day18.StartB();

            Day19.StartA();
            Day19.StartB();

            Day20.StartA();
            Day20.StartB();

            Day21.StartA();
            Day21.StartB();

            Day22.StartA();
            Day22.StartB();

            Day23.StartA();
            Day23.StartB();

            Day24.StartA();
            Day24.StartB();

            Day25.StartA();

            Logger.ShowDebug = true;

            Console.ReadKey();
        }
예제 #6
0
 public static void Main()
 {
     Console.WriteLine("*** Advent of Code 2020 ***");
     Console.WriteLine();
     Console.WriteLine("--- Day 1: Report Repair ---");
     Console.WriteLine("Part One Answer: " + Day01.PartOne());
     Console.WriteLine("Part Two Answer: " + Day01.PartTwo());
     Console.WriteLine();
     Console.WriteLine("--- Day 2: Password Philosophy ---");
     Console.WriteLine("Part One Answer: " + Day02.PartOne());
     Console.WriteLine("Part Two Answer: " + Day02.PartTwo());
     Console.WriteLine();
     Console.WriteLine("--- Day 3: Toboggan Trajectory ---");
     Console.WriteLine("Part One Answer: " + Day03.PartOne());
     Console.WriteLine("Part Two Answer: " + Day03.PartTwo());
     Console.WriteLine();
     Console.WriteLine("--- Day 4: Passport Processing ---");
     Console.WriteLine("Part One Answer: " + Day04.PartOne());
     Console.WriteLine("Part Two Answer: " + Day04.PartTwo());
     Console.WriteLine();
     Console.WriteLine("--- Day 5: Binary Boarding ---");
     Console.WriteLine("Part One Answer: " + Day05.PartOne());
     Console.WriteLine("Part Two Answer: " + Day05.PartTwo());
     Console.WriteLine();
     Console.WriteLine("--- Day 6: Custom Customs ---");
     Console.WriteLine("Part One Answer: " + Day06.PartOne());
     Console.WriteLine("Part Two Answer: " + Day06.PartTwo());
     Console.WriteLine();
     Console.WriteLine("--- Day 7: Handy Haversacks ---");
     Console.WriteLine("Part One Answer: " + Day07.PartOne());
     Console.WriteLine("Part Two Answer: " + Day07.PartTwo());
     Console.WriteLine();
     Console.WriteLine("--- Day 8: Handheld Halting ---");
     Console.WriteLine("Part One Answer: " + Day08.PartOne());
     Console.WriteLine("Part Two Answer: " + Day08.PartTwo());
     Console.WriteLine();
     Console.WriteLine("--- Day 9: Encoding Error ---");
     Console.WriteLine("Part One Answer: " + Day09.PartOne());
     Console.WriteLine("Part Two Answer: " + Day09.PartTwo());
     Console.WriteLine();
     Console.WriteLine("--- Day 10: Adapter Array ---");
     Console.WriteLine("Part One Answer: " + Day10.PartOne());
     Console.WriteLine("Part Two Answer: " + Day10.PartTwo());
     Console.WriteLine();
     Console.WriteLine("--- Day 11: Seating System ---");
     Console.WriteLine("Part One Answer: " + Day11.PartOne());
     Console.WriteLine("Part Two Answer: " + Day11.PartTwo());
     Console.WriteLine();
     Console.WriteLine("--- Day 12: Rain Risk ---");
     Console.WriteLine("Part One Answer: " + Day12.PartOne());
     Console.WriteLine("Part Two Answer: " + Day12.PartTwo());
     Console.WriteLine();
     Console.WriteLine("--- Day 13: Shuttle Search ---");
     Console.WriteLine("Part One Answer: " + Day13.PartOne());
     Console.WriteLine("Part Two Answer: " + Day13.PartTwo());
     Console.WriteLine();
     Console.WriteLine("--- Day 14: Docking Data ---");
     Console.WriteLine("Part One Answer: " + Day14.PartOne());
     Console.WriteLine("Part Two Answer: " + Day14.PartTwo());
     Console.WriteLine();
     Console.WriteLine("--- Day 15: Rambunctious Recitation ---");
     Console.WriteLine("Part One Answer: " + Day15.PartOne());
     Console.WriteLine("Part Two Answer: " + Day15.PartTwo());
     Console.WriteLine();
     Console.WriteLine("--- Day 16: Ticket Translation ---");
     Console.WriteLine("Part One Answer: " + Day16.PartOne());
     Console.WriteLine("Part Two Answer: " + Day16.PartTwo());
     Console.WriteLine();
     Console.WriteLine("--- Day 17: Conway Cubes ---");
     Console.WriteLine("Part One Answer: " + Day17.PartOne());
     Console.WriteLine("Part Two Answer: " + Day17.PartTwo());
     Console.WriteLine();
     Console.WriteLine("--- Day 18: Operation Order ---");
     Console.WriteLine("Part One Answer: " + Day18.PartOne());
     Console.WriteLine("Part Two Answer: " + Day18.PartTwo());
     Console.WriteLine();
     Console.WriteLine("--- Day 19: Monster Messages ---");
     Console.WriteLine("Part One Answer: " + Day19.PartOne());
     Console.WriteLine("Part Two Answer: " + Day19.PartTwo());
     Console.WriteLine();
     Console.WriteLine("--- Day 20: Jurassic Jigsaw ---");
     Console.WriteLine("Part One Answer: " + Day20.PartOne());
     Console.WriteLine("Part Two Answer: " + Day20.PartTwo());
     Console.WriteLine();
     Console.WriteLine("--- Day 21: Allergen Assessment ---");
     Console.WriteLine("Part One Answer: " + Day21.PartOne());
     Console.WriteLine("Part Two Answer: " + Day21.PartTwo());
     Console.WriteLine();
     Console.WriteLine("--- Day 22: Crab Combat ---");
     Console.WriteLine("Part One Answer: " + Day22.PartOne());
     Console.WriteLine("Part Two Answer: " + Day22.PartTwo());
     Console.WriteLine();
     Console.WriteLine("--- Day 23: Crab Cups ---");
     Console.WriteLine("Part One Answer: " + Day23.PartOne());
     Console.WriteLine("Part Two Answer: " + Day23.PartTwo());
     Console.WriteLine();
     Console.WriteLine("--- Day 24: Lobby Layout ---");
     Console.WriteLine("Part One Answer: " + Day24.PartOne());
     Console.WriteLine("Part Two Answer: " + Day24.PartTwo());
     Console.WriteLine();
     Console.WriteLine("--- Day 25: Combo Breaker ---");
     Console.WriteLine("Part One Answer: " + Day25.PartOne());
     Console.WriteLine("Part Two Answer: fifty stars");
     Console.WriteLine();
     Console.ReadKey();
 }
예제 #7
0
        static void Main(string[] args)
        {
            var startTime = DateTime.Now;

            Console.WriteLine("---Welcome to erjicle's solutions to Advent of Code 2020!!---");
            // Day 1
            Console.WriteLine($"Day 01 - Part 1: {Day01.GetDay01Part01Answer()}");
            Console.WriteLine($"Day 01 - Part 2: {Day01.GetDay01Part02Answer()}");
            // Day 2
            Console.WriteLine($"Day 02 - Part 1: {Day02.GetDay02Part01Answer()}");
            Console.WriteLine($"Day 02 - Part 2: {Day02.GetDay02Part02Answer()}");
            // Day 3
            Console.WriteLine($"Day 03 - Part 1: {Day03.GetDay03Part01Answer()}");
            Console.WriteLine($"Day 03 - Part 2: {Day03.GetDay03Part02Answer()}");
            // Day 4
            Console.WriteLine($"Day 04 - Part 1: {Day04.GetDay04Part01Answer()}");
            Console.WriteLine($"Day 04 - Part 2: {Day04.GetDay04Part02Answer()}");
            // Day 5
            Console.WriteLine($"Day 05 - Part 1: {Day05.GetDay05Part01Answer()}");
            Console.WriteLine($"Day 05 - Part 2: {Day05.GetDay05Part02Answer()}");
            // Day 6
            Console.WriteLine($"Day 06 - Part 1: {Day06.GetDay06Part01Answer()}");
            Console.WriteLine($"Day 06 - Part 2: {Day06.GetDay06Part02Answer()}");
            // Day 7
            Console.WriteLine($"Day 07 - Part 1: {Day07.GetDay07Part01Answer()}");
            Console.WriteLine($"Day 07 - Part 2: {Day07.GetDay07Part02Answer()}");
            // Day 8
            Console.WriteLine($"Day 08 - Part 1: {Day08.GetDay08Part01Answer()}");
            Console.WriteLine($"Day 08 - Part 2: {Day08.GetDay08Part02Answer()}");
            // Day 9
            Console.WriteLine($"Day 09 - Part 1: {Day09.GetDay09Part01Answer()}");
            Console.WriteLine($"Day 09 - Part 2: {Day09.GetDay09Part02Answer()}");
            // Day 10
            Console.WriteLine($"Day 10 - Part 1: {Day10.GetDay10Part01Answer()}");
            Console.WriteLine($"Day 10 - Part 2: {Day10.GetDay10Part02Answer()}");
            // Day 11
            Console.WriteLine($"Day 11 - Part 1: {Day11.GetDay11Part01Answer()}");
            Console.WriteLine($"Day 11 - Part 2: {Day11.GetDay11Part02Answer()}");
            // Day 12
            Console.WriteLine($"Day 12 - Part 1: {Day12.GetDay12Part01Answer()}");
            Console.WriteLine($"Day 12 - Part 2: {Day12.GetDay12Part02Answer()}");
            // Day 13
            Console.WriteLine($"Day 13 - Part 1: {Day13.GetDay13Part01Answer()}");
            Console.WriteLine($"Day 13 - Part 2: {Day13.GetDay13Part02Answer()}");
            // Day 14
            Console.WriteLine($"Day 14 - Part 1: {Day14.GetDay14Part01Answer()}");
            Console.WriteLine($"Day 14 - Part 2: {Day14.GetDay14Part02Answer()}");
            // Day 15
            Console.WriteLine($"Day 15 - Part 1: {Day15.GetDay15Part01Answer()}");
            Console.WriteLine($"Day 15 - Part 2: {Day15.GetDay15Part02Answer()}");
            // Day 16
            Console.WriteLine($"Day 16 - Part 1: {Day16.GetDay16Part01Answer()}");
            Console.WriteLine($"Day 16 - Part 2: {Day16.GetDay16Part02Answer()}");
            // Day 17
            Console.WriteLine($"Day 17 - Part 1: {Day17.GetDay17Part01Answer()}");
            Console.WriteLine($"Day 17 - Part 2: {Day17.GetDay17Part02Answer()}");
            // Day 18
            Console.WriteLine($"Day 18 - Part 1: {Day18.GetDay18Part01Answer()}");
            Console.WriteLine($"Day 18 - Part 2: {Day18.GetDay18Part02Answer()}");
            // Day 19
            Console.WriteLine($"Day 19 - Part 1: {Day19.GetDay19Part01Answer()}");
            Console.WriteLine($"Day 19 - Part 2: {Day19.GetDay19Part02Answer()}");
            // Day 20
            Console.WriteLine($"Day 20 - Part 1: {Day20.GetDay20Part01Answer()}");
            Console.WriteLine($"Day 20 - Part 2: {Day20.GetDay20Part02Answer()}");
            // Day 21
            Console.WriteLine($"Day 21 - Part 1: {Day21.GetDay21Part01Answer()}");
            Console.WriteLine($"Day 21 - Part 2: {Day21.GetDay21Part02Answer()}");
            // Day 22
            Console.WriteLine($"Day 22 - Part 1: {Day22.GetDay22Part01Answer()}");
            Console.WriteLine($"Day 22 - Part 2: {Day22.GetDay22Part02Answer()}");
            // Day 23
            Console.WriteLine($"Day 23 - Part 1: {Day23.GetDay23Part01Answer()}");
            Console.WriteLine($"Day 23 - Part 2: {Day23.GetDay23Part02Answer()}");
            // Day 24
            Console.WriteLine($"Day 24 - Part 1: {Day24.GetDay24Part01Answer()}");
            Console.WriteLine($"Day 24 - Part 2: {Day24.GetDay24Part02Answer()}");
            // Day 25
            Console.WriteLine($"Day 25 - Part 1: {Day25.GetDay25Part01Answer()}");
            var endTime = DateTime.Now;

            Console.WriteLine("All puzzles complete! You have now arrived at your sweet tropical vacation spot. Enjoy!");
            Console.WriteLine($"Processing complete in {(endTime - startTime).TotalSeconds} second(s)!");
        }
예제 #8
0
        //IT WORKS AND I'M TOO LAZY TO ALTER WHAT LOOKED FINE WHEN IT WAS JUST 3 DAYS LONG
        private void Button1_Click(object sender, EventArgs e)
        {
            switch ((int)dayNumber.Value)
            {
            case 1:
                outputBox.Text = "\n- - - - DAY 1 - PART 1 - - - -\n\n" + Day1.PartOneOutput(inputBox.Text);
                break;

            case 2:
                outputBox.Text = "\n- - - - DAY 2 - PART 1 - - - -\n\n" + Day2.PartOneOutput(inputBox.Text);
                break;

            case 3:
                outputBox.Text = "\n- - - - DAY 3 - PART 1 - - - -\n\n" + Day3.PartOneOutput(inputBox.Text);
                break;

            case 4:
                outputBox.Text = "\n- - - - DAY 4 - PART 1 - - - -\n\n" + Day4.PartOneOutput(inputBox.Text);
                break;

            case 5:
                outputBox.Text = "\n- - - - DAY 5 - PART 1 - - - -\n\n" + Day5.PartOneOutput(inputBox.Text);
                break;

            case 6:
                outputBox.Text = "\n- - - - DAY 6 - PART 1 - - - -\n\n" + Day6.PartOneOutput(inputBox.Text);
                break;

            case 7:
                outputBox.Text = "\n- - - - DAY 7 - PART 1 - - - -\n\n" + Day7.PartOneOutput(inputBox.Text);
                break;

            case 8:
                outputBox.Text = "\n- - - - DAY 8 - PART 1 - - - -\n\n" + Day8.PartOneOutput(inputBox.Text);
                break;

            case 9:
                outputBox.Text = "\n- - - - DAY 9 - PART 1 - - - -\n\n" + Day9.PartOneOutput(inputBox.Text);
                break;

            case 10:
                outputBox.Text = "\n- - - - DAY 10 - PART 1 - - - -\n\n" + Day10.PartOneOutput(inputBox.Text);
                break;

            case 11:
                outputBox.Text = "\n- - - - DAY 11 - PART 1 - - - -\n\n" + Day11.PartOneOutput(inputBox.Text);
                break;

            case 12:
                outputBox.Text = "\n- - - - DAY 12 - PART 1 - - - -\n\n" + Day12.PartOneOutput(inputBox.Text);
                break;

            case 13:
                outputBox.Text = "\n- - - - DAY 13 - PART 1 - - - -\n\n" + Day13.PartOneOutput(inputBox.Text);
                break;

            case 14:
                outputBox.Text = "\n- - - - DAY 14 - PART 1 - - - -\n\n" + Day14.PartOneOutput(inputBox.Text);
                break;

            case 15:
                outputBox.Text = "\n- - - - DAY 15 - PART 1 - - - -\n\n" + Day15.PartOneOutput(inputBox.Text);
                break;

            case 16:
                outputBox.Text = "\n- - - - DAY 16 - PART 1 - - - -\n\n" + Day16.PartOneOutput(inputBox.Text);
                break;

            case 17:
                outputBox.Text = "\n- - - - DAY 17 - PART 1 - - - -\n\n" + Day17.PartOneOutput(inputBox.Text);
                break;

            case 18:
                outputBox.Text = "\n- - - - DAY 18 - PART 1 - - - -\n\n" + Day18.PartOneOutput(inputBox.Text);
                break;

            case 19:
                outputBox.Text = "\n- - - - DAY 19 - PART 1 - - - -\n\n" + Day19.PartOneOutput(inputBox.Text);
                break;

            case 20:
                outputBox.Text = "\n- - - - DAY 20 - PART 1 - - - -\n\n" + Day20.PartOneOutput(inputBox.Text);
                break;

            case 21:
                outputBox.Text = "\n- - - - DAY 21 - PART 1 - - - -\n\n" + Day21.PartOneOutput(inputBox.Text);
                break;

            case 22:
                outputBox.Text = "\n- - - - DAY 22 - PART 1 - - - -\n\n" + Day22.PartOneOutput(inputBox.Text);
                break;

            case 23:
                outputBox.Text = "\n- - - - DAY 23 - PART 1 - - - -\n\n" + Day23.PartOneOutput(inputBox.Text);
                break;

            case 24:
                outputBox.Text = "\n- - - - DAY 24 - PART 1 - - - -\n\n" + Day24.PartOneOutput(inputBox.Text);
                break;

            case 25:
                outputBox.Text = "\n- - - - DAY 25 - PART 1 - - - -\n\n" + Day25.PartOneOutput(inputBox.Text);
                break;

            default:
                break;
            }
        }