Beispiel #1
0
 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();
 }
Beispiel #2
0
 public ConcreteSolver(BufferedStreamReader read, FormattedStreamWriter write)
 {
     this.read  = read;
     this.write = write;
 }
Beispiel #3
0
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();
                }
Beispiel #4
0
 public Solver(BufferedStreamReader read, FormattedStreamWriter write, FormattedStreamWriter error)
 {
     this.read = read; this.write = write; this.error = error;
 }
Beispiel #5
0
 public static void ArrayLine <T>(this FormattedStreamWriter writer, T[] array, string format = "{0}", string separator = " ")
 {
     writer.ArrayLine(array, array.Length, format, separator);
 }