题目描述
In a fictitious city of CODASLAM there were many skyscrapers. The mayor of the city decided to make the city beautiful and for this he decided to arrange the skyscrapers in descending order of their height, and the order must be strictly decreasing but he also didn’t want to waste much money so he decided to get the minimum cuts possible. Your job is to output the minimum value of cut that is possible to arrange the skyscrapers in descending order.
-----Input-----
First line of input is the number of sky-scrappers in the city
Second line of input is the height of the respective sky-scrappers
-----Output-----
- Your output should be the minimum value of cut required to arrange these sky-scrappers in descending order.
-----Example-----
Input:
5
1 2 3 4 5
Output:
8
By:
Chintan,Asad,Ashayam,Akanksha
输入格式
见题面
输出格式
见题面