Пример #1
0
        public override string Part1(List <string> input, bool isTestRun)
        {
            List <Nanobot> bots = new List <Nanobot>();

            foreach (string line in input)
            {
                bots.Add(new Nanobot(line, ref bots));
            }
            Nanobot botWithLargestRange = bots.OrderByDescending(b => b.Radius).First();

            return(botWithLargestRange.BotsInRange.Count().ToString());
        }
Пример #2
0
 private int Distance(Nanobot otherBot)
 {
     return(Distance(otherBot.X, otherBot.Y, otherBot.Z));
 }