human
Make all elements zero by decreasing any two elements by one at a time | Function that returns true if all the array elements can be made 0 with the given operation.
Find the maximum element and the sum.
Check the required condition.
Driver code"
Solution in Python:

Write me a code to make all elements zero by decreasing any two elements by one at a time and the other steps required?
assistant
#Here is code to make all elements zero by decreasing any two elements by one at a time and the other steps required.
 def checkZeroArray ( arr , n ) :
	sum = 0
	maximum = - 10 ** 9
	for i in range ( n ) :
		sum = sum + arr [ i ]
		maximum = max ( maximum , arr [ i ] )
	if ( sum % 2 == 0 and maximum <= sum // 2 ) :
		return True
	return False
arr = [ 1 , 2 , 1 , 2 , 2 ]
n = len ( arr )
if ( checkZeroArray ( arr , n ) ) :
	print ( " Yes " )
else :
	print ( " No " )