Language: C++

#include <bits/stdc++.h>
#include <cstdio>
#include <vector>
#include <iostream>
#include <utility>

#define fir first
#define sec second
#define get(n) scanf("%d",&n);
#define gets(s) string s;cin >> (s);
#define All(s) (c).begin(), (c).end()
#define chmin(x, y) x = min(x, y);
#define chmax(x, y) x = max(x, y);
#define rep(i, j) for (int (i)=0;(i)<(j);(i)++)
#define dump(x)  cout << #x << " = " << (x) << endl;
#define debug(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
using namespace std;
typedef long long int ll;

int N;
vector<pair<int , int> dist;

int kaizyou(int n) {//nの階乗をを求める
    if(n != 1) {
        int a = n*kaizyou(n-1);
        return a;
    }
    return 1;
}
void dp(int n , int j) {
    int a = 0;
    if(n == 2){
        int i = 2;
        while(i<=N){
            for (int k = i;k<=N;k++){
                long long double  b;
                b = sqrt(pow(dist[i-1].first- dist[k].first, 2) + pow(dist[i-1].second- dist[k].second, 2));
                a += b;
            }
        }
    }
    for (int i = 0;i<N;i++){
        if(i==j) continue;
        long long double  b;
        b = sqrt(pow(dist[i].first- dist[j].first, 2) + pow(dist[i].second- dist[j].second, 2));
        a += dp(n-1, i) + b;
    }
    retunr a;
}

void input() {
    cin >> N ;
    for(int i=0;i<N;i++){
        int a, b;
        cin >> a >> b;
        dist[i].first = a;//x
        dist[i].second = b;//y
    }
}

void solve(){
    input();
    int n = kaizyou(N);
    ll ans = 0;
    ll sum = 0;
    for (int i=1;i<=N;i++) {//選ぶ町
        sum += dp(N, i);
    }
    ans = sum / n;
    cout << ans << endl;
    return ;
}

int main (){
    solve();
    return 0;
}

Compiler output:
a.cc:21:24: error: template argument 1 is invalid
   21 | vector<pair<int , int> dist;
      |                        ^~~~
a.cc:21:24: error: template argument 2 is invalid
a.cc: In function 'void dp(int, int)':
a.cc:36:22: error: 'long long' specified with 'double'
   36 |                 long long double  b;
      |                      ^~~~
a.cc:37:30: error: 'dist' was not declared in this scope
   37 |                 b = sqrt(pow(dist[i-1].first- dist[k].first, 2) + pow(dist[i-1].second- dist[k].second, 2));
      |                              ^~~~
a.cc:44:14: error: 'long long' specified with 'double'
   44 |         long long double  b;
      |              ^~~~
a.cc:45:22: error: 'dist' was not declared in this scope
   45 |         b = sqrt(pow(dist[i].first- dist[j].first, 2) + pow(dist[i].second- dist[j].second, 2));
      |                      ^~~~
a.cc:46:25: error: invalid operands of types 'void' and 'double' to binary 'operator+'
   46 |         a += dp(n-1, i) + b;
      |              ~~~~~~~~~~ ^ ~
      |                |          |
      |                void       double
a.cc:48:5: error: 'retunr' was not declared in this scope
   48 |     retunr a;
      |     ^~~~~~
a.cc: In function 'void input()':
a.cc:56:9: error: 'dist' was not declared in this scope
   56 |         dist[i].first = a;//x
      |         ^~~~
a.cc: In function 'void solve()':
a.cc:67:18: error: void value not ignored as it ought to be
   67 |         sum += dp(N, i);
      |                ~~^~~~~~