In the windmill fields of Gusthaven, Vesper the paymaster keeps careful count of the vials. rank apprentices for the new term, every figure matters. Task: The array is sorted in non-decreasing order. Print the 1-based index of the first occurrence of x, or -1 if x is absent. Input format: First line: n and x. Second line: n sorted integers. Output format: Print the 1-based index or -1. Constraints: 1 <= n <= 837; -1000000000 <= a[i],x <= 1000.
Example 1:
Example 2:
Example 3:
Constraints:
1 <= n <= 837; -1000000000 <= a[i],x <= 1000.
