fork download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Linq;
  5.  
  6. /* Don't change anything here.
  7.  * Do not add any other imports. You need to write
  8.  * this program using only these libraries
  9.  */
  10.  
  11. namespace ProgramNamespace
  12. {
  13. /* You may add helper classes here if necessary */
  14.  
  15. public class Program
  16. {
  17. public static List<String> processData(
  18. IEnumerable<string> lines)
  19. {
  20. /*
  21.   * Do not make any changes outside this method.
  22.   *
  23.   * Modify this method to process `array` as indicated
  24.   * in the question. At the end, return a List containing
  25.   * the appropriate values
  26.   *
  27.   * Do not print anything in this method
  28.   *
  29.   * Submit this entire program (not just this function)
  30.   * as your answer
  31.   */
  32. List<String> retVal = new List<String>();
  33. return retVal;
  34. }
  35.  
  36. static void Main(string[] args)
  37. {
  38. try
  39. {
  40. String line;
  41. var inputLines = new List<String>();
  42. while((line = Console.ReadLine()) != null) {
  43. line = line.Trim();
  44. if (line != "")
  45. inputLines.Add(line);
  46. }
  47. var retVal = processData(inputLines);
  48. foreach(var res in retVal)
  49. Console.WriteLine(res);
  50. }
  51. catch (IOException ex)
  52. {
  53. Console.WriteLine(ex.Message);
  54. }
  55. }
  56.  
  57. }
  58. }
  59.  
Success #stdin #stdout 0.02s 15860KB
stdin
Mail Server, Authentication Library, v6
Video Call Server, Authentication Library, v7
Mail Server, Data Storage Library, v10
Chat Server, Data Storage Library, v11
Mail Server, Search Library, v6
Chat Server, Authentication Library, v8
Chat Server, Search Library, v7
Video Call Server, Data Storage Library, v10
Video Call Server, Video Compression Library, v3
stdout
Standard output is empty