Stock Span 123456

Test Case 1 is failing,please help.
My code is at:https://ide.codingblocks.com/s/125688

What if the input is:
6
40 35 40 38 38 50
Your Ans: 1 1 3 1 2 4 END
Excepted Output : 1 1 3 1 1 6 END

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.