Language: C++

//
#include <vector>
#include <set>
#include <map>
#include <array>
#include <iostream>
#include <cstdio>
#include <cstdint>
#include <algorithm>
#include <numeric>
#include <bitset>
#include <iomanip>
//
using ll = long long;
using namespace std;
#define rep(i,n) for(ll i=0;i<(n);++i)
#define outD(fpv) cout << setprecision(20) << fpv << endl;
inline void yes(bool cond) { cond ? puts("YES") : puts("NO"); }
template<typename Type> inline void chmin(Type& a, Type b) { if (a > b) a = b; }
template<typename Type> inline void chmax(Type& a, Type b) { if (a < b) a = b; }
template<typename Arr, typename Type> inline void fill(Arr& arr, Type v) { std::fill(arr.begin(), arr.end(), v); }
template<typename Type> inline void sort(Type& arr) { std::sort(arr.begin(), arr.end()); }
template<typename Type> inline Type nth(vector<Type>& arr, size_t pos) { std::nth_element(arr.begin(), arr.begin() + pos, arr.end()); return arr[pos]; }
template<typename Type> inline void unique(Type& arr) { sort(arr); arr.erase(unique(arr.begin(), arr.end()), arr.end()); }
constexpr ll BIGP = 1000000007L;
constexpr ll INF_I = std::numeric_limits<ll>::max();
constexpr double INF_F = std::numeric_limits<float>::infinity();
constexpr double PI = 3.14159265358979323846L;
//
int main()
{
    cin.tie(0); ios::sync_with_stdio(false);
    ll N;
    cin >> N;
    vector<ll> x(N);
    vector<ll> y(N);
    rep(i, N) cin >> x[i] >> y[i];
    //
    double total = 0.0;
    rep(i, N)
    {
        rep(j, N)
        {
            if (i == j)
            {
                continue;
            }
            ll dx = x[i] - x[j];
            ll dy = y[i] - y[j];
            ll dsqr = dx* dx + dy * dy;
            total += sqrt(dsqr);
        }
    }
    total /= double(N);
    outD(total);

    //
    return 0;
}

Compiler output:
a.cc:26:27: error: 'numeric_limits' is not a member of 'std'
   26 | constexpr ll INF_I = std::numeric_limits<ll>::max();
      |                           ^~~~~~~~~~~~~~
a.cc:26:44: error: expected primary-expression before '>' token
   26 | constexpr ll INF_I = std::numeric_limits<ll>::max();
      |                                            ^
a.cc:26:50: error: no matching function for call to 'max()'
   26 | constexpr ll INF_I = std::numeric_limits<ll>::max();
      |                                             ~~~~~^~
In file included from /usr/include/c++/14/vector:62,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 0 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 0 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:9:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   candidate expects 2 arguments, 0 provided
a.cc:27:31: error: 'numeric_limits' is not a member of 'std'
   27 | constexpr double INF_F = std::numeric_limits<float>::infinity();
      |                               ^~~~~~~~~~~~~~
a.cc:27:46: error: expected primary-expression before 'float'
   27 | constexpr double INF_F = std::numeric_limits<float>::infinity();
      |                                              ^~~~~
a.cc: In function 'int main()':
a.cc:51:22: error: 'sqrt' was not declared in this scope; did you mean 'sort'?
   51 |             total += sqrt(dsqr);
      |                      ^~~~
      |                      sort