Promi_38

cf 702A

Jan 13th, 2021
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. #include<stdio.h>
  2.  
  3. int main()
  4. {
  5.     long long n;
  6.     scanf("%lld", &n);
  7.    
  8.     long long i, a[n], c = 0, max = 0;
  9.     for(i = 0; i < n; i++) scanf("%lld", &a[i]);
  10.    
  11.     for(i = 0; i < n - 1; i++)
  12.     {
  13.         if(a[i] < a[i+1]) c++;
  14.         else c = 0;
  15.         if(max < c) max = c;
  16.         //printf("c %lld\n", c);
  17.     }
  18.     printf("%lld\n", max + 1);
  19. }
Advertisement
Add Comment
Please, Sign In to add comment