criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include <iostream>
#include <vector>
#include <iomanip>
// #include <bits/stdc++.h>
using namespace std;

double distance_between_two_coordinates(pair<double,double> A, pair<double,double> B) {
  double forX = (A.first-B.first);
  double forY = (A.second-B.second);
  return sqrt((forX * forX) + (forY * forY));
}

int main(){
  int N;
  cin >> N;

  vector<pair<double,double>> coordinates;

  for (int i = 0; i < N; i++){
    double x,y; cin >> x >> y;

    coordinates.push_back({x,y});
  }

  sort(coordinates.begin(), coordinates.end());

  double ways = 0;
  double total_sum = 0;
  do {
    for (int i = 1; i < coordinates.size(); i++) {
      total_sum+= distance_between_two_coordinates(coordinates[i-1], coordinates[i]);
    }

    ways+=1;
  } while(next_permutation(coordinates.begin(), coordinates.end()));

  // cout << ways << endl;
  // cout << fixed << endl;
  cout.precision(17);
  double answer = total_sum / ways;
  cout <<  fixed << answer << endl;
  return 0;
}


Compiler output:
a.cc: In function 'double distance_between_two_coordinates(std::pair<double, double>, std::pair<double, double>)':
a.cc:10:10: error: 'sqrt' was not declared in this scope
   10 |   return sqrt((forX * forX) + (forY * forY));
      |          ^~~~
a.cc: In function 'int main()':
a.cc:25:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   25 |   sort(coordinates.begin(), coordinates.end());
      |   ^~~~
      |   short
a.cc:35:11: error: 'next_permutation' was not declared in this scope
   35 |   } while(next_permutation(coordinates.begin(), coordinates.end()));
      |           ^~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <iomanip>

using namespace std;

double distance_between_two_coordinates(pair<double,double> A, pair<double,double> B) {
  double forX = (A.first-B.first);
  double forY = (A.second-B.second);
  return sqrt((forX * forX) + (forY * forY));
}

int main(){
  int N;
  cin >> N;

  vector<pair<double,double>> coordinates;

  for (int i = 0; i < N; i++){
    double x,y; cin >> x >> y;

    coordinates.push_back({x,y});
  }

  sort(coordinates.begin(), coordinates.end());

  double ways = 0;
  double total_sum = 0;
  do {
    for (int i = 1; i < coordinates.size(); i++) {
      total_sum+= distance_between_two_coordinates(coordinates[i-1], coordinates[i]);
    }

    ways++;
  } while(next_permutation(coordinates.begin(), coordinates.end()));

  // cout << ways << endl;
  cout << fixed << endl;
  cout << total_sum / ways << setprecision(16) << endl;
  return 0;
}


Compiler output:
a.cc: In function 'double distance_between_two_coordinates(std::pair<double, double>, std::pair<double, double>)':
a.cc:10:10: error: 'sqrt' was not declared in this scope
   10 |   return sqrt((forX * forX) + (forY * forY));
      |          ^~~~
a.cc: In function 'int main()':
a.cc:25:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   25 |   sort(coordinates.begin(), coordinates.end());
      |   ^~~~
      |   short
a.cc:35:11: error: 'next_permutation' was not declared in this scope
   35 |   } while(next_permutation(coordinates.begin(), coordinates.end()));
      |           ^~~~~~~~~~~~~~~~
Language: C++

v#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ll long long
int main(){
  int n;
  cin >> n;
  vector<pair<int,int>> a(n); 
  rep(i,n){
    int b,c;
    cin >> b >> c;
    a.at(i)=make_pair(b,c);
  }
  double ans=1,sum=0;
  sort(a.begin(),a.end());
  do{
    for(int i=0;i<n-1;i++){
      double q=a.at(i).first,r=a.at(i).second;
      double b=a.at(i+1).first,c=a.at(i+1).second;
      sum+=sqrt((q-b)*(q-b)+(r-c)*(r-c));
    }
  }while (next_permutation(a.begin(),a.end()));
  for(int i=1;i<=n;i++){
    ans*=i;
  }
  printf("%.10lf",sum/ans);
}

Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | v#include <bits/stdc++.h>
      |  ^
a.cc:1:1: error: 'v' does not name a type
    1 | v#include <bits/stdc++.h>
      | ^
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> n;
      |   ^~~
a.cc:8:3: error: 'vector' was not declared in this scope
    8 |   vector<pair<int,int>> a(n);
      |   ^~~~~~
a.cc:8:10: error: 'pair' was not declared in this scope
    8 |   vector<pair<int,int>> a(n);
      |          ^~~~
a.cc:8:15: error: expected primary-expression before 'int'
    8 |   vector<pair<int,int>> a(n);
      |               ^~~
a.cc:12:5: error: 'a' was not declared in this scope
   12 |     a.at(i)=make_pair(b,c);
      |     ^
a.cc:12:13: error: 'make_pair' was not declared in this scope
   12 |     a.at(i)=make_pair(b,c);
      |             ^~~~~~~~~
a.cc:15:8: error: 'a' was not declared in this scope
   15 |   sort(a.begin(),a.end());
      |        ^
a.cc:15:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   15 |   sort(a.begin(),a.end());
      |   ^~~~
      |   short
a.cc:20:30: error: 'r' was not declared in this scope
   20 |       sum+=sqrt((q-b)*(q-b)+(r-c)*(r-c));
      |                              ^
a.cc:20:32: error: 'c' was not declared in this scope
   20 |       sum+=sqrt((q-b)*(q-b)+(r-c)*(r-c));
      |                                ^
a.cc:20:12: error: 'sqrt' was not declared in this scope
   20 |       sum+=sqrt((q-b)*(q-b)+(r-c)*(r-c));
      |            ^~~~
a.cc:22:11: error: 'next_permutation' was not declared in this scope
   22 |   }while (next_permutation(a.begin(),a.end()));
      |           ^~~~~~~~~~~~~~~~
a.cc:26:3: error: 'printf' was not declared in this scope
   26 |   printf("%.10lf",sum/ans);
      |   ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | v#include <bits/stdc++.h>
Language: C++

#include <iostream>
#include <vector>
#include <math.h>
#include <stdio.h>

int main() {
  int n; std::cin >> n;
  std::vector<int> x(n);
  std::vector<int> y(n);
  for (int i = 0; i < n; ++i) std::cin >> x[i] >> y[i];
  double sum = 0;
  for (int i = 0; i < n; ++i) {
    for (int j = i+1; j < n; ++j) {
      int dx = x[i]-x[j];
      int dy = y[i]-y[j];
      sum += sqrt((double)dx*dx + (double)dy*dy));
    }
  }
  double ans = sum * 2 / (double)n;
  printf("%.10lf\n", ans);
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:49: error: expected ';' before ')' token
   16 |       sum += sqrt((double)dx*dx + (double)dy*dy));
      |                                                 ^
      |                                                 ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
int main() {
  ll a;
  cin>>a;
  vector<vector<ll>>vec(a,vector<ll>(2));
  for(ll i=0;i<a;i++){
    cin>>vec.at(i).at(0)>>vec.at(i).at(1);
  }
  double b=0;
  for(ll i=1;i<a;i++){
    for(ll j=0;j<i;j++){
      double c=(vec.at(i).at(0)-vec.at(j).at(0))*(vec.at(i).at(0)-vec.at(j).at(0))+(vec.at(i).at(1)-vec.at(j).at(1))*(vec.at(i).at(1)-vec.at(j).at(1));
      b+=sqrt(c);
    }
  }
  cout<<d*a/2;
  
  
      
                        
                        
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:9: error: 'd' was not declared in this scope
   18 |   cout<<d*a/2;
      |         ^
Language: C++

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

int main() {
  int n;
  cin >> n;
  double s = 0;
  vector<int> x(n), y(n);
  rep(i, 0, n) cin >> x[i] >> y[i];
  rep(i, 0, n) {
    rep(j, i+1, n) {
      s += sqrt((x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j]));
    }
  }
  int k = 1;
  rep(i, 2, n) k*=i;
  cout << fixed << setprecesion(8) << s*(n-1)*k << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:20: error: 'setprecesion' was not declared in this scope
   18 |   cout << fixed << setprecesion(8) << s*(n-1)*k << endl;
      |                    ^~~~~~~~~~~~
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		int[] x = new int[n];
      	int[] y = new int[n];
		for(int i=0; i<a.length; i++){
			x[i] = scn.nextInt();
          	y[i] = scn.nextInt();
		}
      	double nnn = 1;
      	for(int i=1; i<=n; i++){
          nnn*=i;
        }
      	double way=0;
      	for(int i=1; i<n; i++){
          way+=i;
        }
      	double count = nnn*(n-1)/way;
    	double ave = 0;
		for(int i=0; i<n; i++){
      		for(int j=i+1; j<n; j++){
         		ave+=(Math.sqrt(Math.pow(Math.abs(x[i]-x[j]),2)+Math.pow(Math.abs(y[i]-y[j]),2)))/nnn;
     		 }
    	}
    	ave*=count;
    	System.out.println(ave);
      	
	}
}

Compiler output:
Main.java:9: error: cannot find symbol
		for(int i=0; i<a.length; i++){
		               ^
  symbol:   variable a
  location: class Main
1 error
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int n,x[10],y[10];
int main()
{
	cin >> n;
	double k=1;
	for(int i=1; i<=n; i++) cin >> x[i] >> y[i],k*=i;
	double ans=0;
	for(int i=1; i<=n; i++)
		for(int j=1; j<=n; j++)
			ans+=(sqrt((x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j])));
	printf("%.10lf",ans*(n-1)/k);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:31: error: 'sqrt' was not declared in this scope
   13 |                         ans+=(sqrt((x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j])));
      |                               ^~~~
Language: C++

from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import product, combinations,permutations
from copy import deepcopy
import sys
from math import sqrt
sys.setrecursionlimit(4100000)



if __name__ == '__main__':
    N = int(input())
    xy = []
    for _ in range(N):
        x, y = map(int, input().split())
        xy.append([x, y])
    
    visit_perm = list(range(N))
    sum_dist = 0
    cnt = 0
    for v in permutations(visit_perm):
        cnt += 1
        prev = -1
        for i, p in enumerate(v):
            if i==0:
                prev = [xy[p][0], xy[p][1]]
            else:
                sum_dist += sqrt((xy[p][0]-prev[0])**2+(xy[p][1]-prev[1])**2)
    print(sum_dist/cnt)

Compiler output:
a.cc:13:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   13 | if __name__ == '__main__':
      |                ^~~~~~~~~~
a.cc:1:1: error: 'from' does not name a type
    1 | from fractions import gcd
      | ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
// define
#define int long long
#define UNIQUE(v) v.erase(unique(all(v)), v.end());
#define ZIP(v) sort(all(v)),UNIQUE(v)
#define ADD(a, b) a = (a + b) % mod
#define SUB(a, b) a = (a+mod-b)%mod
#define MUL(a, b) a = (((a)%mod) * ((b)%mod)) % mod
#define rollcall cout << "I'm Sucu." << endl;
#define repi(i,m,n) for(int i = m;i < n;i++)
#define drep(i,n,m) for(int i = n;i >= m;i--)
#define rep(i,n) repi(i,0,n)
#define rrep(i,n) repi(i,1,n+1)
#define chmin(x,y) x = min(x,y)
#define chmax(x,y) x = max(x,y)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(), v.rend()
#define dmp(x,y) make_pair(x,y)
#define pb(x) push_back(x)
#define pf(x) push_front(x)
#define fi first
#define se second
// typedef
typedef complex<double> Point;
typedef pair<int, int> P;
typedef pair<int, P> PP;
typedef pair<P, int> Pi;
typedef vector<int> vi;
typedef deque<int> dq;
const int inf = 1e9+7;
const int INF = 1e18+7;
const int mod = 1e9+7;
// int sum = accumulate(a, a+n, 0LL);
// int mx = max_element(a, a+n);
// int mn = min_element(a, a+n);
// int cnt = count(a, a+n, k);

int N;
int x[10],y[10];

double distance(int i,int j)
{
    double dx = x[i]-x[j];
    double dy = y[i]-y[j];

    return pow(dx*dx+dy*dy,0.5);
}


void cal()
{
    double sum = 0.0;
    vi V(N);
    rep(i,N) V[i]=i+1;
    
    do
    {
        rep(i,N-1) sum += distance(V[i], V[i+1]);
    } while(next_permutation(V.begin(), V.end()));

    int Factorial = 1;
    for(int i = 2; i <= N; i++) Factorial *= i;
    cout << fixed << setprecision(10) << sum / Factorial << endl;
    return;

}

int main()
{
    cin >> N;
    rep(i,N)cin >> x[i] >> y[i];

    cal();

    return 0;
}


Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

#include <stdio.h>		// standard input output
#include <iostream>		// input output stream, cin cout( console in console out)
#include <cmath>		// circle math ( sin, con, sinh
#include <string>
#include <vector>
#include <algorithm>
#include <iomanip>		// input output manipulation

using namespace std;
#define rep(i, n) for(int i = 0; i < (int)n; i++)
#define rep3(i, a, n) for(int i = (int)(a); i < (int)(n); i++)
#define ll long long

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }






int main() {
  int N; // 変数の宣言
  cin >> N; // 標準入力
  int x[N],y[N];
  rep(i,N)
    cin >> x[N];
  rep(i,N)
    cin >> y[N];
  vector<int> N;
  rep(i,N)
    v.push_back(i);

  double ans;
  int count=0;
  while(1){
    for(int i;i<N-1;i++){
      ans += sqrt((x[i+1]*x[i+1]-x[i]*x[i]) +(y[i+1]*y[i+1]-y[i]*y[i]));
    }
    count++;
    
    if(!next_permutation(v.begin(),v.end())){
      break;
    }
  }
 


  cout << setprecision(12) << N << endl; // 標準出力
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:15: error: conflicting declaration 'std::vector<int> N'
   30 |   vector<int> N;
      |               ^
a.cc:23:7: note: previous declaration as 'int N'
   23 |   int N; // 変数の宣言
      |       ^
a.cc:32:5: error: 'v' was not declared in this scope
   32 |     v.push_back(i);
      |     ^
a.cc:42:26: error: 'v' was not declared in this scope
   42 |     if(!next_permutation(v.begin(),v.end())){
      |                          ^
Language: C++

#include <stdio.h>		// standard input output
#include <iostream>		// input output stream, cin cout( console in console out)
#include <cmath>		// circle math ( sin, con, sinh
#include <string>
#include <vector>
#include <algorithm>
#include <iomanip>		// input output manipulation

using namespace std;
#define rep(i, n) for(int i = 0; i < (int)n; i++)
#define rep3(i, a, n) for(int i = (int)(a); i < (int)(n); i++)
#define ll long long

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }






int main() {
  int N; // 変数の宣言
  cin >> N; // 標準入力
  int x[N],y[N];
  rep(i,N)
    cin >> x[N];
  rep(i,N)
    cin >> y[N];
  int v[N];
  rep(i,N)
    v.push_back(i);

  double ans;
  int count=0;
  while(1){
    for(int i;i<N-1;i++){
      ans += sqrt((x[i+1]*x[i+1]-x[i]*x[i]) +(y[i+1]*y[i+1]-y[i]*y[i]));
    }
    count++;
    
    if(!next_permutation(v.begin(),v.end())){
      break;
    }
  }
 


  cout << setprecision(12) << N << endl; // 標準出力
}


Compiler output:
a.cc: In function 'int main()':
a.cc:32:7: error: request for member 'push_back' in 'v', which is of non-class type 'int [N]'
   32 |     v.push_back(i);
      |       ^~~~~~~~~
a.cc:42:28: error: request for member 'begin' in 'v', which is of non-class type 'int [N]'
   42 |     if(!next_permutation(v.begin(),v.end())){
      |                            ^~~~~
a.cc:42:38: error: request for member 'end' in 'v', which is of non-class type 'int [N]'
   42 |     if(!next_permutation(v.begin(),v.end())){
      |                                      ^~~
Language: C++

#include <stdio.h>		// standard input output
#include <iostream>		// input output stream, cin cout( console in console out)
#include <cmath>		// circle math ( sin, con, sinh
#include <string>
#include <vector>
#include <algorithm>
#include <iomanip>		// input output manipulation

using namespace std;
#define rep(i, n) for(int i = 0; i < (int)n; i++)
#define rep3(i, a, n) for(int i = (int)(a); i < (int)(n); i++)
#define ll long long

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }






int main() {
  int N; // 変数の宣言
  cin >> N; // 標準入力
  int x[N],y[N];
  rep(i,N)
    cin >> x[N];
  rep(i,N)
    cin >> y[N];
  int v[N];
  rep(i,N)
    v.pushback(i);

  double ans;
  int count=0;
  while(1){
    for(int i;i<N-1;i++){
      ans += sqrt((x[i+1]*x[i+1]-x[i]*x[i]) +(y[i+1]*y[i+1]-y[i]*y[i]));
    }
    count++;
    
    if(!next_permutation(v.begin(),v.end())){
      break;
    }
  }
 


  cout << setprecision(12) << N << endl; // 標準出力
}


Compiler output:
a.cc: In function 'int main()':
a.cc:32:7: error: request for member 'pushback' in 'v', which is of non-class type 'int [N]'
   32 |     v.pushback(i);
      |       ^~~~~~~~
a.cc:42:28: error: request for member 'begin' in 'v', which is of non-class type 'int [N]'
   42 |     if(!next_permutation(v.begin(),v.end())){
      |                            ^~~~~
a.cc:42:38: error: request for member 'end' in 'v', which is of non-class type 'int [N]'
   42 |     if(!next_permutation(v.begin(),v.end())){
      |                                      ^~~
Language: C++

#include <stdio.h>		// standard input output
#include <iostream>		// input output stream, cin cout( console in console out)
#include <cmath>		// circle math ( sin, con, sinh
#include <string>
#include <vector>
#include <algorithm>
#include <iomanip>		// input output manipulation

using namespace std;
#define rep(i, n) for(int i = 0; i < (int)n; i++)
#define rep3(i, a, n) for(int i = (int)(a); i < (int)(n); i++)
#define ll long long

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }






int main() {
  int N; // 変数の宣言
  cin >> N; // 標準入力
  int x[N],y[N];
  rep(i,N)
    cin >> x[N];
  rep(i,N)
    cin >> y[N];
  int v[N];
  rep(i,N)
    v.pushback(i);

  double ans;
  int count=0;
  while(1){
    for(int i;i<N-1;i++){
      ans += sqrt((x[i+1]*x[i+1]-x[i]*x[i]) +(y[i+1]*y[i+1]-y[i]*y[i]));
    }
    count++;
    
    if(!next_permutation(y.begin(),y.end())){
      break;
    }
  }
 


  cout << setprecision(12) << N << endl; // 標準出力
}


Compiler output:
a.cc: In function 'int main()':
a.cc:32:7: error: request for member 'pushback' in 'v', which is of non-class type 'int [N]'
   32 |     v.pushback(i);
      |       ^~~~~~~~
a.cc:42:28: error: request for member 'begin' in 'y', which is of non-class type 'int [N]'
   42 |     if(!next_permutation(y.begin(),y.end())){
      |                            ^~~~~
a.cc:42:38: error: request for member 'end' in 'y', which is of non-class type 'int [N]'
   42 |     if(!next_permutation(y.begin(),y.end())){
      |                                      ^~~
Language: C++

#include<bits/stdc++.h>
#define PB push_back
#define FO(i,a,b) for (int i = a; i <= b; i++)
#define FOb(i,a,b) for(int i=b;i>=a;i--)
#define vi vector<int>
#define vulli vector<unsigned long long int>
using namespace std;
typedef unsigned long long int ulli;
int fact(int n){
    int f = 1;
    FO(i,2,n)
        f *= i;
    return f;
}
float dist(int i,int j,vi x ,vi y){
    float distance = ( (x[i] - x[j]) * (x[i] - x[j]) ) + ( (y[i] - y[j]) * (y[i] - y[j]) );
    return sqrt(distance);
}
void solve()
{   
    int n,k;
    float num = 0;
    cin >> n;
    k = n;
    vector<int> x(n+1),y(n+1);
    x[0] = y[0] = 0;
    for(int i=1;i<=n;i++){
        cin >> x[i] >> y[i];
    }
    for(int i=1;i<=n;i++)
        for(int j=i+1;j<=n;j++)
            num += dist(i,j,x,y) * 2;
    cout << num /n ;
}                                             
int main()
{
    std::ios_base::sync_with_stdio(false);
    ulli t=1;
   // cin>>t;   
    while(t--){ solve(); cout<<"\n"; }
    return 0;
}
#include<bits/stdc++.h>
#define PB push_back
#define FO(i,a,b) for (int i = a; i <= b; i++)
#define FOb(i,a,b) for(int i=b;i>=a;i--)
#define vi vector<int>
#define vulli vector<unsigned long long int>
using namespace std;
typedef unsigned long long int ulli;
int fact(int n){
    int f = 1;
    FO(i,2,n)
        f *= i;
    return f;
}
double dist(int i,int j,vi x ,vi y){
    double distance = ( (x[i] - x[j]) * (x[i] - x[j]) ) + ( (y[i] - y[j]) * (y[i] - y[j]) );
    return sqrt(distance);
}
void solve()
{   
    int n,k;
    double num = 0;
    cin >> n;
    k = n;
    vector<int> x(n+1),y(n+1);
    x[0] = y[0] = 0;
    for(int i=1;i<=n;i++){
        cin >> x[i] >> y[i];
    }
    for(int i=1;i<=n;i++)
        for(int j=i+1;j<=n;j++)
            num += dist(i,j,x,y) * 2;
    cout << num /n ;
}                                             
int main()
{
    std::ios_base::sync_with_stdio(false);
    ulli t=1;
   // cin>>t;   
    while(t--){ solve(); cout<<"\n"; }
    return 0;
}


Compiler output:
a.cc:51:5: error: redefinition of 'int fact(int)'
   51 | int fact(int n){
      |     ^~~~
a.cc:9:5: note: 'int fact(int)' previously defined here
    9 | int fact(int n){
      |     ^~~~
a.cc:57:8: error: ambiguating new declaration of 'double dist(int, int, std::vector<int>, std::vector<int>)'
   57 | double dist(int i,int j,vi x ,vi y){
      |        ^~~~
a.cc:15:7: note: old declaration 'float dist(int, int, std::vector<int>, std::vector<int>)'
   15 | float dist(int i,int j,vi x ,vi y){
      |       ^~~~
a.cc:61:6: error: redefinition of 'void solve()'
   61 | void solve()
      |      ^~~~~
a.cc:19:6: note: 'void solve()' previously defined here
   19 | void solve()
      |      ^~~~~
a.cc:77:5: error: redefinition of 'int main()'
   77 | int main()
      |     ^~~~
a.cc:35:5: note: 'int main()' previously defined here
   35 | int main()
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
#define PB push_back
#define FO(i,a,b) for (int i = a; i <= b; i++)
#define FOb(i,a,b) for(int i=b;i>=a;i--)
#define vi vector<int>
#define vulli vector<unsigned long long int>
using namespace std;
typedef unsigned long long int ulli;
int fact(int n){
    int f = 1;
    FO(i,2,n)
        f *= i;
    return f;
}
float dist(int i,int j,vi x ,vi y){
    float distance = ( (x[i] - x[j]) * (x[i] - x[j]) ) + ( (y[i] - y[j]) * (y[i] - y[j]) );
    return sqrt(distance);
}
void solve()
{   
    int n,k;
    float num = 0;
    cin >> n;
    k = n;
    vector<int> x(n+1),y(n+1);
    x[0] = y[0] = 0;
    for(int i=1;i<=n;i++){
        cin >> x[i] >> y[i];
    }
    for(int i=1;i<=n;i++)
        for(int j=i+1;j<=n;j++)
            num += dist(i,j,x,y) * 2;
    cout << num /n ;
}                                             
int main()
{
    std::ios_base::sync_with_stdio(false);
    ulli t=1;
   // cin>>t;   
    while(t--){ solve(); cout<<"\n"; }
    return 0;
}
#include<bits/stdc++.h>
#define PB push_back
#define FO(i,a,b) for (int i = a; i <= b; i++)
#define FOb(i,a,b) for(int i=b;i>=a;i--)
#define vi vector<int>
#define vulli vector<unsigned long long int>
using namespace std;
typedef unsigned long long int ulli;
int fact(int n){
    int f = 1;
    FO(i,2,n)
        f *= i;
    return f;
}
float dist(int i,int j,vi x ,vi y){
    float distance = ( (x[i] - x[j]) * (x[i] - x[j]) ) + ( (y[i] - y[j]) * (y[i] - y[j]) );
    return sqrt(distance);
}
void solve()
{   
    int n,k;
    float num = 0;
    cin >> n;
    k = n;
    vector<int> x(n+1),y(n+1);
    x[0] = y[0] = 0;
    for(int i=1;i<=n;i++){
        cin >> x[i] >> y[i];
    }
    for(int i=1;i<=n;i++)
        for(int j=i+1;j<=n;j++)
            num += dist(i,j,x,y) * 2;
    cout << num /n ;
}                                             
int main()
{
    std::ios_base::sync_with_stdio(false);
    ulli t=1;
   // cin>>t;   
    while(t--){ solve(); cout<<"\n"; }
    return 0;
}


Compiler output:
a.cc:51:5: error: redefinition of 'int fact(int)'
   51 | int fact(int n){
      |     ^~~~
a.cc:9:5: note: 'int fact(int)' previously defined here
    9 | int fact(int n){
      |     ^~~~
a.cc:57:7: error: redefinition of 'float dist(int, int, std::vector<int>, std::vector<int>)'
   57 | float dist(int i,int j,vi x ,vi y){
      |       ^~~~
a.cc:15:7: note: 'float dist(int, int, std::vector<int>, std::vector<int>)' previously defined here
   15 | float dist(int i,int j,vi x ,vi y){
      |       ^~~~
a.cc:61:6: error: redefinition of 'void solve()'
   61 | void solve()
      |      ^~~~~
a.cc:19:6: note: 'void solve()' previously defined here
   19 | void solve()
      |      ^~~~~
a.cc:77:5: error: redefinition of 'int main()'
   77 | int main()
      |     ^~~~
a.cc:35:5: note: 'int main()' previously defined here
   35 | int main()
      |     ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <cstdlib>
#include <cmath>
#include <string>
#include <algorithm>
#include <bitset>
#include <iomanip>

using namespace std;

    int main(){
        int N;
        cin >> N;

        vector<double> X(N);
        vector<double> Y(N);

        for(int i=0; i<N; i++){
            int x, y;
            cin >> x >> y;
            X[i] = x;
            Y[i] = y;
        }

        vector<int> nums(N);
        iota(nums.begin(), nums.end(), 0);

        double dist = 0;
        int cnt = 0;
        do{
            for(int i=1; i<N; i++){
                int a = nums.at(i);
                int b = nums.at(i-1);
                dist += sqrt( pow( (X[a]-X[b] ), 2.0 ) + pow( (Y[a]-Y[b]), 2.0 ) );
            }
            cnt++;
        }while(next_permutation(nums.begin(), nums.end()));

        cout << std::setprecision(10) << dist/(double)cnt << endl;

        return (0);

    }

Compiler output:
a.cc: In function 'int main()':
a.cc:27:9: error: 'iota' was not declared in this scope
   27 |         iota(nums.begin(), nums.end(), 0);
      |         ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

using p = pair<int,int>;

int main(){
    int n;
    cin >> n;

    vector<p> vec(n);
    for(int i = 0; i < n; i++){
        cin >> vec[i].first >> vec[i].second;
    }

    double sum = 0.0;
    do{
        for(int i = 0; i < n - 1; i++){
            double dx = pow(vec[i].first - vec[i + 1].first, 2);
            double dy = pow(vec[i].second - vec[i + 1].second, 2);
            sum += pow(dx + dy, 0.5);
        }
    }while(next_permutation(vec.begin(), vec.end()));
   
    int Factorial = 1;
    for(int i = 2; i <= N; i++) Factorial *= i;

    cout << fixed << setprecision(10) << sum / Factorial << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:25: error: 'N' was not declared in this scope
   25 |     for(int i = 2; i <= N; i++) Factorial *= i;
      |                         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

using p = pair<int,int>;

int main(){
    int n;
    cin >> n;

    vector<p> vec;
    for(int i = 0; i < n; i++){
        cin >> vec[i].first >> vec[i].second;
    }

    int cnt = 0;
    double sum = 0.0;
    do{
        for(int i = 0; i < n - 1; i++){
            double dx = pow(vec[i].first - vec[i + 1].first, 2);
            double dy = pow(vec[i].second - vec[i+ 1].second, 2);
            sum += pow(dx + dy, 0.5);
        }
    }while(next_permitation(vec.begin(), vec.end()));
   
    double ans = sum / cnt;

    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:12: error: 'next_permitation' was not declared in this scope
   23 |     }while(next_permitation(vec.begin(), vec.end()));
      |            ^~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int N;
int x[10], y[10];
 
double dist(int i, int j) {
    double dx = x[i] - x[j];
    double dy = y[i] - y[j];
    return pow(dx * dx + dy * dy, 0.5);
}
 
void solve() {
    cin >> N;
    for(int i = 1; i <= N; i++) cin >> x[i] >> y[i];
    double sum = 0.0;
    vector<int> v(N);
    for(int i = 0; i < N; i++) v[i] = i + 1;
    do {
        for(int i = 0; i < N - 1; i++) sum += dist(v[i], v[i+1]);
    } while(next_permutation(v.begin(), v.end()));
    int Factorial = 1;
    for(int i = 2; i <= N; i++) Factorial *= i;
    cout << fixed << setprecision(10) << sum / Factorial << endl;
    return;
}
 
int main() {
    solve();
    return 0;
}
#include <bits/stdc++.h>
using namespace std;

int N;
int x[10], y[10];

double dist(int i, int j) {
    double dx = x[i] - x[j];
    double dy = y[i] - y[j];
    return pow(dx * dx + dy * dy, 0.5);
}

void solve() {
    cin >> N;
    for(int i = 1; i <= N; i++) cin >> x[i] >> y[i];
    double sum = 0.0;
    vector<int> v(N);
    for(int i = 0; i < N; i++) v[i] = i + 1;
    do {
        for(int i = 0; i < N - 1; i++) sum += dist(v[i], v[i+1]);
    } while(next_permutation(v.begin(), v.end()));
    int Factorial = 1;
    for(int i = 2; i <= N; i++) Factorial *= i;
    cout << fixed << setprecision(10) << sum / Factorial << endl;
    return;
}

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

Compiler output:
a.cc:35:5: error: redefinition of 'int N'
   35 | int N;
      |     ^
a.cc:4:5: note: 'int N' previously declared here
    4 | int N;
      |     ^
a.cc:36:5: error: redefinition of 'int x [10]'
   36 | int x[10], y[10];
      |     ^
a.cc:5:5: note: 'int x [10]' previously declared here
    5 | int x[10], y[10];
      |     ^
a.cc:36:12: error: redefinition of 'int y [10]'
   36 | int x[10], y[10];
      |            ^
a.cc:5:12: note: 'int y [10]' previously declared here
    5 | int x[10], y[10];
      |            ^
a.cc:38:8: error: redefinition of 'double dist(int, int)'
   38 | double dist(int i, int j) {
      |        ^~~~
a.cc:7:8: note: 'double dist(int, int)' previously defined here
    7 | double dist(int i, int j) {
      |        ^~~~
a.cc:44:6: error: redefinition of 'void solve()'
   44 | void solve() {
      |      ^~~~~
a.cc:13:6: note: 'void solve()' previously defined here
   13 | void solve() {
      |      ^~~~~
a.cc:59:5: error: redefinition of 'int main()'
   59 | int main() {
      |     ^~~~
a.cc:28:5: note: 'int main()' previously defined here
   28 | int main() {
      |     ^~~~
Language: C++

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

int n;
vector<int> x(10),y(10);
 
double dist(int i, int j) {
  double dx = x[i] - x[j];
    double dy = y[i] - y[j];
    return pow(dx * dx + dy * dy, 0.5);
  }
  
 void solve() {

 cin >> n;
 
 rep(i,n) {
  cin >> x.at(i) >> y.at(i);
  }
  
  
  vector<int> k(n);
  rep(i, n) {
  k.at(i) = i + 1; 
   }
   
  double sum = 0.0;
  do {
  for(int i = 0; i < n - 1; i++){
  sum += dist(k.at(i), k.at(i + 1));
  }
  } while (next_permutation(k.begin(),k.end()));
  
  int factorial = 1;
  for(int i = 2; i <= n; i++) {
   factorial *= i;
   }
   
   cout << fixed << setprecision(10) << sum / factorial;
   return
   }
  
  int main(){
  solve();
  return 0;
  }

Compiler output:
a.cc: In function 'void solve()':
a.cc:43:4: error: expected primary-expression before '}' token
   43 |    }
      |    ^
a.cc:42:10: error: expected ';' before '}' token
   42 |    return
      |          ^
      |          ;
   43 |    }
      |    ~
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <numeric>
#include <iomanip>
using namespace std;
using ll = long long;
#define rep(i, j, n) for(int i = (j); i < (n); ++i)
#define rrep(i, j, n) for(int i = (n) - 1; (j) <= i; --i)
constexpr ll MOD = 1000000007;
constexpr ll INF = 1LL << 60;

int main() {
	cin.tie(0); ios_base::sync_with_stdio(false);
	int n; cin >> n;
	vector<double> x(n), y(n);
	rep(i, 0, n) cin >> x[i] >> y[i];

	vector<int> idx(n);
	double num = 0.0;
	double denom = 0.0;
	iota(idx.begin(), idx.end(), 0);
	do {
		rep(i, 0, n - 1) {
			double tmp = 0.0;
			 tmp += (x[idx[i]] - x[idx[i + 1]]) * (x[idx[i]] - x[idx[i + 1]]);
			 tmp += (y[idx[i]] - y[idx[i + 1]]) * (y[idx[i]] - y[idx[i + 1]]);
			 tmp = sqrt(tmp);
			 num += tmp;
		}
		denom += 1.0;
	} while (next_permutation(idx.begin(), idx.end()));

	cout << fixed << setprecision(10) << num / denom << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:32: error: 'sqrt' was not declared in this scope
   28 |                          tmp = sqrt(tmp);
      |                                ^~~~
Language: Java

public class Main {
  public static void main(String[] args) {
    Scanner s = new Scanner(System.in);
    int n = s.nextInt();
    Point[] a = new Point[n];
    for (int i = 0; i < n; i++) {
      a[i] = new Point(s.nextInt(), s.nextInt());
    }

    double r = 0;

    for (int i = 0; i < n; i++) {
      for (int j = i + 1; j < n; j++) {
        r += a[i].distance(a[j]);
        System.out.println(r * 2 / n);
      }
    }
  }
}


Compiler output:
Main.java:3: error: cannot find symbol
    Scanner s = new Scanner(System.in);
    ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
    Scanner s = new Scanner(System.in);
                    ^
  symbol:   class Scanner
  location: class Main
Main.java:5: error: cannot find symbol
    Point[] a = new Point[n];
    ^
  symbol:   class Point
  location: class Main
Main.java:5: error: cannot find symbol
    Point[] a = new Point[n];
                    ^
  symbol:   class Point
  location: class Main
Main.java:7: error: cannot find symbol
      a[i] = new Point(s.nextInt(), s.nextInt());
                 ^
  symbol:   class Point
  location: class Main
5 errors
Language: C++


#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
const ll INF = 1LL << 60;

int x[10],y[10];

double dist(int i, int j) {
    double dx = x[i] - x[j];
    double dy = y[i] - y[j];
    return pow(dx * dx + dy * dy, 0.5);
}


int main(){
    int n;
    cin >> n;
    long double sum=0;
    for(int i=1; i<=n; i++) cin >> x[i] >> y[i];
    double sum=0;

    //n!通りの処理
    //1,2,3,4...となるベクトルを作る
    vector<int> v(n);
    rep(i,n) v[i] = i+1;

    do{
        rep(i,n) sum += dist(v[i],v[i+1]);
    }while(next_permutation(all(v)));

    //パターンはn!あるのでn!を計算
    int fact = 1;
    for(int i=2; i<=n; i++) fact *= i;

    cout << fixed << setprecision(10) <<  sum / fact << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:12: error: conflicting declaration 'double sum'
   23 |     double sum=0;
      |            ^~~
a.cc:21:17: note: previous declaration as 'long double sum'
   21 |     long double sum=0;
      |                 ^~~
Language: C++


#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
const ll INF = 1LL << 60;

int x[10],y[10];

double dist(int i, int j) {
    double dx = x[i] - x[j];
    double dy = y[i] - y[j];
    return pow(dx * dx + dy * dy, 0.5);
}


int main(){
    int n;
    cin >> n;
    long double sum=0;
    for(int i=1; i<=n; i++) cin >> x[i] >> y[i];
    double sum=0.0;

    //n!通りの処理
    //1,2,3,4...となるベクトルを作る
    vector<int> v(n);
    rep(i,n) v[i] = i+1;

    do{
        rep(i,n) sum += dist(v[i],v[i+1]);
    }while(next_permutation(all(v)));

    //パターンはn!あるのでn!を計算
    int fact = 1;
    for(int i=2; i<=n; i++) fact *= i;

    cout << fixed << setprecision(10) <<  sum / fact << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:12: error: conflicting declaration 'double sum'
   23 |     double sum=0.0;
      |            ^~~
a.cc:21:17: note: previous declaration as 'long double sum'
   21 |     long double sum=0;
      |                 ^~~
Language: C

#include<stdio.h>
#include<math.h>

#define L_MAX 2000 
#define R_MAX 2000

int main(){
  int i,j,k;
  int n,x,y;
  int Line[L_MAX];
  int Row[R_MAX];
  int fac = 1;
  int sum = 0;
  int ave;
  
  scanf("%d\n", &n);
  for(i = 0;i < n; i++){
    scanf("%d\n", &x);
    Line[i] = x;
    scanf("%d\n", &y);
    Row[i] = y;
  }
  for(j = 0; j < n; j++){
   for(k = n-1; k > j; k--){
     sum += sqrt((Line[j] - Line[k])*(Line[j] - Line[k]) + (Row[j] - Row[k])*(Row[j] - Row[k]));
   }
  }
  for(i = n; i>0 ;i--){
    fac *= i;
  }
  ave = sum/fac;
  pritnf("%d\n", ave);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:32:3: error: implicit declaration of function 'pritnf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   32 |   pritnf("%d\n", ave);
      |   ^~~~~~
      |   printf
Language: C

#include<stdio.h>
#include<math.h>

#define L_MAX 2000 
#define R_MAX 2000

int main(){
  int i,j,k;
  int n,x,y;
  int Line[L_MAX];
  int Row[R_MAX];
  int fac = 1;
  int sum = 0;
  int ave;
  
  scanf("%d\n", &n);
  for(i = 0;i < n; i++){
    scanf("%d\n", &x);
    Line[i] = &x;
    scanf("%d\n", &y);
    Row[i] = &y;
  }
  for(j = 0; j < n; j++){
   for(k = n-1; k > j; k--){
     sum += sqrt((Line[j] - Line[k])*(Line[j] - Line[k]) + (Row[j] - Row[k])*(Row[j] - Row[k]));
   }
  }
  for(i = n; i>0 ;i--){
    fac *= i;
  }
  ave = sum/fac;
  pritnf("%d\n", ave);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:19:13: error: assignment to 'int' from 'int *' makes integer from pointer without a cast [-Wint-conversion]
   19 |     Line[i] = &x;
      |             ^
main.c:21:12: error: assignment to 'int' from 'int *' makes integer from pointer without a cast [-Wint-conversion]
   21 |     Row[i] = &y;
      |            ^
main.c:32:3: error: implicit declaration of function 'pritnf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   32 |   pritnf("%d\n", ave);
      |   ^~~~~~
      |   printf
Language: C

#include<stdio.h>
#include<math.h>

#define L_MAX 2000 
#define R_MAX 2000

int main(){
  int i,j,k;
  int n,x,y;
  int Line[L_MAX];
  int Row[R_MAX];
  int fac = 1;
  int sum = 0;
  int ave;
  
  scanf("%d\n", &n);
  for(i = 0;i < n; i++){
    scanf("%d\n", &x);
    Line[i] = x;
    scanf("%d\n", &y);
    Row[i] = y;
  }
  for(j = 0; j < n; j++){
   for(k = n-1; k > j; k--){
     sum += sqrt((Line[j] - Line[k])*(Line[j] - Line[k]) + (Row[j] - Row[k])*(Row[j] - Row[k]));
   }
  }
  for(i = n; i>0 ;i--){
    fac *= i;
  }
  ave = sum/fac:
  pritnf("%d\n", ave);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:31:16: error: expected ';' before ':' token
   31 |   ave = sum/fac:
      |                ^
      |                ;
Language: C

#include<stdio.h>
#include<math.h>

#define L_MAX 2000 
#define R_MAX 2000

int main(){
  int i,j,k;
  int n,x,y;
  int Line[L_MAX];
  int Row[R_MAX];
  int fac = 1;
  int sum = 0;
  int ave;
  
  scanf("%d\n", &n);
  for(i = 0;i < n; i++){
    scanf("%d\n", &x);
    Line[i] = &x;
    scanf("%d\n", &y);
    Row[i] = &y;
  }
  for(j = 0; j < n; j++){
   for(k = n-1; k > j; k--){
     sum += sqrt((Line[j] - Line[k])*(Line[j] - Line[k]) + (Row[j] - Row[k])*(Row[j] - Row[k]));
   }
  }
  for(i = n; i>0 ;i--){
    fac *= i;
  }
  ave = sum/fac:
  pritnf("%d\n", ave);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:19:13: error: assignment to 'int' from 'int *' makes integer from pointer without a cast [-Wint-conversion]
   19 |     Line[i] = &x;
      |             ^
main.c:21:12: error: assignment to 'int' from 'int *' makes integer from pointer without a cast [-Wint-conversion]
   21 |     Row[i] = &y;
      |            ^
main.c:31:16: error: expected ';' before ':' token
   31 |   ave = sum/fac:
      |                ^
      |                ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int n,sum=0;
  cin >> n;
  long double n,x,y,i,j,b[n];
  long double ans = 2000000000;
  vector<vector<long double> > point(n,vector<long double>(2));
  vector<vector<long double> > dis(n,vector<long double>(n))
  
  
  //座標の取得
  for(i=0;i<n;i++){
    cin >> point.at(i).at(0) >> point.at(i).at(1);
  }
  
  //座標間距離
  for(i=0;i<n;i++){
    for(j=0;j<n;j++){
      dis_time_dis = pow((point.at(i).at(0)-point.at(j).at(0)),2)
                  +pow((point.at(i).at(1)-point.at(j).at(1),2);
      dis.at(i).at(j) = sqrt(dis_time_dis);
    }
  }
                       
  for (int i = 0; i < N; i++) b[i] = i ;
  
  do {
        for (int i = 0; i < n - 1; i++) {
            sum += dis[b[i]][b[i + 1]];
        }
    } while(next_permutation(b, b + n));
                       
  
    cout << sum/ << endl;
   //作成途中、解法確認して終了
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: conflicting declaration 'long double n'
    7 |   long double n,x,y,i,j,b[n];
      |               ^
a.cc:5:7: note: previous declaration as 'int n'
    5 |   int n,sum=0;
      |       ^
a.cc:14:3: error: expected ',' or ';' before 'for'
   14 |   for(i=0;i<n;i++){
      |   ^~~
a.cc:14:18: error: expected ';' before ')' token
   14 |   for(i=0;i<n;i++){
      |                  ^
      |                  ;
a.cc:21:7: error: 'dis_time_dis' was not declared in this scope
   21 |       dis_time_dis = pow((point.at(i).at(0)-point.at(j).at(0)),2)
      |       ^~~~~~~~~~~~
a.cc:22:63: error: expected ')' before ';' token
   22 |                   +pow((point.at(i).at(1)-point.at(j).at(1),2);
      |                       ~                                       ^
      |                                                               )
a.cc:27:23: error: 'N' was not declared in this scope
   27 |   for (int i = 0; i < N; i++) b[i] = i ;
      |                       ^
a.cc:36:18: error: expected primary-expression before '<<' token
   36 |     cout << sum/ << endl;
      |                  ^~
Language: C++

konnnichiha, watashiha, higuchiaya to moushimasu. watashiha korekara, presennte＿しょん
wo, hajimemasu. deha, nnnn. 
  watashihadesune... 8saidedewshite naraigotoha GSA,JPREP, gaxtukou,proguraminng, 
puuru. desune, antaha... nanimoyaxtuteinainndesuka! oh! my! gush juua,,, anataha tadano ninngenndesuka? soudesu bokuha tadano jinnruino nakano nakamudesu. nnnn. korede, watashino presentation wo owarimasu. songo... nee anohito dou you joyouusann? mextuchiya iihitodatoomoxtute... konnnafukusoudekitanoni okashitaidodaxtutakaramouusaiyakunanndakero....................................................................................................................................................  

Compiler output:
a.cc:1:1: error: 'konnnichiha' does not name a type
    1 | konnnichiha, watashiha, higuchiaya to moushimasu. watashiha korekara, presennte＿しょん
      | ^~~~~~~~~~~
Language: C++

/**
 *    author:  FromDihPout
 *    created: 2020-06-16
**/

#include <bits/stdc++.h>
using namespace std;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    
    int n;
    cin >> n;
    vector<pair<int,int>> a(n);
    vector<int> permute(n);
    for (int i = 0; i < n; i++) {
        cin >> a[i].f >> a[i].s;
        permute[i] = i;
    }
    double sum = 0;
    do {
        double dist = 0;
        pair<int,int> prev = a[permute[0]];
        for (int i = 1; i < n; i++) {
            int index = permute[i];
            dist += sqrt(pow(a[index].f - prev.f, 2) + pow(a[index].s - prev.s, 2));
            prev = a[index];
        }
        sum += dist;
    } while (next_permutation(permute.begin(), permute.end()));
    for (int i = 1; i <= n; i++) {
        sum /= i;
    }
    printf("%.10f", sum);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:21: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 'f'
   18 |         cin >> a[i].f >> a[i].s;
      |                     ^
a.cc:18:31: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 's'
   18 |         cin >> a[i].f >> a[i].s;
      |                               ^
a.cc:27:39: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 'f'
   27 |             dist += sqrt(pow(a[index].f - prev.f, 2) + pow(a[index].s - prev.s, 2));
      |                                       ^
a.cc:27:48: error: 'struct std::pair<int, int>' has no member named 'f'
   27 |             dist += sqrt(pow(a[index].f - prev.f, 2) + pow(a[index].s - prev.s, 2));
      |                                                ^
a.cc:27:69: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 's'
   27 |             dist += sqrt(pow(a[index].f - prev.f, 2) + pow(a[index].s - prev.s, 2));
      |                                                                     ^
a.cc:27:78: error: 'struct std::pair<int, int>' has no member named 's'
   27 |             dist += sqrt(pow(a[index].f - prev.f, 2) + pow(a[index].s - prev.s, 2));
      |                                                                              ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;

int main() {
  int N;
  cin >> N;
  vector<int> v, X, Y;
  int x, y;
  rep(i, N) {
    v.push_back(i);
    cin >> x >> y;
    X.push_back(x);
    Y.push_back(y);
  }
  int count = 0;
  long double sum = 0;
  do {
    count++;
    for (size_t i = 1; i < v.size(); i++) {
      sum += sqrt(pow(X[v[i - 1]] - X[v[i]], 2) + pow(Y[v[i - 1]] - Y[v[i]], 2));
    }
  } while (next_permutation(v.begin(), v.end()));
  cout << sum / count << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:19: error: 'pow' was not declared in this scope
   23 |       sum += sqrt(pow(X[v[i - 1]] - X[v[i]], 2) + pow(Y[v[i - 1]] - Y[v[i]], 2));
      |                   ^~~
a.cc:23:14: error: 'sqrt' was not declared in this scope
   23 |       sum += sqrt(pow(X[v[i - 1]] - X[v[i]], 2) + pow(Y[v[i - 1]] - Y[v[i]], 2));
      |              ^~~~
Language: C++

#include<iostream>
#include<vector>
#include<numeric>
#include<algorithm>
#include<iomanip>
using namespace std;
int main() {

	//C
	int n;
	cin >> n;
	long double x[8], y[8];
	int i;
	for (i = 0; i < n; i++) {
		cin >> x[i] >> y[i];
	}
	long double dis[8][8];
	long double discounter = 0;
	int j;
	for (i = 0; i < n; i++) {
		for (j = 0; j < n; j++) {
			dis[i][j] = (x[i] - x[j]) * (x[i] - x[j]) + (y[i] - y[j]) * (y[i] - y[j]);
			dis[i][j] = sqrt(dis[i][j]);
			discounter = discounter + dis[i][j];
		}
	}
	discounter = discounter / n;
	cout << fixed;
	cout << setprecision(10);
	cout << discounter << endl;
	return 0;



	/*
	vector<int> nums(n);
	iota(nums.begin(), nums.end(), 0);

	long double avepath = 0;
	do {
		for (i = 0; i < n - 1; i++) {
			avepath = avepath +		sqrt(dis[nums[i]][nums[i+1]])
		}
	} while (next_permutation(nums.begin(), nums.end()));
	/*
	
	//B
	/*int n;
	string s;
	cin >> n;
	cin >> s;
	int i;
	if (n % 2 == 1) {
		cout << "No" << endl;
		return 0;
	}
	for (i = 0; i < n / 2; i++) {
		if (s[i] != s[i + (n / 2)]) {
			cout << "No" << endl;
			return 0;
		}
	}
	cout << "Yes" << endl;
	return 0;*/
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:37: error: 'sqrt' was not declared in this scope
   23 |                         dis[i][j] = sqrt(dis[i][j]);
      |                                     ^~~~
Language: C++

//試行回数が少ないため全探索して平均値を計算すれば良い
//ポイントは誤差を減らすにはどうすれば良いのかということ
//順列を列挙してそれに対応する順に計算すれば良い
//考察はOKなので実装を頑張りましょう
#include <bits/stdc++.h>
using namespace std;

int main(){
  int N ;
  int n=1;
  long double ans =0;
  cin >> N ;
  vector<int> x(N);
  vector<int> y(N);
  vector<int> o(N);
  for(int i=0;i<N;i++){
    n *= N-1;
  }
  for(int i=0;i<N;i++){
    o[i] = i+1;
  }
  for(int i=0;i<N;i++) cin >> x[i] >> y[i] ;
  //入力終わり　次に順列を作る
  do{
    for(int i=0;i<N-1;i++){
    ans += sqrt((x[o[i+1]]-x[o[i]])*(x[o[i+1]]-x[o[i]])+(y[o[i+1]]-y[o[i]])*(y[o[i+1]]-y[o[i]]));
    }
  }while(next_permutation(o.begin(),o.end()));
    
    cout << long double (ans/n) << endl;
}
    
    
  


Compiler output:
a.cc: In function 'int main()':
a.cc:30:13: error: expected primary-expression before 'long'
   30 |     cout << long double (ans/n) << endl;
      |             ^~~~