Advertisement
Guest User

Untitled

a guest
Sep 15th, 2015
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4.  
  5.  
  6. class SequenceOfEqualStrings
  7. {
  8. static void Main()
  9. {
  10. List<string> input = Console.ReadLine().Split().ToList();
  11. input.Sort(string.CompareOrdinal);
  12. List<string> cleared = input.Distinct().ToList();
  13. for (int i = 0; i < cleared.Count; i++)
  14. {
  15. string element = cleared[i];
  16. input.FindAll(p => p == element).ForEach(p => Console.Write(p+" "));
  17. Console.WriteLine();
  18. }
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement