Exemple #1
0
        public static void Part2(string[] input)
        {
            Helper.PrintChallengePart("Part 2");
            int result = Calculate3Sum(input);

            Console.WriteLine("Result: " + result);
        }
Exemple #2
0
        public static void Part2(string[] input)
        {
            Helper.PrintChallengePart("Part 2");

            BitmaskManager bits = new BitmaskManager(input);
            long           sum  = bits.SumMemoryValuesVersion2();

            Console.WriteLine("Version 2: " + sum);
        }
Exemple #3
0
        public static void Part2(string[] input)
        {
            Helper.PrintChallengePart("Part 2");

            SpaceMapper mapper = new SpaceMapper(input);
            int         result = mapper.CountActivePart2();

            Console.WriteLine("Active Cubes: " + result);
        }
Exemple #4
0
        public static void Part1(string[] input)
        {
            Helper.PrintChallengePart("Part 1");

            XmasSystem xmas   = new XmasSystem(input);
            long       result = xmas.FindInvalidData(25);

            Console.WriteLine("Invalid: " + result);
        }
Exemple #5
0
        public static void Part1(string[] input)
        {
            Helper.PrintChallengePart("Part 1");

            VoltageAdaptor volts  = new VoltageAdaptor(input);
            int            result = volts.CalculateDifferences();

            Console.WriteLine("Volts Difference: " + result);
        }
Exemple #6
0
        public static void Part2(string[] input)
        {
            Helper.PrintChallengePart("Part 2");

            VoltageAdaptor volts  = new VoltageAdaptor(input);
            ulong          result = volts.CalculateCombinations();

            Console.WriteLine("Combos: " + result);
        }
Exemple #7
0
        public static void Part2(string[] input)
        {
            Helper.PrintChallengePart("Part 2");

            GameBoy gameBoy = new GameBoy(input);
            int     accum   = gameBoy.FixBootInstructions();

            Console.WriteLine("Accumulator: " + accum);
        }
Exemple #8
0
        public static void Part2(string[] input)
        {
            Helper.PrintChallengePart("Part 2");

            BusScheduler bus    = new BusScheduler(input);
            long         result = bus.CalculateSynchronicity();

            Console.WriteLine("Result: " + result);
        }
Exemple #9
0
        public static void Part1(string[] input)
        {
            Helper.PrintChallengePart("Part 1");

            BusScheduler bus    = new BusScheduler(input);
            int          result = bus.CalculateWaitingTime();

            Console.WriteLine("Result: " + result);
        }
Exemple #10
0
        public static void Part1(string[] input)
        {
            Helper.PrintChallengePart("Part 1");

            TobogganSatNav satSav    = new TobogganSatNav(input);
            int            treeCount = satSav.RoutePlanner(3, 1);

            Console.WriteLine("Trees Hit: " + treeCount);
        }
Exemple #11
0
        public static void Part2(string[] input)
        {
            Helper.PrintChallengePart("Part 2");

            PassportManager passMangager = new PassportManager(input);
            List <Passport> valid        = passMangager.PassportValidation2();

            Console.WriteLine("Valid Passports: " + valid.Count);
        }
Exemple #12
0
        public static void Part2(string[] input)
        {
            Helper.PrintChallengePart("Part 2");

            ShipNavigator navi   = new ShipNavigator(input);
            int           result = navi.Part2Distance();

            Console.WriteLine("Distance: " + result);
        }
Exemple #13
0
        public static void Part1(string[] input)
        {
            Helper.PrintChallengePart("Part 1");

            BaggageProcessor processor  = new BaggageProcessor(input);
            List <Bag>       parentBags = processor.FindOuterParentBags("shiny gold");

            Console.WriteLine("Count: " + parentBags.Count());
        }
Exemple #14
0
        public static void Part2(string[] input)
        {
            Helper.PrintChallengePart("Part 2");

            BaggageProcessor processor = new BaggageProcessor(input);
            int count = processor.CountInnerBags("shiny gold");

            Console.WriteLine("Count: " + count);
        }
Exemple #15
0
        public static void Part2(int[] input)
        {
            Helper.PrintChallengePart("Part 2");

            ElvishMemory elfGame = new ElvishMemory(input);
            long         result  = elfGame.FindSpokenNumber(30000000);

            Console.WriteLine("Number: " + result);
        }
Exemple #16
0
        public static void Part2(string[] input)
        {
            Helper.PrintChallengePart("Part 2");

            SeatSorter sorter = new SeatSorter(input);
            int        result = sorter.PartTwo();

            Console.WriteLine("Occupied Seats: " + result);
        }
Exemple #17
0
        public static void Part2(string[] input)
        {
            Helper.PrintChallengePart("Part 2");

            AeroplaneManager aeroplane = new AeroplaneManager(input);
            int mySeatID = aeroplane.FindMySeat();

            Console.WriteLine("My Seat ID" + mySeatID);
        }
Exemple #18
0
        public static void Part1(string[] input)
        {
            Helper.PrintChallengePart("Part 1");
            PasswordManager passwordManager = new PasswordManager(input);

            List <Password> invalidPasswords = passwordManager.PasswordPolicyViolation1();

            Console.WriteLine("Valid Passwords: " + (passwordManager.Passwords.Count - invalidPasswords.Count));
        }
Exemple #19
0
        public static void Part1(string[] input)
        {
            Helper.PrintChallengePart("Part 1");
            
            AeroplaneManager aeroplane = new AeroplaneManager(input);            
            int highestSeatID = aeroplane.HighestSeatID();

            Console.WriteLine("Highest Seat ID: "+ highestSeatID);  

        }
Exemple #20
0
        public static void Part2(string[] input)
        {
            Helper.PrintChallengePart("Part 2");

            TicketTranslator ticketJobby = new TicketTranslator(input);

            long result = ticketJobby.MultiplyTicketProperty("departure");

            Console.WriteLine("Your Value: " + result);
        }
Exemple #21
0
        public static void Part2(string[] input)
        {
            Helper.PrintChallengePart("Part 2");

            int count = CustomCustoms.GetCommonGroupPositives(input);

            Console.WriteLine("Common Positive Answers: " + count);


        }
Exemple #22
0
        public static void Part1(string[] input)
        {
            Helper.PrintChallengePart("Part 1");

            int count = CustomCustoms.GetGroupAnswers(input);


            Console.WriteLine("Positive Answers: "+count);

        }
Exemple #23
0
        public static void Part2(string[] input)
        {
            Helper.PrintChallengePart("Part 2");

            XmasSystem xmas   = new XmasSystem(input);
            long       result = xmas.FindInvalidData(25);
            long       sum    = xmas.FindContiguousSet(result);

            Console.WriteLine("Contiguous Sum: " + sum);
        }
Exemple #24
0
        public static void Part1(string[] input)
        {
            Helper.PrintChallengePart("Part 1");

            TicketTranslator ticketJobby = new TicketTranslator(input);

            int result = ticketJobby.ErrorRate();

            Console.WriteLine("Invalid Tickets: " + result);
        }
Exemple #25
0
        public static void Part2(string[] input)
        {
            Helper.PrintChallengePart("Part 2");

            long           treeCount = 1;
            TobogganSatNav satSav    = new TobogganSatNav(input);

            treeCount = treeCount * satSav.RoutePlanner(1, 1);
            treeCount = treeCount * satSav.RoutePlanner(3, 1);
            treeCount = treeCount * satSav.RoutePlanner(5, 1);
            treeCount = treeCount * satSav.RoutePlanner(7, 1);
            treeCount = treeCount * satSav.RoutePlanner(1, 2);

            Console.WriteLine("Trees Hit: " + treeCount);
        }