Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main() {
  int N, T, A, x;
  cin >> N >> T >> A;
  vector<double> diff(N);
  rep(i, N) {
    int H;
    cin >> H;
    diff[i] = abs(T-H*0.006-A);
  }

  int res = min_element((diff.begin(), diff.end()) - diff.begin()+1);
  cout << res << endl;

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:36: warning: ignoring return value of 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::begin() [with _Tp = double; _Alloc = std::allocator<double>; iterator = std::vector<double>::iterator]', declared with attribute 'nodiscard' [-Wunused-result]
   15 |   int res = min_element((diff.begin(), diff.end()) - diff.begin()+1);
      |                          ~~~~~~~~~~^~
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:873:7: note: declared here
  873 |       begin() _GLIBCXX_NOEXCEPT
      |       ^~~~~
a.cc:15:24: error: no matching function for call to 'min_element(__gnu_cxx::__normal_iterator<double*, std::vector<double> >::difference_type)'
   15 |   int res = min_element((diff.begin(), diff.end()) - diff.begin()+1);
      |             ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_algo.h:5577:12: note: candidate: 'template<class _FIter> constexpr _FIter std::min_element(_FIter, _FIter)'
 5577 |     inline min_element(_ForwardIterator __first, _ForwardIterator __last)
      |            ^~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:5577:12: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algo.h:5602:5: note: candidate: 'template<class _FIter, class _Compare> constexpr _FIter std::min_element(_FIter, _FIter, _Compare)'
 5602 |     min_element(_ForwardIterator __first, _ForwardIterator __last,
      |     ^~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:5602:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:516:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> std::min_element(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Compare)'
  516 | min_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Compare __comp);
      | ^~~~~~~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:516:1: note:   candidate expects 4 arguments, 1 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:520:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> std::min_element(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator)'
  520 | min_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last);
      | ^~~~~~~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:520:1: note:   candidate expects 3 arguments, 1 provided