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

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

int bi(int a){
	int r=1,i;
	for(i=1;i<=a;i++)r*=a;
	return r;
}

int main(){
	int n,i,j;
	int xy[10][2];
	double ans=0;
	scanf("%d",&n);
	for(i=0;i<n;i++)scanf("%d%d",&xy[i][0],&xy[i][1]);
	for(i=0;i<n;i++){
		for(j=1;j<n;j++){
			ans+=bi(n-1)*2*root((xy[i][0]-xy[j][0])*(xy[i][0]-xy[j][0])+(xy[i][1]-xy[j][1])*(xy[i][1]-xy[j][1]));
		}
	}
	printf("%.10f\n",ans/bi(n));
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:40: error: implicit declaration of function 'root' [-Wimplicit-function-declaration]
   18 |                         ans+=bi(n-1)*2*root((xy[i][0]-xy[j][0])*(xy[i][0]-xy[j][0])+(xy[i][1]-xy[j][1])*(xy[i][1]-xy[j][1]));
      |                                        ^~~~
Language: C++

#include<iostream>
#include<math.h>
#include<vector>
#include<algorithm>
#include<string>
#include<cstdio>
#include<iomanip>

using namespace std;
int func(double x);

int main() {

	double total=0;
	double N,A=0,;
	cin >> N;


	vector<long long> x(N);
	vector<long long> y(N);

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

	}

	for (int i = 0; i < N; i++)
	{
			for (int j = 0; j < N; j++&& i!=j)
			{
				A +=sqrt(((x[i]-x[j])*(x[i] - x[j]) +(y[i]-y[j])*(y[i]-y[j])))*func(N - 1) / func(N);
			}
	}

	cout << std::setprecision(12) << A;
}

int func(double x)
{
	if (x > 1) {
		x *= func(x - 1);
	}
	return x;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:22: error: expected unqualified-id before ';' token
   15 |         double N,A=0,;
      |                      ^
Language: C++

#include<iostream>
#include <bits/stdc++.h>
#include <set>
#include <map>
#include <vector>
#include<cmath>
#include<string>
#include <math.h>
using namespace std;

int main(){
  int N,z=1;
  double a[1100][5];
  double s,d,f,g,h;
  cin >> N;
  for(int i=0;i<N;i++){
    for(int k=0;k<2;k++){
      cin >> a[i][k];
    }
  }
  for(int i=0;i<N;i++){
      for(int k=0;k<N;k++){ 
        d=a[i][1]-a[k][1];
        f=a[i][0]-a[k][0];
        g=d*d+f*f;
        h=h+pow(g,0.5);
      }
  }
for(int k=1;k<N;k++){
  z=z*k
}
  cout << h/z << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:8: error: expected ';' before '}' token
   30 |   z=z*k
      |        ^
      |        ;
   31 | }
      | ~
Language: C++

#include <iostream>
#include <cmath>
#include <vector>

int main(){
    uint32_t n;
    uint32_t temp_leng = 1;
    double avg = 0;
    std::cin >> n;
    std::vector<std::vector<int>> zahyo(n, std::vector<int>(2));

    for(int i=1; i<(n+1); i++){
        temp_leng *= i;
    }

    for(int i=0; i<n; i++){
        for(int k=0; k<2; k++){
            std::cin >> zahyo[i][k];
        }

    }

    printf("x0 is %lx\n", (zahyo[0][0]));
    printf("x1 is %lx\n", (zahyo[1][0]));
    printf("y0 is %lx\n", (zahyo[0][1]));
    printf("y1 is %lx\n", (zahyo[1][1]));

    for(int i=0; i<temp_leng; i++){
        for(int l=0; l<i; l++){
            avg += (sqrt((((double)zahyo[i+l][0] - (double)zahyo[i+l][0]) * ((double)zahyo[l][0] - (double)zahyo[l][0])) + (((double)zahyo[i+l][0] - (double)zahyo[i+l][0]) * ((double)zahyo[l][1] - (double)zahyo[l][1])) / ((double)temp_leng);
        }
    }

    std::cout << avg << std::endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'uint32_t' was not declared in this scope
    6 |     uint32_t n;
      |     ^~~~~~~~
a.cc:4:1: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    3 | #include <vector>
  +++ |+#include <cstdint>
    4 | 
a.cc:7:13: error: expected ';' before 'temp_leng'
    7 |     uint32_t temp_leng = 1;
      |             ^~~~~~~~~~
      |             ;
a.cc:9:17: error: 'n' was not declared in this scope; did you mean 'yn'?
    9 |     std::cin >> n;
      |                 ^
      |                 yn
a.cc:13:9: error: 'temp_leng' was not declared in this scope
   13 |         temp_leng *= i;
      |         ^~~~~~~~~
a.cc:28:20: error: 'temp_leng' was not declared in this scope
   28 |     for(int i=0; i<temp_leng; i++){
      |                    ^~~~~~~~~
a.cc:30:241: error: expected ')' before ';' token
   30 |             avg += (sqrt((((double)zahyo[i+l][0] - (double)zahyo[i+l][0]) * ((double)zahyo[l][0] - (double)zahyo[l][0])) + (((double)zahyo[i+l][0] - (double)zahyo[i+l][0]) * ((double)zahyo[l][1] - (double)zahyo[l][1])) / ((double)temp_leng);
      |                    ~                                                                                                                                                                                                                            ^
      |                                                                                                                                                                                                                                                 )
Language: C

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

int n, p[8];
double mat[8][8];
double sum = 0.0;

int rec(int idx);

int calcP();

int main(void)
{
	int p[8][2];
	scanf("%d", &n);
	for(int i=0;i<n;i++) {
		scanf("%d %d%*c", &p[i][0], &p[i][1]);
	}

	for(int i=0;i<n;i++) {
		for(int j=0;j<n;j++) {
			if(i==j) continue;
			double t = sqrt((p[i][0]-p[j][0])*(p[i][0]-p[j][0]) + (p[i][1]-p[j][1])*(p[i][1]-p[j][1]));
			mat[i][j] = t;  mat[j][i] = t;
		}
	}

	rec(0);
	printf("%lf", sum/calcP());

	return 0;
}

int calcP(void)
{
	int a = 1;
	for(int i=1;i<=n;i++) a *= i;
	return a;
}

int exist(int idx, int m)
{
	for(int i=0;i<idx;i++) {
		if(p[i] == m) return 1;
	}
	return 0;
}

double calc(void) {
	double s = 0.0;
	for(int i=1;i<n;i++) {
		s += mat[p[i-1]][p[i]];
	}
	return s;
}

int rec(int idx)
{
	for(int i=0;i<n;i++) {
		if(exist(idx, i)) continue;
		p[idx] = i;
		if(idx == n-1) {
			sum += calc();
		} else {
			rec(idx+1);
		}
	}


Compiler output:
main.c: In function 'rec':
main.c:67:9: error: expected declaration or statement at end of input
   67 |         }
      |         ^
Language: Java

import java.util.*;

public class Main {
	
	public static void main(String[] args) {
      
        // flag
        boolean flag = false;
      
		// argumentの取得
		Scanner sc = new Scanner(System.in);

        // 町の数
		Integer townNum = sc.nextInt();
      
        // 座標データの格納用
        int[][] location = new int[townNum][townNum];
      
        // 要素を全て2次元配列に入れる
        for (int i = 0; i < townNum; i++) {
          // 座標の取得
          location[i][0] = sc.nextInt();
          location[i][1] = sc.nextInt();
        }
      
        // 2通りの場合は即座に返す
        if (townNum == 2) {
          System.out.println(String.format("%.10f", getLength(-879,981,-866,890)));
          return; 
        }
      
        for (int i = 0; i < townNum; i++) {
          for (int j = 0; j < townNum; j++) {
            if (i==j) {
              // do nothing
            } else {
              //System.out.println(i + " , " + j);
              result = factorial(location[i][0],location[i][1],location[j][0],location[j][1]);
              //System.out.println("座標: " + location[i][0] + " " + location[i][1]);
              //System.out.println("座標: " + location[j][0] + " " + location[j][1]);
            }
          }
        }                    
	}
  
    // 距離の計算用
    public static double getLength(Integer x1, Integer y1, Integer x2, Integer y2){
      Integer x = (x1 -x2) * (x1 -x2);
      Integer y = (y1 -y2) * (y1 -y2);
      
      double result = Math.sqrt(x + y);
      
      return result;
    }
    
    // 階乗の計算用
    public static Integer factorial(Integer number){
      if (number == 1){
            return 1;
        } else {
            return number * factorial(number - 1);
      }
    }
}

Compiler output:
Main.java:38: error: cannot find symbol
              result = factorial(location[i][0],location[i][1],location[j][0],location[j][1]);
              ^
  symbol:   variable result
  location: class Main
Main.java:38: error: method factorial in class Main cannot be applied to given types;
              result = factorial(location[i][0],location[i][1],location[j][0],location[j][1]);
                       ^
  required: Integer
  found:    int,int,int,int
  reason: actual and formal argument lists differ in length
2 errors
Language: C++

#include<iostream>
#include <bits/stdc++.h>
#include <set>
#include <map>
#include <vector>
#include<cmath>
#include<string>
#include <math.h>
using namespace std;

int main(){
  int N,z;
  double a[1100][5];
  double s,d,f,g,h;
  cin >> N;
  for(int i=0;i<N;i++){
    for(int k=0;k<2;k++){
      cin >> a[i][k];
    }
  }
  for(int i=0;i<N;i++){
      for(int k=0;k<N;k++){ 
        d=a[i][1]-a[k][1];
        f=a[i][0]-a[k][0];
        g=d*d+f*f;
        h=h+pow(g,0.5);
      }
  }
for(int k=1;k<N;k++){
  k=i*k
}
  cout << h/k << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:5: error: 'i' was not declared in this scope
   30 |   k=i*k
      |     ^
a.cc:32:13: error: 'k' was not declared in this scope
   32 |   cout << h/k << endl;
      |             ^
Language: C++

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

int main() {
  int n;
  cin >> n;
  vector<vector<double>> p(n, vector<double>(2));
  rep(i,n) {
    cin >> p[i][0];
    cin >> p[i][1];
  }
  
  int root = 1;
  rep(i, n) root *= (i+1);
  
  double sum = 0.0;
  for(int i=0; i<(n-1); i++) {
    for (int j=i+1; j<n; j++) {
      double x = pow(p[i][0]-p[j][0],2.0);
      double y = pow(p[i][1]-p[j][1],2.0);
      sum += sqrt(x+y);
    }
  }
  if (n == 1) {
  	printf("%.10f\n", sum);
  } else {
    double base = n - 2.0;
    double ans = (sum * (n*base+base)) / (double)root;
    printf("%.10f\n", ans);
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:2: error: expected '}' at end of input
   33 | }
      |  ^
a.cc:6:12: note: to match this '{'
    6 | int main() {
      |            ^
Language: C++

#include <iostream>
#include <vector>
#include<utility>
#include <algorithm>
using namespace std;
#define rep(i,n) for(int i = 0;i<n;++i)
int main(){
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	int n;
	cin >> n;
	vector<pair<int,int> > a;
	double sum  =0;
        rep(i,n){
		int temp1,temp2;
		cin >> 	temp1>>temp2;
		foreach(auto x : a){
			sum+= sqrt((x.first-temp1)*(x.first-temp1)+(x.second-temp2)*(x.second-temp2));
		a.push_back(pair<int,int>(temp1,temp2));
	}}
	cout << sum/n<<endl;



	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:25: error: expected primary-expression before 'auto'
   17 |                 foreach(auto x : a){
      |                         ^~~~
a.cc:17:17: error: 'foreach' was not declared in this scope; did you mean 'fread'?
   17 |                 foreach(auto x : a){
      |                 ^~~~~~~
      |                 fread
Language: C++

#include<iostream>
#include<string>
#include<vector>
using namespace std;

int main() {
	int N;
	cin >> N;
	vector<vector<int>> xy(2,vector<int>(N));
	for (int i = 0; i < N; i++) {
		cin >> xy[0][i] >> xy[1][i];
	}
	double val = 0;
	for (int i = 0; i < N; i++) {
		for (int j = 1; j < N; j++) {
			val = sqrt(abs(xy[0][i] - xy[0][j]) ^ 2 + abs(xy[1][i] - xy[1][j]) ^ 2);
		}
	}
	cout << val / N;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:31: error: 'sqrt' was not declared in this scope
   16 |                         val = sqrt(abs(xy[0][i] - xy[0][j]) ^ 2 + abs(xy[1][i] - xy[1][j]) ^ 2);
      |                               ^~~~
Language: C

#include<bits/stdc++.h>
#include<cstdio>
#include<cstdlib>

using namespace std;
typedef long long int ll;

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 fact(int n){
    return n==1 ? 1 : n*fact(n-1);
}

int main(){
    double n;  cin >> n;
    vector<double> x(n);
    vector<double> y(n);

    for(int i=0;i<n;i++)    cin >> x[i] >> y[i];
    
    vector<double> dis;

    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
            if(i!=j){
                double a1=pow(x[i]-x[j],2)+pow(y[i]-y[j],2);
                dis.emplace_back(sqrt(a1));
            }    
        }
    }

    double ans=0.0;

    for(auto v : dis){
        ans+=v;
    }

    //ans/=cons;	cout << fact(n-1) << endl;

    cout << ans/n << endl;
}

Compiler output:
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
    1 | #include<bits/stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include <bits/stdc++.h>
#include <set>
#include <map>
#include <vector>
#include<cmath>
#include<string>
#include <math.h>
using namespace std;

int main(){
  int N,z;
  double a[1100][5];
  double s,d,f,g,h;
  cin >> N;
  for(int i=0;i<N;i++){
    for(int k=0;k<2;k++){
      cin >> a[i][k];
    }
  }
  for(int i=0;i<N;i++){
      for(int k=0;k<N;k++){ 
        d=a[i][1]-a[k][1];
        f=a[i][0]-a[k][0];
        g=d*d+f*f;
        h=h+pow(g,0.5);
      }
  }
for(int k=1;k<N;k++){
  k=i*ak
}
  cout << h/k << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:5: error: 'i' was not declared in this scope
   30 |   k=i*ak
      |     ^
a.cc:30:7: error: 'ak' was not declared in this scope; did you mean 'k'?
   30 |   k=i*ak
      |       ^~
      |       k
a.cc:32:13: error: 'k' was not declared in this scope
   32 |   cout << h/k << endl;
      |             ^
Language: C++

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <algorithm>
#include <iostream>
#include <unordered_map>
#define maxn 100005
#define mod 1000000007
using namespace std;
typedef long long LL;
struct node
{
    int x,y;
}a[20];
double ans=0,time=0;
int vis[20]={0};
int n;
void bfs(int s)
{
    for(int i=0;i<n;i++)
    {
        if(vis[i]==0)
        {
        vis[i]=1;
        ans+=sqrt((a[s].x-a[i].x)*(a[s].x-a[i].x)+(a[s].y-a[i].y)*(a[s].y-a[i].y));
        bfs(i);
        vis[i]=0;
        }
    }
}
int main()
{

    scanf("%d",&n);
    for(int i=0;i<n;i++)
        scanf("%d%d",&a[i].x,&a[i].y);
    for(int j=0;j<n;j++)
    {
        vis[j]=1;
        bfs(j);
        vis[j]=0;
    }
    double nn=1.0;
    for(int i=2;i<=n;i++) nn*=i;
    //printf("%lf\n",nn/15656);
    printf("%.10lf",ans/nn);
    return 0;
}


Compiler output:
a.cc:16:14: error: 'double time' redeclared as different kind of entity
   16 | double ans=0,time=0;
      |              ^~~~
In file included from /usr/include/pthread.h:23,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr.h:157,
                 from /usr/include/c++/14/ext/atomicity.h:35,
                 from /usr/include/c++/14/bits/ios_base.h:39,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:6:
/usr/include/time.h:76:15: note: previous declaration 'time_t time(time_t*)'
   76 | extern time_t time (time_t *__timer) __THROW;
      |               ^~~~
Language: C++

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

int main(){
  int n;
  cin >> n;
  double dist;
  int ka,x[n],y[n];
  for(int i=0;i<n;i++){
    cin >> x[i] >> y[i];
  }
  for(int i=0;i<n-1;i++){
    for(int j=i+1;j<n;j++){
      dist+=squt((x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j]));
    }
  }
  for(int i=1;i=n;i++){
    ka = ka*i;
  }
  
  cout << (double)dist/ka << endl;
  return 0;
}
    


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

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define INF 1e9
#define PI 3.14159265359
#define ALL(v) v.begin(),v.end()
typedef long long ll;

int getDistance(int x, int y, int x2, int y2) {
    double distance = Math.sqrt((x2 - x) * (x2 - x) + (y2 - y) * (y2 - y));

    return (int) distance;
}

int main() {
  int n;
  vector<int> x(n);
  vector<int> y(n);
  rep(i,n){
    cin >> x.at(i) >> y.at(i);
  }
  double sum;
  for(int i=0; i<n; i++){
    for(int j=0; j<n; j++){
      sum+=getDistance(x.at(i),y.at(i),x.at(j),y.at(j));
    }
  }
  cout << fixed << setprecision(10) << sum/n << endl;
  
}


Compiler output:
a.cc: In function 'int getDistance(int, int, int, int)':
a.cc:10:23: error: 'Math' was not declared in this scope
   10 |     double distance = Math.sqrt((x2 - x) * (x2 - x) + (y2 - y) * (y2 - y));
      |                       ^~~~
Language: C++

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

int main(){
  int n,x,y;
  cin >> n;
  double dist;
  int ka;
  for(int i=0;i<n;i++){
    cin >> x[i] >> y[i];
  }
  for(int i=0;i<n-1;i++){
    for(int j=i+1;j<n;j++){
      dist+=squt((x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j]));
    }
  }
  for(int i=1;i=n;i++){
    ka = ka*i;
  }
  
  cout << (double)dist/ka << endl;
  return 0;
}
    


Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: invalid types 'int[int]' for array subscript
   10 |     cin >> x[i] >> y[i];
      |             ^
a.cc:10:21: error: invalid types 'int[int]' for array subscript
   10 |     cin >> x[i] >> y[i];
      |                     ^
a.cc:14:20: error: invalid types 'int[int]' for array subscript
   14 |       dist+=squt((x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j]));
      |                    ^
a.cc:14:25: error: invalid types 'int[int]' for array subscript
   14 |       dist+=squt((x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j]));
      |                         ^
a.cc:14:32: error: invalid types 'int[int]' for array subscript
   14 |       dist+=squt((x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j]));
      |                                ^
a.cc:14:37: error: invalid types 'int[int]' for array subscript
   14 |       dist+=squt((x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j]));
      |                                     ^
a.cc:14:44: error: invalid types 'int[int]' for array subscript
   14 |       dist+=squt((x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j]));
      |                                            ^
a.cc:14:49: error: invalid types 'int[int]' for array subscript
   14 |       dist+=squt((x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j]));
      |                                                 ^
a.cc:14:56: error: invalid types 'int[int]' for array subscript
   14 |       dist+=squt((x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j]));
      |                                                        ^
a.cc:14:61: error: invalid types 'int[int]' for array subscript
   14 |       dist+=squt((x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j]));
      |                                                             ^
a.cc:14:13: error: 'squt' was not declared in this scope; did you mean 'sqrt'?
   14 |       dist+=squt((x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j]));
      |             ^~~~
      |             sqrt
Language: C++

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

int main(){
  int n;
  cin >> n;
  double dist;
  int ka;
  for(int i=0;i<n;i++){
    cin >> x[i] >> y[i];
  }
  for(int i=0;i<n-1;i++){
    for(int j=i+1;j<n;j++){
      dist+=squt((x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j]));
    }
  }
  for(int i=1;i=n;i++){
    ka = ka*i;
  }
  
  cout << (double)dist/ka << endl;
  return 0;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: 'x' was not declared in this scope
   10 |     cin >> x[i] >> y[i];
      |            ^
a.cc:10:20: error: 'y' was not declared in this scope
   10 |     cin >> x[i] >> y[i];
      |                    ^
a.cc:14:19: error: 'x' was not declared in this scope
   14 |       dist+=squt((x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j]));
      |                   ^
a.cc:14:43: error: 'y' was not declared in this scope
   14 |       dist+=squt((x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j]));
      |                                           ^
a.cc:14:13: error: 'squt' was not declared in this scope; did you mean 'sqrt'?
   14 |       dist+=squt((x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j]));
      |             ^~~~
      |             sqrt
Language: C

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

int main(){
  int N,i,k,kizyun;
  double x[8],y[8],kyori[],sx,sy;
  
  scanf("%d\n", &N);
  for(i=0;i<N;i++){
    scanf("%lf %lf\n", x, y);
  }
  k=0;
 for(kizyun=0;kizyun<N-2;kizyun++){ 
    for(i=kizyun;i<N-1;i++){
      sx =(x[kizyun] - x[kizyun+1]) * (x[kizyun] - x[kizyun+1]);
      sy =(y[kizyun] - y[kizyun+1]) * (y[kizyun] - y[kizyun+1]);
      kyori[k] = sqrt(sx + sy);
      k++;
    }
 }
  for(i=0;i<=k;i++)
    sx=sx+kyori[i];
  sx=sx/k;
  sx=sx*(N-1);
  printf("%lf\n",sx);
  return 0;
}
  
  


Compiler output:
main.c: In function 'main':
main.c:6:20: error: array size missing in 'kyori'
    6 |   double x[8],y[8],kyori[],sx,sy;
      |                    ^~~~~
Language: C++

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

int main() {
  int N;
  cin >> N;
  vector<int> vec(2 * N);
  double tot = 0;
  for (int i = 0; i < 2 * N; i++) {
    cin >> vec.at(i);
  }
  
  for (int i = 0; i < N - 1; i++) {
    for (int j = i + 1; j < N; j++) {
      tot += sqrt((vec(2*i) - vec(2*j))*(vec(2*i) - vec(2*j)) + (vec(2*i + 1) - vec(2*j + 1))*(vec(2*i + 1) - vec(2*j + 1)));
    }
  }
  
  cout << (tot * (N-1))/N << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:23: error: no match for call to '(std::vector<int>) (int)'
   15 |       tot += sqrt((vec(2*i) - vec(2*j))*(vec(2*i) - vec(2*j)) + (vec(2*i + 1) - vec(2*j + 1))*(vec(2*i + 1) - vec(2*j + 1)));
      |                    ~~~^~~~~
a.cc:15:34: error: no match for call to '(std::vector<int>) (int)'
   15 |       tot += sqrt((vec(2*i) - vec(2*j))*(vec(2*i) - vec(2*j)) + (vec(2*i + 1) - vec(2*j + 1))*(vec(2*i + 1) - vec(2*j + 1)));
      |                               ~~~^~~~~
a.cc:15:45: error: no match for call to '(std::vector<int>) (int)'
   15 |       tot += sqrt((vec(2*i) - vec(2*j))*(vec(2*i) - vec(2*j)) + (vec(2*i + 1) - vec(2*j + 1))*(vec(2*i + 1) - vec(2*j + 1)));
      |                                          ~~~^~~~~
a.cc:15:56: error: no match for call to '(std::vector<int>) (int)'
   15 |       tot += sqrt((vec(2*i) - vec(2*j))*(vec(2*i) - vec(2*j)) + (vec(2*i + 1) - vec(2*j + 1))*(vec(2*i + 1) - vec(2*j + 1)));
      |                                                     ~~~^~~~~
a.cc:15:69: error: no match for call to '(std::vector<int>) (int)'
   15 |       tot += sqrt((vec(2*i) - vec(2*j))*(vec(2*i) - vec(2*j)) + (vec(2*i + 1) - vec(2*j + 1))*(vec(2*i + 1) - vec(2*j + 1)));
      |                                                                  ~~~^~~~~~~~~
a.cc:15:84: error: no match for call to '(std::vector<int>) (int)'
   15 |       tot += sqrt((vec(2*i) - vec(2*j))*(vec(2*i) - vec(2*j)) + (vec(2*i + 1) - vec(2*j + 1))*(vec(2*i + 1) - vec(2*j + 1)));
      |                                                                                 ~~~^~~~~~~~~
a.cc:15:99: error: no match for call to '(std::vector<int>) (int)'
   15 |       tot += sqrt((vec(2*i) - vec(2*j))*(vec(2*i) - vec(2*j)) + (vec(2*i + 1) - vec(2*j + 1))*(vec(2*i + 1) - vec(2*j + 1)));
      |                                                                                                ~~~^~~~~~~~~
a.cc:15:114: error: no match for call to '(std::vector<int>) (int)'
   15 |       tot += sqrt((vec(2*i) - vec(2*j))*(vec(2*i) - vec(2*j)) + (vec(2*i + 1) - vec(2*j + 1))*(vec(2*i + 1) - vec(2*j + 1)));
      |                                                                                                               ~~~^~~~~~~~~
Language: C

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

int main(){
  int N,i,k,kizyun;
  double x[8],y[8],kyori[],sx,sy;
  
  scanf("%d\n", &d);
  for(i=0;i<N;i++){
    scanf("%lf %lf\n", x, y);
  }
  k=0;
 for(kizyun=0;kizyun<N-2;kizyun++){ 
    for(i=kizyun;i<N-1;i++){
      sx =(x[kizyun] - x[kizyun+1]) * (x[kizyun] - x[kizyun+1])
      sy =(y[kizyun] - y[kizyun+1]) * (y[kizyun] - y[kizyun+1])
      kyori[k] = sqrt(sx + sy);
      k++;
    }
 }
  for(i=0;i<=k;i++)
    sx=sx+kyori[i];
  sx=sx/k;
  sx=sx*(N-1);
  printf("%lf\n",sx);
  return 0;
}
  
  

Compiler output:
main.c: In function 'main':
main.c:6:20: error: array size missing in 'kyori'
    6 |   double x[8],y[8],kyori[],sx,sy;
      |                    ^~~~~
main.c:8:18: error: 'd' undeclared (first use in this function)
    8 |   scanf("%d\n", &d);
      |                  ^
main.c:8:18: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:64: error: expected ';' before 'sy'
   15 |       sx =(x[kizyun] - x[kizyun+1]) * (x[kizyun] - x[kizyun+1])
      |                                                                ^
      |                                                                ;
   16 |       sy =(y[kizyun] - y[kizyun+1]) * (y[kizyun] - y[kizyun+1])
      |       ~~
Language: C++

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

int main() {
  int N;
  cin >> N;
  vector<int> vec(2 * N);
  double tot = 0;
  for (int i = 0; i < 2 * N; i++) {
    cin >> vec.at(i);
  }
  
  for (int i = 0; i < N - 1; i++) {
    for (int j = i + 1; j < N) {
      tot += pow((vec(2*i) - vec(2*j))*(vec(2*i) - vec(2*j)) + (vec(2*i + 1) - vec(2*j + 1))*(vec(2*i + 1) - vec(2*j + 1)), 0.5);
    }
  }
  
  cout << (tot * (N-1))/N << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:30: error: expected ';' before ')' token
   14 |     for (int j = i + 1; j < N) {
      |                              ^
      |                              ;
a.cc:15:22: error: no match for call to '(std::vector<int>) (int)'
   15 |       tot += pow((vec(2*i) - vec(2*j))*(vec(2*i) - vec(2*j)) + (vec(2*i + 1) - vec(2*j + 1))*(vec(2*i + 1) - vec(2*j + 1)), 0.5);
      |                   ~~~^~~~~
a.cc:15:33: error: no match for call to '(std::vector<int>) (int)'
   15 |       tot += pow((vec(2*i) - vec(2*j))*(vec(2*i) - vec(2*j)) + (vec(2*i + 1) - vec(2*j + 1))*(vec(2*i + 1) - vec(2*j + 1)), 0.5);
      |                              ~~~^~~~~
a.cc:15:44: error: no match for call to '(std::vector<int>) (int)'
   15 |       tot += pow((vec(2*i) - vec(2*j))*(vec(2*i) - vec(2*j)) + (vec(2*i + 1) - vec(2*j + 1))*(vec(2*i + 1) - vec(2*j + 1)), 0.5);
      |                                         ~~~^~~~~
a.cc:15:55: error: no match for call to '(std::vector<int>) (int)'
   15 |       tot += pow((vec(2*i) - vec(2*j))*(vec(2*i) - vec(2*j)) + (vec(2*i + 1) - vec(2*j + 1))*(vec(2*i + 1) - vec(2*j + 1)), 0.5);
      |                                                    ~~~^~~~~
a.cc:15:68: error: no match for call to '(std::vector<int>) (int)'
   15 |       tot += pow((vec(2*i) - vec(2*j))*(vec(2*i) - vec(2*j)) + (vec(2*i + 1) - vec(2*j + 1))*(vec(2*i + 1) - vec(2*j + 1)), 0.5);
      |                                                                 ~~~^~~~~~~~~
a.cc:15:83: error: no match for call to '(std::vector<int>) (int)'
   15 |       tot += pow((vec(2*i) - vec(2*j))*(vec(2*i) - vec(2*j)) + (vec(2*i + 1) - vec(2*j + 1))*(vec(2*i + 1) - vec(2*j + 1)), 0.5);
      |                                                                                ~~~^~~~~~~~~
a.cc:15:98: error: no match for call to '(std::vector<int>) (int)'
   15 |       tot += pow((vec(2*i) - vec(2*j))*(vec(2*i) - vec(2*j)) + (vec(2*i + 1) - vec(2*j + 1))*(vec(2*i + 1) - vec(2*j + 1)), 0.5);
      |                                                                                               ~~~^~~~~~~~~
a.cc:15:113: error: no match for call to '(std::vector<int>) (int)'
   15 |       tot += pow((vec(2*i) - vec(2*j))*(vec(2*i) - vec(2*j)) + (vec(2*i + 1) - vec(2*j + 1))*(vec(2*i + 1) - vec(2*j + 1)), 0.5);
      |                                                                                                              ~~~^~~~~~~~~
Language: C

//C - Average Length
#include<stdio.h>
#include<math.h>
#include<string.h>
#include<stack>
using namespace std;
stack<int>k;
int vis[3030]={};
struct ss{
	int x;
	int y;
}s[3030];
int n,cnt=0;
double sum,ans;
int main()
{
	int i;
	void dfs(int pos);
	while(~scanf("%d",&n)){
		for(i=0;i<n;i++)
			scanf("%d%d",&s[i].x,&s[i].y);
		dfs(0);
		printf("%lf\n",sum/cnt*1.0);
//		printf("%lf\n",sum);
//		printf("%d\n",cnt);
		memset(s,0,sizeof(s));
	}
}
void dfs(int pos)
{
	int t;
	sum+=ans;
	if(pos==n){
		cnt++;	
		return;
	}
	for(int j=0;j<n;j++){
		if(!vis[j]){
			vis[j]=1;
			while(!k.empty()){
				t=k.top();
				ans=sqrt(pow(s[t].x-s[j].x,2)+pow(s[t].y-s[j].y,2));
				k.pop();
			}k.push(j);
			dfs(pos+1);
			vis[j]=0;
		}
	}
}

Compiler output:
main.c:5:9: fatal error: stack: No such file or directory
    5 | #include<stack>
      |         ^~~~~~~
compilation terminated.
Language: C++

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

int main() {
  int N;
  cin >> N;
  vector<int> vec(2 * N);
  double tot = 0;
  for (int i = 0; i < 2 * N; i++) {
    cin >> vec.at(i);
  }
  
  for (int i = 0; i < N - 1; i++) {
    for (int j = i + 1; j < N) {
      tot += sqrt((vec(2*i) - vec(2*j))*(vec(2*i) - vec(2*j)) + (vec(2*i + 1) - vec(2*j + 1))*(vec(2*i + 1) - vec(2*j + 1)));
    }
  }
  
  cout << (tot * (N-1))/N << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:30: error: expected ';' before ')' token
   14 |     for (int j = i + 1; j < N) {
      |                              ^
      |                              ;
a.cc:15:23: error: no match for call to '(std::vector<int>) (int)'
   15 |       tot += sqrt((vec(2*i) - vec(2*j))*(vec(2*i) - vec(2*j)) + (vec(2*i + 1) - vec(2*j + 1))*(vec(2*i + 1) - vec(2*j + 1)));
      |                    ~~~^~~~~
a.cc:15:34: error: no match for call to '(std::vector<int>) (int)'
   15 |       tot += sqrt((vec(2*i) - vec(2*j))*(vec(2*i) - vec(2*j)) + (vec(2*i + 1) - vec(2*j + 1))*(vec(2*i + 1) - vec(2*j + 1)));
      |                               ~~~^~~~~
a.cc:15:45: error: no match for call to '(std::vector<int>) (int)'
   15 |       tot += sqrt((vec(2*i) - vec(2*j))*(vec(2*i) - vec(2*j)) + (vec(2*i + 1) - vec(2*j + 1))*(vec(2*i + 1) - vec(2*j + 1)));
      |                                          ~~~^~~~~
a.cc:15:56: error: no match for call to '(std::vector<int>) (int)'
   15 |       tot += sqrt((vec(2*i) - vec(2*j))*(vec(2*i) - vec(2*j)) + (vec(2*i + 1) - vec(2*j + 1))*(vec(2*i + 1) - vec(2*j + 1)));
      |                                                     ~~~^~~~~
a.cc:15:69: error: no match for call to '(std::vector<int>) (int)'
   15 |       tot += sqrt((vec(2*i) - vec(2*j))*(vec(2*i) - vec(2*j)) + (vec(2*i + 1) - vec(2*j + 1))*(vec(2*i + 1) - vec(2*j + 1)));
      |                                                                  ~~~^~~~~~~~~
a.cc:15:84: error: no match for call to '(std::vector<int>) (int)'
   15 |       tot += sqrt((vec(2*i) - vec(2*j))*(vec(2*i) - vec(2*j)) + (vec(2*i + 1) - vec(2*j + 1))*(vec(2*i + 1) - vec(2*j + 1)));
      |                                                                                 ~~~^~~~~~~~~
a.cc:15:99: error: no match for call to '(std::vector<int>) (int)'
   15 |       tot += sqrt((vec(2*i) - vec(2*j))*(vec(2*i) - vec(2*j)) + (vec(2*i + 1) - vec(2*j + 1))*(vec(2*i + 1) - vec(2*j + 1)));
      |                                                                                                ~~~^~~~~~~~~
a.cc:15:114: error: no match for call to '(std::vector<int>) (int)'
   15 |       tot += sqrt((vec(2*i) - vec(2*j))*(vec(2*i) - vec(2*j)) + (vec(2*i + 1) - vec(2*j + 1))*(vec(2*i + 1) - vec(2*j + 1)));
      |                                                                                                               ~~~^~~~~~~~~
Language: C++

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

float norm(int x_1, int x_2, int y_1, int y_2){
    return pow(pow(x_1 - x_2, 2) + pow(y_1 - y_2, 2), 0.5);
}

int n_kai(int n){
    int ans = 1;
    for (int i = 1; i <= n; i++){
        ans = ans * i;
    }
    cout << ans << endl;
    return ans;
}

int main(){
    int N; cin >> N;
    int x[N], y[N];
    for (int i = 0; i < N; i++) cin >> x[i] >> y[i];
    int city[N];
    for (int i = 0; i < N; i++) city[i] = i;
    float length;
    int nx = sizeof(city) / sizeof(city[0]);

    while (next_permutation(city, city + nx)){
        int pos_1 = city[i];
        int pos_2 = city[i +1];
        length = length + norm(x[pos_1], x[pos_2], y[pos_1], y[pos_2]);
        for (int i = 0; i < N - 1; i++){
            pos_1 = city[i];
           I  pos_2 = city[i +1];
            length = length + norm(x[pos_1], x[pos_2], y[pos_1], y[pos_2]);
        }
    }

    float ans = length / n_kai(N);
    cout << ans << "\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:26: error: 'i' was not declared in this scope
   28 |         int pos_1 = city[i];
      |                          ^
a.cc:33:12: error: 'I' was not declared in this scope
   33 |            I  pos_2 = city[i +1];
      |            ^
Language: C++

vector<vector<double>> d(8, vector<double>(8, 0.0));

int kaijou(int n){
    return n == 1 ? 1 : n * kaijou(n - 1);
}

int main(void) {

    int N;
    double sum = 0;
    cin >> N;

    vi x(N), y(N);

    REP(i, N) cin >> x[i] >> y[i];

    int p = kaijou(N - 1) * 2;
    
    REP(i, N){
        REPA(j, i, N){
            d[i][j] = sqrt(pow(x[i] - x[j], 2) + pow(y[i] - y[j], 2));
            sum += d[i][j] * p;
        }
    }
    
    sum /= kaijou(N);
    
    cout << std::setprecision(20) << sum << endl;

    return 0;
}

Compiler output:
a.cc:1:1: error: 'vector' does not name a type
    1 | vector<vector<double>> d(8, vector<double>(8, 0.0));
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:11:5: error: 'cin' was not declared in this scope
   11 |     cin >> N;
      |     ^~~
a.cc:13:5: error: 'vi' was not declared in this scope
   13 |     vi x(N), y(N);
      |     ^~
a.cc:15:9: error: 'i' was not declared in this scope
   15 |     REP(i, N) cin >> x[i] >> y[i];
      |         ^
a.cc:15:5: error: 'REP' was not declared in this scope
   15 |     REP(i, N) cin >> x[i] >> y[i];
      |     ^~~
a.cc:28:5: error: 'cout' was not declared in this scope
   28 |     cout << std::setprecision(20) << sum << endl;
      |     ^~~~
a.cc:28:18: error: 'setprecision' is not a member of 'std'
   28 |     cout << std::setprecision(20) << sum << endl;
      |                  ^~~~~~~~~~~~
a.cc:1:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
  +++ |+#include <iomanip>
    1 | vector<vector<double>> d(8, vector<double>(8, 0.0));
a.cc:28:45: error: 'endl' was not declared in this scope
   28 |     cout << std::setprecision(20) << sum << endl;
      |                                             ^~~~
Language: C++

#include <iostream>
#include <cmath>
using namespace std;

double dp[8][8];
double n, cevap;

pair<int, int> koordinat[8];


double uzaklik(int a, int b){
	if(dp[a][b])return dp[a][b];
	double x1=koordinat[a].first, y1=koordinat[a].second, x2=koordinat[b].first, y2=koordinat[b].second, x, y;
	dp[a][b]=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
  	dp[b][a]=dp[a][b];
}

int main(void){
  cin>>n;
  int x, y;
  for(int i=0;i<n;i++){cin>>x>>y;koordinat[i]=make_pair(x, y);}
  for(int i=0;i<n*n;i++)uzaklik(i/n, i%n);
  for(int i=0;i<n*n;i++)cevap+=(dp[i/n][i%n] * 720 * 7)/n;
  cout<<cvp;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:39: error: invalid operands of types 'int' and 'double' to binary 'operator%'
   22 |   for(int i=0;i<n*n;i++)uzaklik(i/n, i%n);
      |                                      ~^~
      |                                      | |
      |                                      | double
      |                                      int
a.cc:23:35: error: invalid types 'double [8][8][double]' for array subscript
   23 |   for(int i=0;i<n*n;i++)cevap+=(dp[i/n][i%n] * 720 * 7)/n;
      |                                   ^
a.cc:23:42: error: invalid operands of types 'int' and 'double' to binary 'operator%'
   23 |   for(int i=0;i<n*n;i++)cevap+=(dp[i/n][i%n] * 720 * 7)/n;
      |                                         ~^~
      |                                         | |
      |                                         | double
      |                                         int
a.cc:24:9: error: 'cvp' was not declared in this scope
   24 |   cout<<cvp;
      |         ^~~
a.cc: In function 'double uzaklik(int, int)':
a.cc:15:17: warning: control reaches end of non-void function [-Wreturn-type]
   15 |         dp[b][a]=dp[a][b];
      |         ~~~~~~~~^~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#include <math.h>

using namespace std;

  
int main(){
  int N,i,k,x,y,ans;

  vector <pair<int,int>> xy;
  
  cin>>N;
  
  float dist[N][N];
  
  for(i=0;i<N;i++){
    cin>>x>>y;
    xy.at(i)=make_pair(x,y);
  }
  
  for(i=0;i<N;i++){
    for(k=0;k<N;k++){
           	dist[i][k]=sqrt(pow(xy.at(i).first-xy.at(k).first,2)+pow(xy.at(i).second-xy.at(k).second,2));
    }
  }
  
  //al=N!
  int al;
  for(i=1;i<=N;i++){
    al=al*i;
  }

  vector <vector<int>> root(al, vector<int>(N));

  int ctr=0;
  vector <int> num(N),temp(N);

  //initialize
  for(k=0;k<N;k++){
    num[k]=k;
    temp[k]=k;
  }
  
  
  for(i=0;i<al;i++){

    int t=0;
    while(num[t]){
      for(k=0;k<t;k++){
        root.at(ctr).at(k)=num[k]
      }
      
    num.erase(num.begin()+i);
    for(k=0;k<N;k++){
      		root.at(ctr).at(i)=k;
        }
  	ctr++;
  }
  
  long len=0;
  
  for(i=0;i<al;i++){
    for(k=0;k<N;k++){
      len+=dist[root.at(i).at(k)][root.at(i).at(k+1)];
    }
  }
 
  ans=len/al;
 cout<<ans;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:50:34: error: expected ';' before '}' token
   50 |         root.at(ctr).at(k)=num[k]
      |                                  ^
      |                                  ;
   51 |       }
      |       ~                           
a.cc:71:2: error: expected '}' at end of input
   71 | }
      |  ^
a.cc:7:11: note: to match this '{'
    7 | int main(){
      |           ^
Language: C++

#include <iostream>
#include <cmath>
using namespace std;

double dp[8][8];
double n, cevap;

pair<int, int> koordinat[8];


double uzaklik(int a, int b){
	if(dp[a][b])return dp[a][b];
	double x1=koordinat[a].first, y1=koordinat[a].second, x2=koordinat[b].first, y2=koordinat[b].second, x, y;
	dp[a][b]=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
  	dp[b][a]=dp[a][b];
}

int main(void){
  cin>>n;
  int x, y;
  for(int i=0;i<n;i++){cin>>x>>y;koordinatlar[i]=make_pair(x, y);}
  for(int i=0;i<n*n;i++)uzaklik(i/n, i%n);
  for(int i=0;i<n*n;i++)cevap+=(dp[i/n][i%n]*720*7)/n;
  cout<<cvp;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:34: error: 'koordinatlar' was not declared in this scope; did you mean 'koordinat'?
   21 |   for(int i=0;i<n;i++){cin>>x>>y;koordinatlar[i]=make_pair(x, y);}
      |                                  ^~~~~~~~~~~~
      |                                  koordinat
a.cc:22:39: error: invalid operands of types 'int' and 'double' to binary 'operator%'
   22 |   for(int i=0;i<n*n;i++)uzaklik(i/n, i%n);
      |                                      ~^~
      |                                      | |
      |                                      | double
      |                                      int
a.cc:23:35: error: invalid types 'double [8][8][double]' for array subscript
   23 |   for(int i=0;i<n*n;i++)cevap+=(dp[i/n][i%n]*720*7)/n;
      |                                   ^
a.cc:23:42: error: invalid operands of types 'int' and 'double' to binary 'operator%'
   23 |   for(int i=0;i<n*n;i++)cevap+=(dp[i/n][i%n]*720*7)/n;
      |                                         ~^~
      |                                         | |
      |                                         | double
      |                                         int
a.cc:24:9: error: 'cvp' was not declared in this scope
   24 |   cout<<cvp;
      |         ^~~
a.cc: In function 'double uzaklik(int, int)':
a.cc:15:17: warning: control reaches end of non-void function [-Wreturn-type]
   15 |         dp[b][a]=dp[a][b];
      |         ~~~~~~~~^~~~~~~~~
Language: C++

#include <iostream>
#include <cmath>
using namespace std;

double dp[8][8];
double n, cevap;

pair<int, int> koordinat[8];


double uzaklik(int a, int b){
	if(dp[a][b])return dp[a][b];
	double x1=koordinat[a].first, y1=koordinat[a].second, x2=koordinat[b].first, y2=koordinat[b].second, x, y;
	dp[x][y]=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
  	dp[y][x]=dp[x][y];
}

int main(void){
  cin>>n;
  int x, y;
  for(int i=0;i<n;i++){cin>>x>>y;koordinatlar[i]=make_pair(x, y);}
  for(int i=0;i<n*n;i++)uzaklik(i/n, i%n);
  for(int i=0;i<n*n;i++)cevap+=(dp[i/n][i%n]*720*7)/n;
  cout<<cvp;
  return 0;
}

Compiler output:
a.cc: In function 'double uzaklik(int, int)':
a.cc:14:11: error: invalid types 'double [8][8][double]' for array subscript
   14 |         dp[x][y]=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
      |           ^
a.cc:15:11: error: invalid types 'double [8][8][double]' for array subscript
   15 |         dp[y][x]=dp[x][y];
      |           ^
a.cc:15:20: error: invalid types 'double [8][8][double]' for array subscript
   15 |         dp[y][x]=dp[x][y];
      |                    ^
a.cc: In function 'int main()':
a.cc:21:34: error: 'koordinatlar' was not declared in this scope; did you mean 'koordinat'?
   21 |   for(int i=0;i<n;i++){cin>>x>>y;koordinatlar[i]=make_pair(x, y);}
      |                                  ^~~~~~~~~~~~
      |                                  koordinat
a.cc:22:39: error: invalid operands of types 'int' and 'double' to binary 'operator%'
   22 |   for(int i=0;i<n*n;i++)uzaklik(i/n, i%n);
      |                                      ~^~
      |                                      | |
      |                                      | double
      |                                      int
a.cc:23:35: error: invalid types 'double [8][8][double]' for array subscript
   23 |   for(int i=0;i<n*n;i++)cevap+=(dp[i/n][i%n]*720*7)/n;
      |                                   ^
a.cc:23:42: error: invalid operands of types 'int' and 'double' to binary 'operator%'
   23 |   for(int i=0;i<n*n;i++)cevap+=(dp[i/n][i%n]*720*7)/n;
      |                                         ~^~
      |                                         | |
      |                                         | double
      |                                         int
a.cc:24:9: error: 'cvp' was not declared in this scope
   24 |   cout<<cvp;
      |         ^~~
a.cc: In function 'double uzaklik(int, int)':
a.cc:13:86: warning: control reaches end of non-void function [-Wreturn-type]
   13 |         double x1=koordinat[a].first, y1=koordinat[a].second, x2=koordinat[b].first, y2=koordinat[b].second, x, y;
      |                                                                                      ^~
Language: C++

#include <bits/stdc++.h>
#include <algorithm>      
#include <vector>
using namespace std;
int main() {
  int input = 1;
  int a[10],b[10];
  cin >> input;
  for(int i = 0;i<input;i++)
  {
    cin >> a[i] >> b[i];
  }
  double dst1;
  double dst2;
  int d1[10];
  int d2[10];
  double d = 0;
  double d3 = 0;
    vector<int> v(input);
    iota(v.begin(), v.end(), 1);       // v に 1, 2, ... N を設定
    do {
      	int num = 0;
        for(auto x : v)
        {
          d1[num] = a[x];
          d2[num] = b[x];
          num ++;
        }
      for(int i = 0; i < input - 1; i++)
      {
        dst1 = (d1[i] - d1[i+1])*(d1[i] - d1[i+1]);
        dst2 = (d2[i] - d2[i+1])*(d2[i] - d2[i+1]);
        d += sqrt(dst1 + dst2);
      }
      }
    } while( next_permutation(v.begin(), v.end()) );     // 次の順列を生成
int p = 1;
for(int i = 0;i <input;i++){
  p *=(i+p);
}
d3 = d/p;
cout >> d3 >>endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:5: error: expected 'while' before '}' token
   36 |     } while( next_permutation(v.begin(), v.end()) );     // 次の順列を生成
      |     ^
a.cc:36:5: error: expected '(' before '}' token
   36 |     } while( next_permutation(v.begin(), v.end()) );     // 次の順列を生成
      |     ^
      |     (
a.cc:36:5: error: expected primary-expression before '}' token
a.cc:35:8: error: expected ')' before '}' token
   35 |       }
      |        ^
      |        )
   36 |     } while( next_permutation(v.begin(), v.end()) );     // 次の順列を生成
      |     ~   
a.cc:35:8: error: expected ';' before '}' token
   35 |       }
      |        ^
      |        ;
   36 |     } while( next_permutation(v.begin(), v.end()) );     // 次の順列を生成
      |     ~   
a.cc: At global scope:
a.cc:36:7: error: expected unqualified-id before 'while'
   36 |     } while( next_permutation(v.begin(), v.end()) );     // 次の順列を生成
      |       ^~~~~
a.cc:38:1: error: expected unqualified-id before 'for'
   38 | for(int i = 0;i <input;i++){
      | ^~~
a.cc:38:15: error: 'i' does not name a type
   38 | for(int i = 0;i <input;i++){
      |               ^
a.cc:38:24: error: 'i' does not name a type
   38 | for(int i = 0;i <input;i++){
      |                        ^
a.cc:41:1: error: 'd3' does not name a type
   41 | d3 = d/p;
      | ^~
a.cc:42:1: error: 'cout' does not name a type
   42 | cout >> d3 >>endl;
      | ^~~~
a.cc:43:5: error: expected unqualified-id before 'return'
   43 |     return 0;
      |     ^~~~~~
a.cc:44:1: error: expected declaration before '}' token
   44 | }
      | ^
Language: C++

#include <bits/stdc++.h>
#include <algorithm>      
#include <vector>
using namespace std;
int main() {
  int input = 1;
  int a[10],b[10];
  cin >> input;
  for(int i = 0;i<input;i++)
  {
    cin >> a[i] >> b[i];
  }
  double dst1;
  double dst2;
  int d1[10];
  int d3[10];
  double d = 0;
  double d3 = 0;
    vector<int> v(input);
    iota(v.begin(), v.end(), 1);       // v に 1, 2, ... N を設定
    do {
      	int num = 0;
        for(auto x : v)
        {
          d1[num] = a[x];
          d2[num] = b[x];
          num ++;
        }
      for(int i = 0; i < input - 1; i++)
      {
        dst1 = (d1[i] - d1[i+1])*(d1[i] - d1[i+1]);
        dst2 = (d2[i] - d2[i+1])*(d2[i] - d2[i+1]);
        d += sqrt(dst1 + dst2);
      }
      }
    } while( next_permutation(v.begin(), v.end()) );     // 次の順列を生成
int p = 1;
for(int i = 0;i <input;i++){
  p *=(i+p);
}
d3 = d/p;
cout >> d3 >>endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:10: error: conflicting declaration 'double d3'
   18 |   double d3 = 0;
      |          ^~
a.cc:16:7: note: previous declaration as 'int d3 [10]'
   16 |   int d3[10];
      |       ^~
a.cc:26:11: error: 'd2' was not declared in this scope; did you mean 'd'?
   26 |           d2[num] = b[x];
      |           ^~
      |           d
a.cc:32:17: error: 'd2' was not declared in this scope; did you mean 'd'?
   32 |         dst2 = (d2[i] - d2[i+1])*(d2[i] - d2[i+1]);
      |                 ^~
      |                 d
a.cc:36:5: error: expected 'while' before '}' token
   36 |     } while( next_permutation(v.begin(), v.end()) );     // 次の順列を生成
      |     ^
a.cc:36:5: error: expected '(' before '}' token
   36 |     } while( next_permutation(v.begin(), v.end()) );     // 次の順列を生成
      |     ^
      |     (
a.cc:36:5: error: expected primary-expression before '}' token
a.cc:35:8: error: expected ')' before '}' token
   35 |       }
      |        ^
      |        )
   36 |     } while( next_permutation(v.begin(), v.end()) );     // 次の順列を生成
      |     ~   
a.cc:35:8: error: expected ';' before '}' token
   35 |       }
      |        ^
      |        ;
   36 |     } while( next_permutation(v.begin(), v.end()) );     // 次の順列を生成
      |     ~   
a.cc: At global scope:
a.cc:36:7: error: expected unqualified-id before 'while'
   36 |     } while( next_permutation(v.begin(), v.end()) );     // 次の順列を生成
      |       ^~~~~
a.cc:38:1: error: expected unqualified-id before 'for'
   38 | for(int i = 0;i <input;i++){
      | ^~~
a.cc:38:15: error: 'i' does not name a type
   38 | for(int i = 0;i <input;i++){
      |               ^
a.cc:38:24: error: 'i' does not name a type
   38 | for(int i = 0;i <input;i++){
      |                        ^
a.cc:41:1: error: 'd3' does not name a type
   41 | d3 = d/p;
      | ^~
a.cc:42:1: error: 'cout' does not name a type
   42 | cout >> d3 >>endl;
      | ^~~~
a.cc:43:5: error: expected unqualified-id before 'return'
   43 |     return 0;
      |     ^~~~~~
a.cc:44:1: error: expected declaration before '}' token
   44 | }
      | ^