public static void Run() { var lines = InOut.ReadStringInput(out numberOfCases).ToList(); var cases = new CaseSplitter().Configure_TakingNFromFirstValPlusOne().GetCaseLines(lines).ToArray(); var results = new List <string>(); for (int ii = 0; ii < numberOfCases; ii++) { var parsedCase = new CaseInput(cases[ii].ToArray()); var solver = new CaseSolver(parsedCase); var result = solver.Solve(); var resultText = result.ToString(); results.Add($"Case #{ii + 1}: {resultText}"); } InOut.WriteOutput(results); }
internal CaseSolver(CaseInput inputCase) { input = inputCase; }