Esempio n. 1
0
        public static void Run()
        {
            var lines   = InOut.ReadStringInput(out numberOfCases).ToList();
            var cases   = new CaseSplitter().Configure_TakingNFromFirstVal().GetCaseLines(lines).ToArray();
            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);
        }
Esempio n. 2
0
 internal CaseSolver(CaseInput inputCase)
 {
     input = inputCase;
 }