fork download
  1. input()
  2. l = [int(i) for i in input().split()]
  3. started = [0 for i in range(len(l))]
  4. flag = 0
  5. ele = -1
  6. size = 0
  7. max_size = 0
  8. i = 1
  9. started[i]=1
  10. while(i<len(l)):
  11. ## print(i, size)
  12. if(l[i-1]<l[i]):
  13. i+=1
  14. size += 1
  15. continue
  16. if(flag==0):
  17. i+=1
  18. flag = 1
  19. ele = i-2
  20. continue
  21. ## if i == ele+1: i+=1
  22. ## else: i = ele+1
  23. i = ele+1
  24. while(started[i]==1):
  25. i+=1
  26. started[i]=1
  27. flag = 0
  28. if size>max_size: max_size = size
  29. size = 0
  30. continue
  31. if(size>max_size): max_size = size
  32. print(max_size+1)
  33.  
Runtime error #stdin #stdout #stderr 0.12s 23728KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 1, in <module>
    input()
EOFError: EOF when reading a line