Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Sample
- {
- class Program
- {
- public static void Main()
- {
- var n = int.Parse(Console.ReadLine());
- var currentCount = 1;
- var maxCount = n > 0 ? 1 : 0;
- var previousNum = 0; ;
- if (n > 0)
- {
- previousNum = int.Parse(Console.ReadLine());
- }
- for (int i = 0; i < n - 1; i++)
- {
- var currentNum = int.Parse(Console.ReadLine());
- if (currentNum > previousNum)
- {
- currentCount++;
- if (currentCount > maxCount)
- {
- maxCount = currentCount;
- }
- }
- else
- {
- currentCount = 1;
- }
- previousNum = currentNum;
- }
- Console.WriteLine(maxCount);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement