A Very Simple Solution


#1

A.sort(reverse = True)
if A[0] == 0: return 1
for i in range(1,len(A)):
-> if A[i] != A[i-1] and A[i] == i: return 1

return -1