import sys num = int(input()) heights = list(map(int, input().split())) resmax = 0 def halpsearch(buffs,key): l,r=0,len(buffs)-1 mid=l while(l<r): mid=(l+r)//2 if(buffs[mid]>=key): r=mid else: l=mid+1 return r def solve(heights): ...