SHARE
TWEET

Periodic Table

pifka May 19th, 2019 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top