human
Print indices in non | Function to print the order of array elements generating non - decreasing quotient after division by X.
Stores the quotient and the order.
Traverse the array.
Sort the vector.
Print the order.
Driver Code"
Solution in Python:
assistant
#Here is code to print indices in non and the other steps required.
 def printOrder ( order , N , X ) :
	vect = [ ]
	for i in range ( N ) :
		if ( order [ i ] % X == 0 ) :
			vect . append ( [ order [ i ] // X , i + 1 ] )
		else :
			vect . append ( [ order [ i ] // X + 1 , i + 1 ] )
	vect = sorted ( vect )
	for i in range ( N ) :
		print ( vect [ i ] [ 1 ] , end = " ▁ " )
if __name__ == ' _ _ main _ _ ' :
	N , X = 3 , 3
	order = [ 2 , 7 , 4 ]
	printOrder ( order , N , X )