human
Find the count of Strictly decreasing Subarrays | Function to count the number of strictly decreasing subarrays.
Initialize length of current decreasing subarray.
Traverse through the array.
If arr [ i + 1 ] is less than arr [ i ] , then increment length.
Else Update count and reset length.
If last length is more than 1.
Driver Code"
Solution in Python:
assistant
#Here is code to find the count of Strictly decreasing Subarrays and the other steps required.
 def countDecreasing ( A , n ) :
	len = 1
	for i in range ( n - 1 ) :
		if ( A [ i + 1 ] < A [ i ] ) :
			len += 1
		else :
			cnt += ( ( ( len - 1 ) * len ) // 2 ) ;
			len = 1
	if ( len > 1 ) :
		cnt += ( ( ( len - 1 ) * len ) // 2 )
	return cnt
if __name__ == " _ _ main _ _ " :
	A = [ 100 , 3 , 1 , 13 ]
	n = len ( A )
	print ( countDecreasing ( A , n ) )