Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ascedning
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- int br = 1;
- int max = 1;
- if (n > 0)
- {
- var a = int.Parse(Console.ReadLine());
- for (int i = 2; i <= n; i++)
- {
- var b = int.Parse(Console.ReadLine());
- if (b > a)
- {
- br++;
- if (br > max)
- {
- max = br;
- }
- }
- else
- {
- br = 1;
- }
- a = b;
- }
- Console.WriteLine(max);
- }
- else
- {
- Console.WriteLine(0);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement