Maximum length Biotonic Subarray submission failed

My code is at:https://ide.codingblocks.com/s/83849?_ga=2.236765441.1824206774.1560600690-1781338010.1558795165
I am getting correct answer for following test cases,but it still shows wrong answer while I submit:
5
6
12 4 78 90 45 23
4
40 30 20 10
8
1 11 2 10 4 5 2 1
6
80 60 30 40 20 10
7
2 4 78 90 45 23 45