Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- class missCat
- {
- static void Main()
- {
- int N = 5;// int.Parse(Console.ReadLine());
- string[] jurry = new string[5] { "aa", "aa", "bb", "bc", "ds" };
- string container = null;
- //for (int i = 0; i < N; i++)
- //{
- // jurry[i] = Parse(Console.ReadLine());
- //}
- int maxCount = 0;
- int count = 0;
- for (int i = 0; i < N; i++)
- {
- if (container == null || container != jurry[i])
- {
- container += jurry[i];
- if (maxCount < count)
- {
- maxCount = count;
- }
- }
- else
- {
- count++;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement