Пример #1
0
        public static void Run()
        {
            var lines   = InOut.ReadStringInput(out numberOfCases).ToList();
            var cases   = CaseInput.SubDivideInput(lines.GetEnumerator());
            var results = new List <string>();

            for (int ii = 0; ii < numberOfCases; ii++)
            {
                var parsedCase = new CaseInput(cases[ii]);
                var solver     = new CaseSolver(parsedCase);
                var result     = solver.Solve();

                var resultText = result.ToString();

                results.Add(string.Format("Case #{0}: {1}", ii + 1, resultText));
            }

            InOut.WriteOutput(results);
        }
Пример #2
0
 internal CaseSolver(CaseInput inputCase)
 {
     input = inputCase;
 }