Language: C++

#include <bits/stdc++.h>
using namespace std;
#define FAST ios_base::sync_with_stdio(0); cin.tie(); cout.tie();

#define MAXX 500005
#define PI 3.14159265358979323846264338327950
#define F first
#define S second
#define ll  long long int
#define mod  1000000007



int main()
{
	FAST;
	ll n;
	double a, b;
	cin >> n >> a >> b ;
	double mn = a; ll j = 0;
	vector< pair <double , int> > v; 
	for(ll i = 1; i <= n; i ++){
		double f;
		cin >> f;
		double x = a - (f * 0.006);
		x = abs(b - x);
		v.insert({x , i});
	}
	cout << v[0].second;
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:25: error: no matching function for call to 'std::vector<std::pair<double, int> >::insert(<brace-enclosed initializer list>)'
   27 |                 v.insert({x , i});
      |                 ~~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1484:9: note: candidate: 'template<class _InputIterator, class> std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(const_iterator, _InputIterator, _InputIterator) [with <template-parameter-2-2> = _InputIterator; _Tp = std::pair<double, int>; _Alloc = std::allocator<std::pair<double, int> >]'
 1484 |         insert(const_iterator __position, _InputIterator __first,
      |         ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:1484:9: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/vector:72:
/usr/include/c++/14/bits/vector.tcc:133:5: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(const_iterator, const value_type&) [with _Tp = std::pair<double, int>; _Alloc = std::allocator<std::pair<double, int> >; iterator = std::vector<std::pair<double, int> >::iterator; const_iterator = std::vector<std::pair<double, int> >::const_iterator; value_type = std::pair<double, int>]'
  133 |     vector<_Tp, _Alloc>::
      |     ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/vector.tcc:133:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_vector.h:1395:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(const_iterator, value_type&&) [with _Tp = std::pair<double, int>; _Alloc = std::allocator<std::pair<double, int> >; iterator = std::vector<std::pair<double, int> >::iterator; const_iterator = std::vector<std::pair<double, int> >::const_iterator; value_type = std::pair<double, int>]'
 1395 |       insert(const_iterator __position, value_type&& __x)
      |       ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:1395:7: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_vector.h:1413:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(const_iterator, std::initializer_list<_Tp>) [with _Tp = std::pair<double, int>; _Alloc = std::allocator<std::pair<double, int> >; iterator = std::vector<std::pair<double, int> >::iterator; const_iterator = std::vector<std::pair<double, int> >::const_iterator]'
 1413 |       insert(const_iterator __position, initializer_list<value_type> __l)
      |       ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:1413:7: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_vector.h:1439:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(const_iterator, size_type, const value_type&) [with _Tp = std::pair<double, int>; _Alloc = std::allocator<std::pair<double, int> >; iterator = std::vector<std::pair<double, int> >::iterator; const_iterator = std::vector<std::pair<double, int> >::const_iterator; size_type = long unsigned int; value_type = std::pair<double, int>]'
 1439 |       insert(const_iterator __position, size_type __n, const value_type& __x)
      |       ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:1439:7: note:   candidate expects 3 arguments, 1 provided