Problem 2863 · Easy

Maximum Length of Semi-Decreasing Subarrays

Find the longest subarray of length at least two whose first value is strictly greater than its last; scan each left end inward from the far right.

Open the interactive visualisation