import java.util.Scanner;public class BJ2630 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int M = sc.nextInt(); int[] tree = new int[N]; int maxHeight = 0; for(int i = 0; i maxHeight) { maxHeight = tree[i]; } } int result = binarySearch(tree,N,M,maxHeight..