Write an efficient function
bool resistant_search(double x, const vector<double>& v);
that tells if @x@ belongs to the vector @v@ or not.
The vector @v@ is “almost sorted” in nondecreasing order, in the sense that there may be at most a pair of indices and such that and @V@[] @V@[].
You only need to submit the required procedure; your main program will be ignored.