Advertisement
Guest User

Untitled

a guest
Sep 16th, 2015
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. class EqualStrings
  8. {
  9. static void Main()
  10. {
  11. List<string> input = Console.ReadLine().Split(' ').ToList();
  12. List<string> reduced = input.Distinct().ToList();
  13.  
  14. for(int i=0;i<reduced.Count;i++)
  15. {
  16. //Console.Write(reduced[i] + " ");
  17. for(int j=0;j<input.Count;j++)
  18. {
  19. if(reduced[i]==input[j])
  20. {
  21. Console.Write(input[j] + " ");
  22. }
  23. }
  24. Console.WriteLine();
  25.  
  26. }
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement