[Increasing Decreasing]

What went wrong in my solution for the question in LUNCHTIME challenge Please someone suggest.
Question : [Increasing Decreasing]
My solution : CodeChef: Practical coding for everyone