Advertisement
nyker

Untitled

Apr 13th, 2014
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. class missCat
  5. {
  6. static void Main()
  7. {
  8. int N = 5;// int.Parse(Console.ReadLine());
  9. string[] jurry = new string[5] { "aa", "aa", "bb", "bc", "ds" };
  10. string container = null;
  11.  
  12. //for (int i = 0; i < N; i++)
  13. //{
  14. // jurry[i] = Parse(Console.ReadLine());
  15. //}
  16. int maxCount = 0;
  17. int count = 0;
  18. for (int i = 0; i < N; i++)
  19. {
  20. if (container == null || container != jurry[i])
  21. {
  22. container += jurry[i];
  23. if (maxCount < count)
  24. {
  25. maxCount = count;
  26. }
  27. }
  28. else
  29. {
  30. count++;
  31. }
  32. }
  33. }
  34.  
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement