Advertisement
Guest User

Untitled

a guest
Jun 21st, 2017
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ascedning
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int n = int.Parse(Console.ReadLine());
  14. int br = 1;
  15. int max = 1;
  16. var a = int.Parse(Console.ReadLine());
  17. for(int i=2;i<=n;i++)
  18. {
  19. var b = int.Parse(Console.ReadLine());
  20.  
  21. if (b > a) { br++; if (br > max) max = br; }
  22. else { br = 1;}
  23.  
  24. a = b;
  25.  
  26.  
  27. }
  28. Console.WriteLine(max);
  29. }
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement