
You are given an array maximumHeight , where maximumHeight[i] denotes the maximum height the i ^th tower can be assigned.
Your task is to assign a height to each tower so that:
The height of the i ^th tower is a positive integer and does not exceed maximumHeight[i] .
No two towers have the same height.
Return the maximum possible total sum of the tower heights. If it's not possible to assign heights, return -1 .
1 <= maximumHeight.length <= 10 ^51 <= maximumHeight[i] <= 10 ^9