Function to find the maximum count of subarrays
def subarray ( v ) : NEW_LINE INDENT n = len ( v ) ; NEW_LINE if ( n <= 1 ) : NEW_LINE INDENT return n ; NEW_LINE DEDENT ans = proc ( v ) ; NEW_LINE low = v [ 0 ] NEW_LINE pos_low = 0 NEW_LINE high = v [ 0 ] NEW_LINE pos_high = 0 NEW_LINE DEDENT