static void Main(string[] args) { //[summary]A - ?????? int n = int.Parse(Console.ReadLine()); //???????? var meats = ReadLines(n).ToList(); //????????????????????????? var patterns = CountPatterns(n); var numStrs = MyNumber.GetBinaryNumberStrings(patterns).ToList(); if (n == 1) { Console.WriteLine(meats[0]); } else { int finishTime = GetFinishTimeToBakeMeat(meats, numStrs); Console.WriteLine(finishTime); } }
static void Main(string[] args) { //[summary]A - ?????? int n = int.Parse(Console.ReadLine()); //???????? var meats = ReadLines(n).ToList(); if (n == 1) { Console.WriteLine(meats[0]); return; } //????????????????????????? var patterns = (int)Math.Pow(2, n); var numStrs = MyNumber.GetBinaryNumberStrings(patterns).ToList(); numStrs = DeletedDoubledNumStrs(numStrs, n); int finishTime = GetFinishTimeToBakeMeat(meats, numStrs); Console.WriteLine(finishTime); }