Function to find the maximum count of subarrays
long long subarray ( vector < int > & v ) { long long int n = v . size ( ) ; if ( n <= 1 ) return n ; long long ans = proc ( v ) ; int low = v [ 0 ] , pos_low = 0 , high = v [ 0 ] , pos_high = 0 ;