コード例 #1
0
        public static void Run()
        {
            var lines      = InOut.ReadStringInput(out numberOfCases);
            var cases      = new CaseSplitter().Configure_ConstantMultiLineCases(2).GetCaseLines(lines);
            var results    = new List <string>();
            var caseNumber = 0;

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

                var resultText = result.ToString();

                results.Add($"Case #{caseNumber}: {resultText}");
            }

            InOut.WriteOutput(results);
        }
コード例 #2
0
 internal CaseSolver(CaseInput inputCase)
 {
     input = inputCase;
 }