human
Smallest occurring element in each subsequence | Function that count the subsequence such that each element as the minimum element in the subsequence.
Store index in a map.
Sort the array.
To store count of subsequence.
Traverse the array.
Store count of subsequence.
Print the count of subsequence.
Driver code.
Function call"
How can the above be solved in Python?

=====
Write me a code to smallest occurring element in each subsequence and the other steps required?
assistant
#Here is code to smallest occurring element in each subsequence and the other steps required.
 def solve ( arr , N ) :
	M = { }
	for i in range ( N ) :
		M [ i ] = arr [ i ]
	arr . sort ( )
	Count = { }
	for i in range ( N ) :
		Count [ arr [ i ] ] = pow ( 2 , N - i - 1 )
	for it in Count . values ( ) :
		print ( it , end = " ▁ " )
if __name__ == " _ _ main _ _ " :
	arr = [ 5 , 2 , 1 ]
	N = len ( arr )
	solve ( arr , N )