MAXIMUM LENGTH BIOTONIC SUBARRAY question

this is my code
https://ide.codingblocks.com/s/41970

My input test cases are working fine yet wrong answer is being displayed

please rectify the issue

Hey Kshitij, check for this case
input : 1 1 5
your code’s output : -1
correct output : 1

Got it
Thank you
Is there any way that I can shorten it?

it still is not being accepted
link:
https://ide.codingblocks.com/s/41973

check your code again
//cout<<max(a,max(b,c))<<endl;
cout<<a<<endl;
cout<<b<<endl;
cout<<c<<endl;
you are printing a,b,c instead of printing max of a,b,c

I corrected that in submission
Above code is for reference

Hey Kshitij, your code is not handling all the cases,
for eg.
input:
1
13
77 88 99 100 30 74 270 222 199 139 80 90
your code’s output : 5
correct output : 7

your code is just checking the first correct sequence.

What can be done to correct and simplify the code?

https://ide.codingblocks.com/s/43033
Test case is not passing. Why ?