Exemple #1
0
        private static IEnumerable <string> ProcessCases(IEnumerable <List <string> > cases)
        {
            var currentCaseNumber = 0;

            foreach (var caseLines in cases)
            {
                currentCaseNumber++; //1-indexed.
                var parsedCase = new CaseInput(caseLines);
                var solver     = new CaseSolver(parsedCase);
                var result     = solver.Solve();

                var resultText = result.ToString();

                yield return($"Case #{currentCaseNumber}: {resultText}");
            }
        }