Write an efficient function
int first_occurrence(double x, const vector<double>& v);
that returns the position of the first occurrence of in the vector . If does not belong to , return a -1.
The vector is sorted in nondecreasing order.
You only need to submit the required procedure; your main program will be ignored.