Advertisement
pifka

Periodic Table

May 19th, 2019
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Numerics;
  6. using System.Text;
  7. using System.Text.RegularExpressions;
  8. using System.Threading.Tasks;
  9.  
  10. namespace solutions
  11. {
  12. class Program
  13. {
  14. public static void Main()
  15. {
  16. var count = int.Parse(Console.ReadLine());
  17.  
  18. var result = new HashSet<string>();
  19.  
  20. for (int i = 0; i < count; i++)
  21. {
  22. var input = Console.ReadLine().Split();
  23.  
  24. foreach (var item in input)
  25. {
  26. result.Add(item);
  27. }
  28. }
  29. Console.WriteLine(string.Join(" ", result.OrderBy(x => x)));
  30. }
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement