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