public static void ArrayLine <T>(this FormattedStreamWriter writer, T[] array, int n, string format = "{0}", string separator = " ") { for (int i = 0; i < n; ++i) { if (i > 0) { writer.Write(separator); } writer.Write(format, array[i]); } writer.WriteLine(); }
public ConcreteSolver(BufferedStreamReader read, FormattedStreamWriter write) { this.read = read; this.write = write; }
class Program { static void Main(string[] args) { using (var output = new CC.FormattedStreamWriter(Console.OpenStandardOutput())) using (var error = new CC.FormattedStreamWriter(Console.OpenStandardError())) using (var input = new CC.BufferedStreamReader(Console.OpenStandardInput())) new CC.Solver(input, output, error).Do(); }
public Solver(BufferedStreamReader read, FormattedStreamWriter write, FormattedStreamWriter error) { this.read = read; this.write = write; this.error = error; }
public static void ArrayLine <T>(this FormattedStreamWriter writer, T[] array, string format = "{0}", string separator = " ") { writer.ArrayLine(array, array.Length, format, separator); }