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

#include<stdio.h>
int main()
{
  double L,R,i,j;
  double min=2018,a;
  scanf("%lf %lf",&L,&R);
  for(i=L;i<R;i++)
  {
    a=i%2019;//あまりの最小値をだす．その時のi付近が答え
    if(a<min)
    {
      min=a;
    }
  }
  if(min!=0)
  {
    printf("%lf",min*(min+1));
  }
  else
  {
    printf("0");
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    9 |     a=i%2019;//あまりの最小値をだす．その時のi付近が答え
      |       ~^~~~~
      |       | |
      |       | int
      |       double
Language: C++

using namespace std;

int main(){
    int n,d;
    cin >> n >> d;
    int nn = (n*(n-1))/2;
    int x[n][d];
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < d; j++) {
            cin >> x[i][j];
        }
    }

    int num = 0;
    double distdist[45] = {};
    for (int i = 0; i < n-1; i++) {
        for (int j = i+1; i < n; j++) {
            for (int k = 0; k < d; k++) {
                distdist[num] += abs(x[i][k]-x[j][k]);
            }
            num++;
        }
    }

    double dist[45];
    for (int i = 0; i < nn; i++) {
        dist[i] = sqrt(distdist[i]);
        dist[i] *= 10;
    }

    int ans = 0;
    for (int i = 0; i < nn; i++) {
        if ( fmod(dist[i], 10) == 0) {
            ans++;
        }
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin >> n >> d;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:19:34: error: 'abs' was not declared in this scope
   19 |                 distdist[num] += abs(x[i][k]-x[j][k]);
      |                                  ^~~
a.cc:27:19: error: 'sqrt' was not declared in this scope
   27 |         dist[i] = sqrt(distdist[i]);
      |                   ^~~~
a.cc:33:14: error: 'fmod' was not declared in this scope
   33 |         if ( fmod(dist[i], 10) == 0) {
      |              ^~~~
a.cc:37:5: error: 'cout' was not declared in this scope
   37 |     cout << ans << endl;
      |     ^~~~
a.cc:37:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:37:20: error: 'endl' was not declared in this scope
   37 |     cout << ans << endl;
      |                    ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
	int main() {
		int i, j, Row, Colum;
		int **a;
		int tmp1,tmp2, result;
                tmp=1;
		a = new int*[10];
		cin >> Row;
		cin >> Colum;
		for (i = 0; i < Row; i++)
		{
			for (j = 0; j < Colum; j++)
			{
				cin >> a[i][j];
			}
		}
		switch (Colum)
		{
		case 1:
			for (i = Row; i > (Row-2); i--)
			{
				tmp1 = tmp1*i;
			}	
			result = tmp1 /2;
			break;
		case 2:
			break;
		default:
			break;
		}
		cout << result << endl;
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: 'tmp' was not declared in this scope; did you mean 'tmp2'?
    8 |                 tmp=1;
      |                 ^~~
      |                 tmp2
Language: C

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

int main()
{
    int n,d=0,i,j,k,sum=0;;
    scanf("%d %d",&n,&d);
    if(n<2 || d<1 ||n>10 ||d>10)
        return;
    int x[n][d];
    for(i=0;i<n;i++)
    {
        for(j=0;j<d;j++)
            scanf("%d",&x[i][j]);
    }
    for(i=0;i<n;i++)
    {
        for(j=0;j<d;j++)
        {   for(k=0;k<n;k++)
            {
                for(m=0;m<d;m++)
                if(i!=k)
                {
                    d+=(x[i][j]-x[k][m])*(x[i][j]-x[k][m]);
                }

            }
            if(i!=k)
            {
                d=sqrt(d);
                if(d%d==0)
                sum++;
                d=0;
            }
        }
    }
    printf("%d",sum);
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:10:9: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
   10 |         return;
      |         ^~~~~~
main.c:5:5: note: declared here
    5 | int main()
      |     ^~~~
main.c:22:21: error: 'm' undeclared (first use in this function)
   22 |                 for(m=0;m<d;m++)
      |                     ^
main.c:22:21: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

int main() {

	int N, D;
	cin >> N >> D;

	vector<vector<int>> points;

	for (int n = 0; n < N; n++) {
		vector<int> v;
		for (int d = 0; d < D; d++) {
			int num;
			cin >> num;
			v.push_back(num);
		}
		points.push_back(v);
	}

	int result = 0;
	for (size_t i = 0; i < points.size(); i++) {
		for (size_t j = i + 1; j < points.size(); j++) {
			int sum = 0;
			for (size_t k = 0; k < points[i].size(); k++) {
				sum += (points[i][k] - points[j][k]) * (points[i][k] - points[j][k]);
			}
			double num = sqrt(sum);
			if (ceil(num) == floor(num)) {
				result++;
			}
		}
	}
	cout << result;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:38: error: 'sqrt' was not declared in this scope
   29 |                         double num = sqrt(sum);
      |                                      ^~~~
a.cc:30:29: error: 'ceil' was not declared in this scope
   30 |                         if (ceil(num) == floor(num)) {
      |                             ^~~~
a.cc:30:42: error: 'floor' was not declared in this scope
   30 |                         if (ceil(num) == floor(num)) {
      |                                          ^~~~~
Language: C

int main(void)
{
		int sum, ans=0,n,d;
		double a;

		scanf("%d",&n);
		scanf("%d", &d);

		int x[n][d];

		for (int i = 0;i < n;i++)
			for (int j = 0;j < d;j++)
				scanf("%d",&x[i][j]);

	for (int a = 0;a < n - 1;a++)
	{
		for (int b = a + 1;b < n;b++)
		{
			sum = 0;
			for (int i = 0;i < d;i++)
				sum = (x[a][i] - x[b][i]) * (x[a][i] - x[b][i]);
			a = sqrt((double)sum);
			sum = (int)a*100;
			if (sum == a * 100)
				ans++;
		}
	}

	printf("%d",ans)



}

Compiler output:
main.c: In function 'main':
main.c:6:17: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    6 |                 scanf("%d",&n);
      |                 ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void)
main.c:6:17: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    6 |                 scanf("%d",&n);
      |                 ^~~~~
main.c:6:17: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:22:29: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   22 |                         a = sqrt((double)sum);
      |                             ^~~~
main.c:1:1: note: include '<math.h>' or provide a declaration of 'sqrt'
  +++ |+#include <math.h>
    1 | int main(void)
main.c:22:29: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
   22 |                         a = sqrt((double)sum);
      |                             ^~~~
main.c:22:29: note: include '<math.h>' or provide a declaration of 'sqrt'
main.c:29:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   29 |         printf("%d",ans)
      |         ^~~~~~
main.c:29:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:29:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:29:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:29:25: error: expected ';' before '}' token
   29 |         printf("%d",ans)
      |                         ^
      |                         ;
......
   33 | }
      | ~
Language: C

#include<stdio.h>
#include<math.h>
 
int main(){
  
 int d,n,i,j,count;
  scanf("%d %d",&n,&d); 
  int a[n][d];
  int sum[n];
  for(i=0;i<n;i++){
    for(j=0;j<d;j++){
   scanf("%d ",&a[i][j]);}
  printf("\n");
  }
  for(i=0;i<n-1;i++){
    for(j=0;j<d;j++){
      sum[i]+=(a[i][j]-a[i+1][j])*(a[i][j]-a[i+1][j]);
    }
      if(sqrt(sum[i])==fabs(sqrt(sum[i]))){
      connt++;}
  }
  printf("%d",count);
 return 0; 
}

Compiler output:
main.c: In function 'main':
main.c:20:7: error: 'connt' undeclared (first use in this function); did you mean 'count'?
   20 |       connt++;}
      |       ^~~~~
      |       count
main.c:20:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include<math.h>
 
int main(){
  
 int d,n,i,j,count;
  scanf("%d %d",&n,&d); 
  int a[n][d];
  int sum[n];
  for(i=0;i<n;i++){
    for(j=0;j<d;j++){
   scanf("%d ",&a[i][j]);}
  printf("\n");
  }
  for(i=0;i<n-1;i++){
    for(j=0;j<d;j++){
      sum[i]+=(a[i][j]-a[i+1][j])*(a[i][j]-a[i+1][j]);
    }sqrt(sum[i])
      if(sqrt(sum[i])==fabs(sqrt(sum[i]))){
      connt++;}
  }
  printf("%d",count);
 return 0; 
}


Compiler output:
main.c: In function 'main':
main.c:18:18: error: expected ';' before 'if'
   18 |     }sqrt(sum[i])
      |                  ^
      |                  ;
   19 |       if(sqrt(sum[i])==fabs(sqrt(sum[i]))){
      |       ~~
Language: C

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

int main(){
  
 int d,n,i,j,count;
  scanf("%d %d",&n,&d); 
  int a[n][d];
  int sum[n];
  for(i=0;i<n;i++){
    for(j=0;j<d;j++){
   scanf("%d ",&a[i][j]);}
  printf("\n");
  }
  for(i=0;i<n-1;i++){
    for(j=0;j<d;j++){
      sum[i]+=(a[i][j]-a[i+1][j])*(a[i][j]-a[i+1][j]);
    }sqrt(sum[i])
      if(sqrt(sum[i])==abs(sqrt(sum[i]))){
      connt++;}
  }
  printf("%d",count);
 return 0; 
}

Compiler output:
main.c: In function 'main':
main.c:18:18: error: expected ';' before 'if'
   18 |     }sqrt(sum[i])
      |                  ^
      |                  ;
   19 |       if(sqrt(sum[i])==abs(sqrt(sum[i]))){
      |       ~~
Language: C++

#include <iostream>
#include <cmath>
using namespace std;
int main(void){
    int n,d,cnt=0;
    cin >>n>> d;
    float a[n][d];
    for (int i = 0; i <n ; i++) {
        for (int j = 0; j <d ; j++) {
            cin >>a[i][j];
        }
    }
    
    for (int i = 0; i <n ; i++) {
        for (int j = i+1; j <n ; j++) {
            int s=0;
            for (int k = 0; k <d ; k++) {
                s+=pow(a[i][k]-a[j][k],2.0);
            }
            double dis=sqrt(s);
            if (ceil(dis) == floor(dis)) {
　　　　        cnt++;
　　        }
        }
    }
    
    cout << cnt << endl;
}

Compiler output:
a.cc:22:1: error: extended character 　 is not valid in an identifier
   22 | 　　　　        cnt++;
      | ^
a.cc:22:1: error: extended character 　 is not valid in an identifier
a.cc:22:1: error: extended character 　 is not valid in an identifier
a.cc:22:1: error: extended character 　 is not valid in an identifier
a.cc:23:1: error: extended character 　 is not valid in an identifier
   23 | 　　        }
      | ^
a.cc:23:1: error: extended character 　 is not valid in an identifier
a.cc: In function 'int main()':
a.cc:22:1: error: '\U00003000\U00003000\U00003000\U00003000' was not declared in this scope
   22 | 　　　　        cnt++;
      | ^~~~~~~~
a.cc:23:1: error: '\U00003000\U00003000' was not declared in this scope
   23 | 　　        }
      | ^~~~
Language: C

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

int main(){
  
 int d,n,i,j,count;
  scanf("%d %d",&n,&d); 
  int a[n][d];
  int sum[n];
  for(i=0;i<n;i++){
    for(j=0;j<d;j++){
   scanf("%d ",&a[i][j]);}
  printf("\n");
  }
  for(i=0;i<n-1;i++){
    for(j=0;j<d;j++){
      sum[i]+=(a[i][j]-a[i+1][j])*(a[i][j]-a[i+1][j]);
    }sqrt(sum[i])
      if(sqrt(sum[i])==abs(sqrt(sum[i])))connt++;
  }
  printf("%d",count);
 return 0; 
}

Compiler output:
main.c: In function 'main':
main.c:18:18: error: expected ';' before 'if'
   18 |     }sqrt(sum[i])
      |                  ^
      |                  ;
   19 |       if(sqrt(sum[i])==abs(sqrt(sum[i])))connt++;
      |       ~~
Language: C++

#include <stdio.h>
#include <vector>
#include <map>
#include <string>
#include <iostream>
#include <limits.h>
#include <algorithm>

using namespace std;

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

    int X[10][10];

    for (int i = 0; i < N; i++)
    {
        for(int j = 0;  j < D;  j++) {
            cin >> X[i][j];
        }
    }

int count = 0;

    for (int i = 0; i < N; i++) {
     
    for (int k = 0; k < N; k++) {
        if (i == k) continue;
        double total = 0;

        for(int j = 0;  j < D;  j++) {
             total += pow(X[i][j] - X[k][j], 2);
        }
         total = sqrt(total);
         if (total == int(total)) {
             count ++;
         }
    }

    }
            cout << count  / 2<< endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:23: error: 'pow' was not declared in this scope
   34 |              total += pow(X[i][j] - X[k][j], 2);
      |                       ^~~
a.cc:36:18: error: 'sqrt' was not declared in this scope
   36 |          total = sqrt(total);
      |                  ^~~~
Language: C

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

int main(){
  
 int d,n,i,j,count;
  scanf("%d %d",&n,&d); 
  int a[n][d];
  int sum[n];
  for(i=0;i<n;i++){
    for(j=0;j<d;j++){
   scanf("%d ",&a[i][j]);}
  printf("\n");
  }
  for(i=0;i<n-1;i++){
    for(j=0;j<d;j++){
      sum[i]+=(a[i][j]-a[i+1][j])*(a[i][j]-a[i+1][j]);
    }sqrt(sum[i])
      if(sqrt(sum[i])==abs(sprt(sum[i])))connt++;
  }
  printf("%d",count);
 return 0; 
}

Compiler output:
main.c: In function 'main':
main.c:18:18: error: expected ';' before 'if'
   18 |     }sqrt(sum[i])
      |                  ^
      |                  ;
   19 |       if(sqrt(sum[i])==abs(sprt(sum[i])))connt++;
      |       ~~
Language: C++

#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <cmath>
#include <queue>
#include <numeric>
#include <cmath>

using namespace std;

typedef long long ll;

long long GCD(long long a, long long b){if(b==0)return a;return GCD(b,a%b);}

int main() {
    int N, D; cin >> N >> D;
    vector<vector<int>> v(N);
    for (int i = 0; i < N; ++i) {
        for (int j = 0; j < D; ++j){
            int x; cin >> x;
            v[i].push_back(x);
        }
    }
    int res = 0;
    for (int i = 0; i < N; ++i) {
        for (int j = 0; j < N; ++j) {
            if (i ==j) continue;
            float R = 0;
            for (int k = 0; k < D; ++k) R += abs(v[i][k]-v[j][k]);
            if (floor(sqrt(R)) == sqrt(R)) ++res;
        }
    }
    cout << res << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:15: error: 'cin' was not declared in this scope
   17 |     int N, D; cin >> N >> D;
      |               ^~~
a.cc:9:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    8 | #include <cmath>
  +++ |+#include <iostream>
    9 | 
a.cc:34:5: error: 'cout' was not declared in this scope
   34 |     cout << res << endl;
      |     ^~~~
a.cc:34:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:34:20: error: 'endl' was not declared in this scope
   34 |     cout << res << endl;
      |                    ^~~~
a.cc:9:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    8 | #include <cmath>
  +++ |+#include <ostream>
    9 |
Language: C++


#include<stdio.h>
#include<math.h>
int main()
{
    int n,d,count;
    float dist;   

    scanf("%d" "%d" ,&n,&d);
    int x[n*d];
    
    for(int i=1;i<=n*d;i++){
		scanf("%d",&x[i]);


    for(int i=1;i<=n;i++){
	for(int j=i+1;j<=n;j++){
		dist = 0;
        	for(int k=1;k<=d;k++){
			dist=dist+(x[(i-1)*d+k]-x[(j-1)*d+k])*(x[(i-1)*d+k]-x[(j-1)*d+k]);
				      }
		if( (int)sqrt(dist) - sqrt(dist)<0.00000001)
			count++;
    }}	

    printf("%d",count);
    return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
int a[22][12];
int n,d;
const int N=1e9+5;
bool mark[N];
int prim[N];
int cnt;
void initial()
{
    cnt=0;
    for (int i=2 ; i<N ; ++i)
    {
        if (!mark[i])
            prim[cnt++]=i;
        for (int j=0 ; j<cnt && i*prim[j]<N ; ++j)
        {
            mark[i*prim[j]]=1;
            if (!(i%prim[j]))
                break;
        }
    }
}
int coutt(int i,int j)
{
	long long sum=0;
	for(int ii=0;ii<d;ii++)
	{
		sum+=(a[i][ii]-a[j][ii])*(a[i][ii]-a[j][ii]);
	}
//	cout<<i<<' '<<j<<' '<<sqrt(sum)<<endl;
	int qq=0;
	while(sum>=prim[qq])
	{
		if(sum%prim[qq]==0)
		{
			
			if(sum%(prim[qq]*prim[qq])==0) 
			{
				qq++;
				continue;
			}
			else return 0;
		}
//		if()
//		else 
		qq++;
	}
	return 1;
//	if(sum-sqrt(sum)*sqrt(sum)==0) return 0;
//	else return 0;
//	
	
}
int main()
{
	
	cin>>n>>d;
//	printf("n=%d d=%d\n",n,d);
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<d;j++)
		{
//			scanf("%d",&a[i][j]);
			cin>>a[i][j];
		}
	}
//	getchar();
//	getchar();
//	for(int i=0;i<n;i++)
//	{
//		for(int j=0;j<d;j++)
//		{
////			printf("%d%c",a[i][j],i==n-1?'\n':' ');
//			cout<<a[i][j];
//			
//		}
//		cout<<endl;
//	}
	initial();
	int summ=0;
	for(int i=0;i<n-1;i++)
	{
		for(int j=i+1;j<n;j++)
		{
			if(coutt(i,j)==1) 
			{
			summ++;
//			cout<<i<<' '<<j<<endl;
			}
		}
	}
	cout<<summ<<endl;
	
}


Compiler output:
/tmp/cc8jFPcR.o: in function `initial()':
a.cc:(.text+0x6): relocation truncated to fit: R_X86_64_PC32 against symbol `cnt' defined in .bss section in /tmp/cc8jFPcR.o
a.cc:(.text+0x36): relocation truncated to fit: R_X86_64_PC32 against symbol `cnt' defined in .bss section in /tmp/cc8jFPcR.o
a.cc:(.text+0x3f): relocation truncated to fit: R_X86_64_PC32 against symbol `cnt' defined in .bss section in /tmp/cc8jFPcR.o
a.cc:(.text+0xb3): relocation truncated to fit: R_X86_64_PC32 against symbol `cnt' defined in .bss section in /tmp/cc8jFPcR.o
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
#include <math.h>
using namespace std;
int main()
{
	int n,d;
	cin >> n >> d;
	long x[n+1][d+1];
	long ans=0;
	double y;
	for(int i=0;i<n;i++){
		for(int j=0;j<d;j++){
			cin >> x[i][j];	
		}
	}
	for(int k=0;k<n-1;k++){
		for(int i=k+1;i<n;i++){
			y=0
			for(int j=0;j<d;j++){
				y+=((x[k][j])-(x[i][j]))*((x[k][j])-(x[i][j]));
			}        
			y=sqrt(y);
			if(y==long(y)){
				ans++;
			} 
		}
	}
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:28: error: expected ';' before 'for'
   18 |                         y=0
      |                            ^
      |                            ;
   19 |                         for(int j=0;j<d;j++){
      |                         ~~~ 
a.cc:19:37: error: 'j' was not declared in this scope
   19 |                         for(int j=0;j<d;j++){
      |                                     ^
Language: C++

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

int main() {
  int N, D, ans = 0;
  cin >> N >> D;
  vector<vector<int>>X(N,vector<int>(D));
  for (int i = 0; i < N; i++) {
    for (int j = 0; j < D; j++) {
      cin >> X.at(i).at(j);
    }
  }
  vector<vector<int>>A(N,vector<int>(N));
  vector<vector<double>>B(N,vector<double>(N));
  for (int i = 0; i < N; i++) {
    for (int j = 0; j < N; j++) {
      for (int k = 0; k < D; k++) {
        A.at(i).at(j) += (X.at(i).at(k)-X.at(j).at(k))(X.at(i).at(k)-X.at(j).at(k));
        B.at(i).at(j) = sqrt(A.at(i).at(j));
      }
      if (ceil(B.at(i).at(j))==floor(B.at(i).at(j))) {
        ans++;
      }
    }
  }
  ans -= N;
  ans /= 2;
  cout << ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:55: error: expression cannot be used as a function
   20 |         A.at(i).at(j) += (X.at(i).at(k)-X.at(j).at(k))(X.at(i).at(k)-X.at(j).at(k));
      |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

//おまじない
#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int n,d;
  
  vector<vector <int>> v(n,vector<int> (n));
  
  for(int i=0; i<n; i++){
    for(int j=0; j<d){
      cin>>v.at(i).at(j);}}
  
  
  long int s=0;
  int cunt =0;
  for(int i=0; i<n-1; i++){
    for(int j=i+1; j<d j++){
      for(int k=0;k<d; k++){
        s+=pow((v.at(i).at(k)-v.at(j).at(k),2);
               }
             long int  rt=sqrt(s);
               if (ceil(s) == floor(s)) {
                 cunt++;}
               }
               }
    cout<<cunt<<endl;
               }
               
      
      
      

Compiler output:
a.cc: In function 'int main()':
a.cc:11:21: error: expected ';' before ')' token
   11 |     for(int j=0; j<d){
      |                     ^
      |                     ;
a.cc:18:23: error: expected ';' before 'j'
   18 |     for(int j=i+1; j<d j++){
      |                       ^~
      |                       ;
a.cc:20:47: error: expected ')' before ';' token
   20 |         s+=pow((v.at(i).at(k)-v.at(j).at(k),2);
      |               ~                               ^
      |                                               )
Language: C++

#include<iostream>

using namespace std;

int main() {
	int N, D;
	cin >> N >> D;
	int X[10][10];
	int ans = 0;
	int root;
	int count = 0;
	for (int i = 0;i < N;i++) {
		for (int q = 0;q < D;q++) {
			cin >> X[i][q];
		}
	}
	for (int i = 0;i < N;i++) {
		for (int q = i+1;q < N;q++) {
			for (int w = 0;w < D;w++) {
				ans += (X[i][w] - X[q][w])*(X[i][w] - X[q][w]);
			}
			root = sqrt(ans);
			/*cout << root*root << endl;
			cout << ans << endl;*/
			if (root * root == ans) {
				count++;
			}
			ans = 0;
		}
	}
	cout << count << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:32: error: 'sqrt' was not declared in this scope
   22 |                         root = sqrt(ans);
      |                                ^~~~
Language: C++

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

int inner(vector<int > p,vector<int>q){
int ans=0;
for(int i=0;i<p.size();i++)  ans+=p[i]*q[i];
return ans;
}

int main(){
int N,D;
cin>>N>>D;
vector<int> a[N];

for(int i=0;i<N;i++){
 for(int j=0;j<D;j++){
int s;
cin>>s;
a[i].push_back(s);
 }
}

int ans=0;

for(int i=0;i<N;i++){
 for(int j=i+1;j<N;j++){
double d=sqrt(inner(a[i],a[j]);
if (d==floor(d)) ans++;
 }
}
cout<<ans;

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:31: error: expected ')' before ';' token
   27 | double d=sqrt(inner(a[i],a[j]);
      |              ~                ^
      |                               )
Language: C++


#include<stdio.h>
#include<math.h>
int main()
{
    int n,d,count;
    int x[n*d];
    float dist;   

    scanf("%d" "%d" , &n,&d);
  
    for(int i=1;i<=n;i++){
	for(int j=i+1;j<=n;j++){
		dist = 0;
        	for(int k=1;k<=d;k++){
			dist=dist+(x[(i-1)*d+k]-x[(j-1)*d+k])**2;
				      }
		if( (int)sqrt(dist)-sqrt(dist)<0.000000001)
			count++;
    }}	

    printf("%d",count);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:63: error: invalid type argument of unary '*' (have 'int')
   16 |                         dist=dist+(x[(i-1)*d+k]-x[(j-1)*d+k])**2;
      |                                                               ^~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>

using namespace std;

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

	int nd[10][10];

	for (int i =0; i<n; i++){
		for (int j =0; j<d; j++){
			cin >> nd[i][j];
		}
	}

	int count = 0;

	for (int i = 0; i < n; i++){
		double kyori = 0;
		double kei = 0;
		for (int j = 0; j < d; j++){
			if (i == n - 1){
				kei += pow((nd[i][j] - nd[0][j]), 2);
			}
			else{
				kei += pow((nd[i][j] - nd[i + 1][j]), 2);
			}
			
		}
		kyori = sqrt(kei);
		if (ceil(kyori) != floor(kyori)) {}
		else {
			++count;
		}
	}
	cout << count << endl;

	//system("pause");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:40: error: 'pow' was not declared in this scope
   28 |                                 kei += pow((nd[i][j] - nd[0][j]), 2);
      |                                        ^~~
a.cc:31:40: error: 'pow' was not declared in this scope
   31 |                                 kei += pow((nd[i][j] - nd[i + 1][j]), 2);
      |                                        ^~~
a.cc:35:25: error: 'sqrt' was not declared in this scope
   35 |                 kyori = sqrt(kei);
      |                         ^~~~
a.cc:36:21: error: 'ceil' was not declared in this scope
   36 |                 if (ceil(kyori) != floor(kyori)) {}
      |                     ^~~~
a.cc:36:36: error: 'floor' was not declared in this scope
   36 |                 if (ceil(kyori) != floor(kyori)) {}
      |                                    ^~~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <cstdio>
using namespace std;

int main(){
	int n,d;
	int i,j,k;
  	double x;

	cin >> n >> d;
	for(i=0; i<n; i++){
		for(j=0; j<d; j++){
			cin >> x[i][j];
		}
	}

	double t;
	int a=0;
	int count=0;

	for(i=1; i<n; i++){
	for(j=0; j<i; j++){
		for(k=0; k<d; k++){
			a = a + (x[i][k] - x[j][k])*(x[i][k] - x[j][k]);
		}
		t = sqrt(a);
		if(a == t*t){	//int型のaにぶち込むことで評価
			count++;
		}
	}
	}

	cout << count << endl;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:16:33: error: invalid types 'double[int]' for array subscript
   16 |                         cin >> x[i][j];
      |                                 ^
a.cc:27:35: error: invalid types 'double[int]' for array subscript
   27 |                         a = a + (x[i][k] - x[j][k])*(x[i][k] - x[j][k]);
      |                                   ^
a.cc:27:45: error: invalid types 'double[int]' for array subscript
   27 |                         a = a + (x[i][k] - x[j][k])*(x[i][k] - x[j][k]);
      |                                             ^
a.cc:27:55: error: invalid types 'double[int]' for array subscript
   27 |                         a = a + (x[i][k] - x[j][k])*(x[i][k] - x[j][k]);
      |                                                       ^
a.cc:27:65: error: invalid types 'double[int]' for array subscript
   27 |                         a = a + (x[i][k] - x[j][k])*(x[i][k] - x[j][k]);
      |                                                                 ^
a.cc:29:21: error: 'sqrt' was not declared in this scope
   29 |                 t = sqrt(a);
      |                     ^~~~
Language: C++

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

int inner(vector<int > p,vector<int>q){
int ans=0;
for(int i=0;i<p.size();i++)  ans+=p[i]*q[i};
return ans;
}

int main(){
int N,D;
cin>>N>>D;
vector<int> a[N];

for(int i=0;i<N;i++){
 for(int j=0;j<D;j++){
int s;
cin>>s;
a[i].push_back(s);
 }
}

int ans=0;

for(int i=0;i<N;i++){
 for(int j=i+1;j<N;j++){
double d=sqrt(inner(a[i],a[j]);
if (d==floor(d)) ans++;
 }
}
cout<<ans;

 return 0;
}

Compiler output:
a.cc: In function 'int inner(std::vector<int>, std::vector<int>)':
a.cc:6:43: error: expected ']' before '}' token
    6 | for(int i=0;i<p.size();i++)  ans+=p[i]*q[i};
      |                                           ^
      |                                           ]
a.cc:6:43: error: expected ';' before '}' token
    6 | for(int i=0;i<p.size();i++)  ans+=p[i]*q[i};
      |                                           ^
      |                                           ;
a.cc:6:43: warning: no return statement in function returning non-void [-Wreturn-type]
a.cc: At global scope:
a.cc:7:1: error: expected unqualified-id before 'return'
    7 | return ans;
      | ^~~~~~
a.cc:8:1: error: expected declaration before '}' token
    8 | }
      | ^
a.cc: In function 'int main()':
a.cc:27:31: error: expected ')' before ';' token
   27 | double d=sqrt(inner(a[i],a[j]);
      |              ~                ^
      |                               )
Language: C++


#include<stdio.h>
#include<math>
int main()
{
    int n,d,count;
    int x[n*d];
    float dist;   

    scanf("%d" "%d" , &n,&d);
  
    for(int i=1;i<=n;i++){
	for(int j=i+1;j<=n;j++){
		dist = 0;
        	for(int k=1;k<=d;k++){
			dist=dist+(x[(i-1)*d+k]-x[(j-1)*d+k])**2;
				      }
		if( (int)sqrt(dist)-sqrt(dist)<0.000000001)
			count++;
    }}	

    printf("%d",count);
    return 0;
}

Compiler output:
a.cc:3:9: fatal error: math: No such file or directory
    3 | #include<math>
      |         ^~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <vector>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <string>
#include <algorithm>
#include <set>

using namespace std;

using ll = long long;

bool isPerfectSquare(long double x)
{
	// Find floating point value of  
	// square root of x. 
	long double sr = sqrt(x);

	// If square root is an integer 
	return ((sr - floor(sr)) == 0);
}

int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	int N, D, cnt = 0;
	cin >> N >> D;
	vector<vector<int>> X(N, vector<int>(D, 0));
	for (int i = 0; i < N; ++i) {
		for (int j = 0; j < D; ++j) {
			cin >> X[i][j];
		}
	}
	for (int i = 0; i < N - 1; ++i) {
		for (int j = i + 1; j < N; ++j) {
			int sum = 0;
			for (int k = 0; k < D; ++k) {
				sum += (X[i][k] - X[j][k]) * (X[i][k] - X[j][k]);
			}
			if (isPerfectSquare(sum)) {
				++cnt;
			}
		}
	}
	cout << cnt;
	//system("pause");
	return 0;
}

Compiler output:
a.cc: In function 'bool isPerfectSquare(long double)':
a.cc:18:26: error: 'sqrt' was not declared in this scope; did you mean 'sr'?
   18 |         long double sr = sqrt(x);
      |                          ^~~~
      |                          sr
a.cc:21:23: error: 'floor' was not declared in this scope
   21 |         return ((sr - floor(sr)) == 0);
      |                       ^~~~~
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
#include<iomanip>
#include<string>


using namespace std;

#define rep(i, n) for(int i = 0; i < n; i++)
#define repr(i, a, b) for (int i = a; i < b; i++)

#define INF 1050000000




int main() {

	int N,D;

	cin >> N>>D;

	double X[10][10];

	rep(i, N) {
		rep(j, D) {
			cin >> X[i][j];
		}
	}


	double sum = 0;

	int ans = 0;

	rep(i, N) {

		

		repr(j, i +1, N) {
			sum = 0;

			rep(k, D) {
				sum += (X[i][k] - X[j][k]) * (X[i][k] - X[j][k]);

			}

			

			sum = sqrt(sum);

			

			if (sum == int(sum))ans++;
		}
	}


	cout << ans << endl;




	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:51:31: error: 'sqrt' was not declared in this scope
   51 |                         sum = sqrt(sum);
      |                               ^~~~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>

using namespace std;

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

	int nd[10][10];

	for (int i =0; i<n; i++){
		for (int j =0; j<d; j++){
			cin >> nd[i][j];
		}
	}

	int count = 0;

	for (int i = 0; i < n; i++){
		double kyori = 0;
		double kei = 0;
		for (int j = 0; j < d; j++){
			if (i == n - 1){
				kei += pow((nd[i][j] - nd[0][j]), 2);
			}
			else{
				kei += pow((nd[i][j] - nd[i + 1][j]), 2);
			}
			
		}
		kyori = sqrt(kei);
		if (ceil(kyori) != floor(kyori)) {
			//printf("this is not an integer\n");
		}
		else {
			++count;
		}
	}
	cout << count << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:40: error: 'pow' was not declared in this scope
   28 |                                 kei += pow((nd[i][j] - nd[0][j]), 2);
      |                                        ^~~
a.cc:31:40: error: 'pow' was not declared in this scope
   31 |                                 kei += pow((nd[i][j] - nd[i + 1][j]), 2);
      |                                        ^~~
a.cc:35:25: error: 'sqrt' was not declared in this scope
   35 |                 kyori = sqrt(kei);
      |                         ^~~~
a.cc:36:21: error: 'ceil' was not declared in this scope
   36 |                 if (ceil(kyori) != floor(kyori)) {
      |                     ^~~~
a.cc:36:36: error: 'floor' was not declared in this scope
   36 |                 if (ceil(kyori) != floor(kyori)) {
      |                                    ^~~~~
Language: C++

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

int main(void){
  int N;//数
  int D;//次元
  scanf("%d %d", &N, &D);
  
  int x[10][10];//最大10*10
  for(int i = 0; i < N; i++){
    for(int j = 0; j < D; j++){
      scanf("%d", &x[i][j]);
    }
  }
  
  cnt = 0;
  double rlt_1 = 0.0;
  double rlt_2 = 0.0;
  // 1 2 ・・・1 5,  2 3 ・・・ 2 5,・・・, 4 5
  for(int i = 0; i < N - 1; i++){
    for(int j = i + 1; j < N; j++){
      rlt_1 = 0.0;
      rlt_2 = 0.0;
      for(int k = 0; k < D; k++){
        rlt_2 += abs(x[i][k] - x[j][k]);
      }
      rlt_1 += sqrt(  rlt_2 );
      if( pow(rlt_1, 2) == rlt_2 ){
      	cnt++;
      }
    }
  }
  
  printf("%d", rlt_1);
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:3: error: 'cnt' was not declared in this scope; did you mean 'int'?
   17 |   cnt = 0;
      |   ^~~
      |   int
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
using namespace std;
signed main() {
	int n, d; cin >> n >> d;
	int x[50][50], ans=0;
	for (int i = 0; i < n; i++)for (int j = 0; j < d; j++)cin >> x[i][j];
	for (int i = 0; i < n; i++) {
		for (int j = i + 1; j < n; j++) {
			double sum = 0;
			for (int k = 0; k < d; k++)sum += pow(x[i][k] - x[j][k], 2);
			sum = sqrt(sum);
			if (sum == (double)(int)sum)ans++;
		}
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:59: error: 'pow' was not declared in this scope
   13 |                         for (int k = 0; k < d; k++)sum += pow(x[i][k] - x[j][k], 2);
      |                                                           ^~~
a.cc:14:31: error: 'sqrt' was not declared in this scope
   14 |                         sum = sqrt(sum);
      |                               ^~~~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>



int main()
{
	int n, d;
	std::cin >> n >> d;
	double points[10][10] = {};
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < d; j++) {
			std::cin >> points[i][j];
		}
	}

	double temp;
	double result;
	int count = 0;
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < i; j++) {
			temp = 0;
			for (int k = 0; k < d; k++) {
				temp += pow(points[i][k] - points[j][k], 2);
				//std::cout << points[i][k] << "  " << points[j][k] << "   " << pow(points[i][k] - points[j][k], 2) << std::endl;
			}
			result = sqrt(temp);
			//std::cout << "result " << result << std::endl;
			if (std::ceil(result) == result)
				count++;
		}
	}

	std::cout << count << std::endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:41: error: 'pow' was not declared in this scope
   26 |                                 temp += pow(points[i][k] - points[j][k], 2);
      |                                         ^~~
a.cc:29:34: error: 'sqrt' was not declared in this scope
   29 |                         result = sqrt(temp);
      |                                  ^~~~
a.cc:31:34: error: 'ceil' is not a member of 'std'
   31 |                         if (std::ceil(result) == result)
      |                                  ^~~~
Language: Java

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package gooddistance;

import static java.lang.Math.sqrt;
import java.util.Scanner;

/**
 *
 * @author cs18097
 */
public class main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int d = sc.nextInt();
        int count = 0;
        int sum = 0;
        int del[] = new int[d];
        //int count = 0;
        int[][] point = new int[n][d];
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < d; j++) {
                point[i][j] = sc.nextInt();
            }
        }
        for (int i = 0; i < n; i++) {
            for (int j = i + 1; j < n; j++) {
                for (int k = 0; k < d; k++) {
                    sum += (point[i][k] -point[j][k])*(point[i][k] -point[j][k]);
                }
                double k = sqrt(sum);
                if ( k== (int) k) {
                    count++;
                }
                sum = 0;
            }
        }
        System.out.print(count);
    }

}


Compiler output:
Main.java:15: error: class main is public, should be declared in a file named main.java
public class main {
       ^
1 error
Language: C++

#include <iostream>
#include <math.h>
#include<stdio.h>
using namespace std;

int main() {
  int i,j,k;
  int N, D;
  cin >> N >> D;
  int a[N][D];
  for (int i = 0; i < N; ++i) {
    for(int j=0;j<D;++j){
      cin >> a[i][j];
    }
  }
  int cnt=0;
  double sum;
  for (i=0;i<N;++i){
    for (j=i+1;j<N;++j){
      sum=0;
      for (k=0;k<N;++k){
        sum+=pow((double)a[i][k]-(double)a[j][k],2.0);
      }
      sum=sqrt(sum)
      if(sum==(double)(int)sum){
        cnt++;
      }
    }
  }
  cout << cnt << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:20: error: expected ';' before 'if'
   24 |       sum=sqrt(sum)
      |                    ^
      |                    ;
   25 |       if(sum==(double)(int)sum){
      |       ~~
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <cstdio>
using namespace std;

int main(){
	int n,d,x;
	int i,j,k;

	cin >> n >> d;
	for(i=0; i<n; i++){
		for(j=0; j<d; j++){
			cin >> x[i][j];
		}
	}

	double t;
	int a=0;
	int count=0;

	for(i=1; i<n; i++){
	for(j=0; j<i; j++){
		for(k=0; k<d; k++){
			a = a + (x[i][k] - x[j][k])*(x[i][k] - x[j][k]);
		}
		t = sqrt(a);
		if(a == t*t){	//int型のaにぶち込むことで評価
			count++;
		}
	}
	}

	cout << count << endl;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:15:33: error: invalid types 'int[int]' for array subscript
   15 |                         cin >> x[i][j];
      |                                 ^
a.cc:26:35: error: invalid types 'int[int]' for array subscript
   26 |                         a = a + (x[i][k] - x[j][k])*(x[i][k] - x[j][k]);
      |                                   ^
a.cc:26:45: error: invalid types 'int[int]' for array subscript
   26 |                         a = a + (x[i][k] - x[j][k])*(x[i][k] - x[j][k]);
      |                                             ^
a.cc:26:55: error: invalid types 'int[int]' for array subscript
   26 |                         a = a + (x[i][k] - x[j][k])*(x[i][k] - x[j][k]);
      |                                                       ^
a.cc:26:65: error: invalid types 'int[int]' for array subscript
   26 |                         a = a + (x[i][k] - x[j][k])*(x[i][k] - x[j][k]);
      |                                                                 ^
a.cc:28:21: error: 'sqrt' was not declared in this scope
   28 |                 t = sqrt(a);
      |                     ^~~~
Language: C++

#include <iostream>
#include <math.h>
using namespace std;

int main(){
  int N, D;
  
  int a[21][11];
  
  cin >> N >> D;
  
  for (int i = 0; i < N; i++){
    for (int d = 0; d < D; d++){
      cin >> a[i][d];
    }
  }
  
  int counter = 0;
  
  for (int i = 0; i <N; i++){
    for (int j = 0; j< i; j++){
      int ds = 0;
      for (int d = 0; d < D; d++){
        ds +=  (a[i][d] - a[j][d]) ** 2;
      }
      float d = sqrt(ds);
      if (ceil(d) == floor(d)){
        counter+=1;
      }
    }
  }
  
  cout <<  counter << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:37: error: invalid type argument of unary '*' (have 'int')
   24 |         ds +=  (a[i][d] - a[j][d]) ** 2;
      |                                     ^~~
Language: C++

#include<iostream>
#include<vector>

using namespace std;

int main() {
    int N, D;

    vector<int> squareNums;

    // 平方数計算
    for(int i = 0; i * i < 20000; i++){
        squareNums.push_back(i * i);
    }

    cin >> N >> D;

    int X[N][D];

    // 入力
    for(int i = 0; i < N; i++) {
        for(int j = 0; j < D; j++) {
            cin >> X[i][j];
        }
    }

    int counter = 0;

    for(int i = 0; i < N - 1; i++) {
        for(int j = i + 1; j < N; j++) {
            int judge = 0;
            for(int k = 0; k < D; k++) {
                judge += (X[i][k] - X[j][k]) * (X[i][k] - X[j][k]);
            }
            if(find(squareNums.begin(), squareNums.end(), judge) != squareNums.end()){
                counter++;
            }
        }
    }

    cout << counter << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:20: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
   35 |             if(find(squareNums.begin(), squareNums.end(), judge) != squareNums.end()){
      |                ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:35:20: note:   '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   35 |             if(find(squareNums.begin(), squareNums.end(), judge) != squareNums.end()){
      |                ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
using namespace std;
#include <algorithm>
int main() {
	// your code goes here
	int n,d;
	cin>>n>>d;
	int a[n][d];
	for(int x=0;x<n;x++)
	{
	    for(int y=0;y<d;y++)
	    cin>>a[x][y];
	}
	int c=0,s=0;
	for(int x=0;x<n-1;x++)
	{
	    for(int y=x+1;y<n;y++)
	    {
	        s=0;
	        for(int z=0;z<d;z++)
	        {
	            s+=pow(abs(a[x][z]-a[y][z]),2);
	        }
	         double dis=sqrt(s);
	        int d1=sqrt(s);
	        if((double)d1==dis)
	      c++;
	    }
	    
	}
	
	cout<<c<<endl;
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:24: error: 'pow' was not declared in this scope
   22 |                     s+=pow(abs(a[x][z]-a[y][z]),2);
      |                        ^~~
a.cc:24:29: error: 'sqrt' was not declared in this scope
   24 |                  double dis=sqrt(s);
      |                             ^~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <cstdio>
using namespace std;

int main(){
	int n,d,x;
	int i,j,k;

	cin >> n >> d;
	for(i=0; i<n; i++){
		for(j=0; j<d; j++){
			cin >> x[i,j];
		}
	}

	double t;
	int a=0;
	int count=0;

	for(i=1; i<n; i++){
	for(j=0; j<i; j++){
		for(k=0; k<d; k++){
			a = a + (x[i,k] - x[j,k])*(x[i,k] - x[j,k]);
		}
		t = sqrt(a);
		if(a == t*t){	//int型のaにぶち込むことで評価
			count++;
		}
	}
	}

	cout << count << endl;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:15:33: error: invalid types 'int[int]' for array subscript
   15 |                         cin >> x[i,j];
      |                                 ^
a.cc:26:35: error: invalid types 'int[int]' for array subscript
   26 |                         a = a + (x[i,k] - x[j,k])*(x[i,k] - x[j,k]);
      |                                   ^
a.cc:26:44: error: invalid types 'int[int]' for array subscript
   26 |                         a = a + (x[i,k] - x[j,k])*(x[i,k] - x[j,k]);
      |                                            ^
a.cc:26:53: error: invalid types 'int[int]' for array subscript
   26 |                         a = a + (x[i,k] - x[j,k])*(x[i,k] - x[j,k]);
      |                                                     ^
a.cc:26:62: error: invalid types 'int[int]' for array subscript
   26 |                         a = a + (x[i,k] - x[j,k])*(x[i,k] - x[j,k]);
      |                                                              ^
a.cc:28:21: error: 'sqrt' was not declared in this scope
   28 |                 t = sqrt(a);
      |                     ^~~~
Language: C++

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

double pdistance(double X[], double Y[], double n) {
    double sum = 0;
    for (int i = 0; i < n; i++) sum += pow(Y[i] - X[i], 2);
    sum = sqrt(sum);
    return sum;
}

int main() {
    int N, D;
    double X[10][10];

    cin >> N >> D;
    for (int i = 0; i < N; i++) {
        for (int j = 0; j < D; j++) {
            cin >> X[i][j];
        }
    }

    int cnt = 0;
    for (int i = 0; i < N; i++) {
        for (int j = i + 1; j < N; j++) {
            double d = pdistance(X[i], X[j], D);
            //cout << "(" << i << "," << j << ") " << d << endl;
            if (ceil(d) == d) cnt++;
        }
    }

    cout << cnt << endl;

    return 0;
}

Compiler output:
a.cc: In function 'double pdistance(double*, double*, double)':
a.cc:8:40: error: 'pow' was not declared in this scope
    8 |     for (int i = 0; i < n; i++) sum += pow(Y[i] - X[i], 2);
      |                                        ^~~
a.cc:9:11: error: 'sqrt' was not declared in this scope
    9 |     sum = sqrt(sum);
      |           ^~~~
a.cc: In function 'int main()':
a.cc:29:17: error: 'ceil' was not declared in this scope
   29 |             if (ceil(d) == d) cnt++;
      |                 ^~~~
Language: C++

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

int main()
{
	int N, D, answer = 0;
	cin >> N >> D;
	vector<vector<int>> X(N, vector<int>(D));
	for(int i = 0; i < N; i++)
	{
		for(int j = 0; j < D; j++)
		{
			cin >> X.at(i).at(j);
		}
	}

	for(int i = 0; i < N - 1; i++)
	{
		for(int j = i + 1; j < N; j++)
		{
			int   temp = 0;
			int   intScrt;
			float floatScrt;

			for(int k = 0; k < D; k++)
			{
				temp += pow(X.at(i).at(k) - X.at(j).at(k), 2);
			}

			intScrt   = sqrt(temp);
			floatScrt = sqrt(temp);

			if(intScrt == floatScrt)
			{
				answer++;
			}
		}
	}

	cout << answer << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:41: error: 'pow' was not declared in this scope
   29 |                                 temp += pow(X.at(i).at(k) - X.at(j).at(k), 2);
      |                                         ^~~
a.cc:32:37: error: 'sqrt' was not declared in this scope
   32 |                         intScrt   = sqrt(temp);
      |                                     ^~~~
Language: C

//#include "pch.h"
#include "stdio.h"
#include "stdlib.h"
#include "math.h"

int square(int a)
{
	return a * a;
}

int isint(int *data, int i, int j, int D)
{
	int nSum = 0;
	for (int k = 0; k < D; k++)
		nSum += square(data[i * D + k] - data[j * D + k]);

	if (square(int(sqrt(nSum))) == nSum)
		return 1;
	else
		return 0;
}

int main()
{
	int N, D;
	scanf("%d %d", &N, &D);
	int *data = (int *)malloc(sizeof(int) * N * D);

	for (int i = 0; i < N * D; i++)
		scanf("%d", &data[i]);

	int nCount = 0;
	for (int i = 0; i < N - 1; i++)
	{
		for (int j = i + 1; j < N; j++)
		{
			if (isint(data, i, j, D))
				nCount++;
		}
	}

	printf("%d", nCount);

	return 0;
}

Compiler output:
main.c: In function 'isint':
main.c:17:20: error: expected expression before 'int'
   17 |         if (square(int(sqrt(nSum))) == nSum)
      |                    ^~~