Let’s define an array element arr[i] is beautiful if there’s no element before arr[i] is greater than arr[i].In the other words, if arr[i] is beautiful, then arr[i] < arr[j] is false for all 0 ≤ j < i.
Your task is to find the largest beautiful element.
Hints:The variable used to record largest beautiful element should be initialized small enough
The first line contains an integer N, meaning the size of array. The second line contains N integers, denoting each element in array.
Print the largest beautiful element.
Remember to print ‘\n’ on the end of each line.