Incr And Decr Seq Problem

Test case 0 and 8 fail
Please Help

Hey @S18LP0050 it is mentioned in the question that each sequence should be strictly increasing or decreasing so instead of >, < sign >=, <= sign would come.
and you need to add the block

if(t == -1){
	cout << "true";
	return 0;
}

after the first while loop because if the entire sequence is decreasing t becomes -1 after the first while loop.