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

#include<iostream>
#include<cmath>
using namespace std;
int check(int a){
    bool f=0;
    for(int i=1;i*i<=a;i++){
        if(i*i==a){f=1;break;}
    }
    return f;
}
int n,d,cnt;
int main(){
    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[i][j];
        }
    }
    
    for(int i=0;i<n;i++){
        for(int j=i+1;j<n;j++){
            int sum=0;
            for(int k=0;k<d;k++){
                int p=abs(x[i][k]-x[j][k]);
                sum+=p*p;
            }
            if(check(sum))cnt++;
        }
    }
    cout<<cnt<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:5: error: 'vector' was not declared in this scope
   14 |     vector<vector<int> > x(n,vector<int>(d));
      |     ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include<cmath>
  +++ |+#include <vector>
    3 | using namespace std;
a.cc:14:19: error: expected primary-expression before 'int'
   14 |     vector<vector<int> > x(n,vector<int>(d));
      |                   ^~~
a.cc:17:18: error: 'x' was not declared in this scope
   17 |             cin>>x[i][j];
      |                  ^
a.cc:25:27: error: 'x' was not declared in this scope
   25 |                 int p=abs(x[i][k]-x[j][k]);
      |                           ^
Language: C++

#include <iostream>
#include <math.h>
using namespace std;
int main()
{
  int n,d,ans=0;
  float dist;
  cin>>n>>d;
  int x[n][d];
  for(int i=1;i<=n;i++)
  {
    for(int j=1;i<=d;j++)
    {
      cin>>x[j][i];
    }
  }
  
  for(int k=1;k<=n;k++)
  {
    for(int i=k+1;i<=n;i++)
    {
      dist=0;
      for(int j=1;j<=d;j++)
      {
        dist+=pow((x[k][d]-x[j][d]),2)
      }
      dist=pow(dist,0.5);
      if((float)((int)dist)==dist)ans++;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:39: error: expected ';' before '}' token
   25 |         dist+=pow((x[k][d]-x[j][d]),2)
      |                                       ^
      |                                       ;
   26 |       }
      |       ~
Language: C++

#include <iostream>
#include <math.h>
using namespace std;
int main()
{
  int n,d,ans=0;
  float dist;
  cin>>n>>d;
  int x[n][d];
  for(int i=1;i<=n;i++)
  {
    for(int j=1;i<=d;j++)
    {
      cin>>x[j][i];
    }
  }
  
  for(int k=1;k<=n;k++)
  {
    for(int i=k+1;i<=n;i++)
    {
      dist=0;
      for(int j=1;j<=d;j++)
      {
        dist+=pow((x[k][d]-x[j][d]),2)
      }
      dist=pow(dist,0.5)
      if((float)((int)dist)==dist)ans++;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:39: error: expected ';' before '}' token
   25 |         dist+=pow((x[k][d]-x[j][d]),2)
      |                                       ^
      |                                       ;
   26 |       }
      |       ~                                
a.cc:27:25: error: expected ';' before 'if'
   27 |       dist=pow(dist,0.5)
      |                         ^
      |                         ;
   28 |       if((float)((int)dist)==dist)ans++;
      |       ~~
Language: C++

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

int main()
{
  int n, d;
  std::cin >> n >> d;
  std::vector<std::vector<int>> pos(n, std::vector<int>(d));
  for(int i=0; i<n; i++)
    for(int j=0; j<d; j++)
      std::cin >> pos[i][j];
  int count=0;
  for(int i=0; i<n-1; i++)
    for(int j=0; j<n; j++)
    {
      double d2=0.0;
      for(int k=0; k<d; k++)
        d2 += pow(static_cast<double>(pos[i][k]-pos[j][k]), 2.0);
      if(d2 == pow((double)((int)sqrt(d2)),2.0)
         count++;
    }
  std::cout << count << std::endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:48: error: expected ';' before 'count'
   20 |       if(d2 == pow((double)((int)sqrt(d2)),2.0)
      |                                                ^
      |                                                ;
   21 |          count++;
      |          ~~~~~                                  
a.cc:22:5: error: expected primary-expression before '}' token
   22 |     }
      |     ^
a.cc:21:18: error: expected ')' before '}' token
   21 |          count++;
      |                  ^
      |                  )
   22 |     }
      |     ~             
a.cc:20:9: note: to match this '('
   20 |       if(d2 == pow((double)((int)sqrt(d2)),2.0)
      |         ^
a.cc:22:5: error: expected primary-expression before '}' token
   22 |     }
      |     ^
Language: C

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

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

int main(void){
	int N,D,I,ii,ans(0),mus(0);
	double *a;
	scanf("%d %d",&N,&D);
	int X[N][D];
	rep(i,N){
		rep(I,D){
			scanf("%d",&X[i][I]);
		}
		
	}
	rep(i,N){
		for(I = i + 1 ; I < N ; I ++){
			rep(ii,D){
				mus += int(pow(fabs(double(X[i][ii] - X[I][ii])),2.));
			}
			if(0 == modf(sqrt(double(mus)),a)) ans ++;
			mus = 0;
		}
	}
	printf("%d\n",ans);
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:26: error: expected declaration specifiers or '...' before numeric constant
    9 |         int N,D,I,ii,ans(0),mus(0);
      |                          ^
main.c:22:33: error: 'mus' undeclared (first use in this function)
   22 |                                 mus += int(pow(fabs(double(X[i][ii] - X[I][ii])),2.));
      |                                 ^~~
main.c:22:33: note: each undeclared identifier is reported only once for each function it appears in
main.c:22:40: error: expected expression before 'int'
   22 |                                 mus += int(pow(fabs(double(X[i][ii] - X[I][ii])),2.));
      |                                        ^~~
main.c:24:43: error: expected expression before 'double'
   24 |                         if(0 == modf(sqrt(double(mus)),a)) ans ++;
      |                                           ^~~~~~
main.c:24:60: error: 'ans' undeclared (first use in this function); did you mean 'abs'?
   24 |                         if(0 == modf(sqrt(double(mus)),a)) ans ++;
      |                                                            ^~~
      |                                                            abs
Language: C++

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

int main(){
	int N, S;
	cin >> N >> S;
	vector<vector<int>> X(D, vector<int> (N));
	for(int i = 0; i < N; i++){
		for(int j = 0; j < D; j++){
			cin >>  X.at(i).at(j);
		}
	}
	
	int cnt = 0;
	for(int i = 0; i < N; i++){
		int dis = 0;
		for(int j = i + 1; j < N; j++){
			for(int k = 0; k < D; k++){
				dis += (X.at(i).at(k) - X.at(j).at(k)) * (X.at(i).at(k) - X.at(j).at(k));
			}
			double C = sqrt(dis);
			dis = sqrt(dis);
			if(C == dis) cnt++;
		}
	}
	cout << cnt << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:31: error: 'D' was not declared in this scope
    7 |         vector<vector<int>> X(D, vector<int> (N));
      |                               ^
Language: C++

#include<cstdio>
#include<cmath>

double distance(int D, int *X){
  double s=0;
  for(int i=0;i<D; i++){
    s+=X[i]^2;
  }
  return sqrt(s);
}

int main(){
  int N, D;
  scanf("%d %d",&N, &D);
  int X[10][10];
  for(int i=0; i<N; i++){
    for(int j=0; j<D; j++){
      scanf("%d", &X[i][j]);
    }
  }
  
  int c=0;
  double verysmall=0.0000001;
  for(int i=0; i<N; i++){
    for(int j=0; j<N; j++){
      if((int)(distance(D,X[i],X[j]))-verysmall<=distance(D,X[i],X[j]) &&
         		distance(D,X[i],X[j})<=(int)(distance(D,X[i],X[j]))+verysmall){
        c++;
      }
    }
  }
  printf("%d\n",c);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:24: error: too many arguments to function 'double distance(int, int*)'
   26 |       if((int)(distance(D,X[i],X[j]))-verysmall<=distance(D,X[i],X[j]) &&
      |                ~~~~~~~~^~~~~~~~~~~~~
a.cc:4:8: note: declared here
    4 | double distance(int D, int *X){
      |        ^~~~~~~~
a.cc:26:58: error: too many arguments to function 'double distance(int, int*)'
   26 |       if((int)(distance(D,X[i],X[j]))-verysmall<=distance(D,X[i],X[j]) &&
      |                                                  ~~~~~~~~^~~~~~~~~~~~~
a.cc:4:8: note: declared here
    4 | double distance(int D, int *X){
      |        ^~~~~~~~
a.cc:27:44: error: expected ']' before '}' token
   27 |                         distance(D,X[i],X[j})<=(int)(distance(D,X[i],X[j]))+verysmall){
      |                                            ^
      |                                            ]
a.cc:27:44: error: expected ')' before '}' token
   27 |                         distance(D,X[i],X[j})<=(int)(distance(D,X[i],X[j]))+verysmall){
      |                                 ~          ^
      |                                            )
a.cc:27:44: error: expected ')' before '}' token
   27 |                         distance(D,X[i],X[j})<=(int)(distance(D,X[i],X[j]))+verysmall){
      |                                            ^
      |                                            )
a.cc:26:9: note: to match this '('
   26 |       if((int)(distance(D,X[i],X[j]))-verysmall<=distance(D,X[i],X[j]) &&
      |         ^
a.cc:27:44: error: expected primary-expression before '}' token
   27 |                         distance(D,X[i],X[j})<=(int)(distance(D,X[i],X[j]))+verysmall){
      |                                            ^
a.cc:27:45: error: expected primary-expression before ')' token
   27 |                         distance(D,X[i],X[j})<=(int)(distance(D,X[i],X[j]))+verysmall){
      |                                             ^
a.cc: At global scope:
a.cc:32:9: error: expected constructor, destructor, or type conversion before '(' token
   32 |   printf("%d\n",c);
      |         ^
a.cc:33:1: error: expected declaration before '}' token
   33 | }
      | ^
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <fstream>
#include <string>
#include <bitset>
#include <stack>
#include <map>

using namespace std;

int d;

int is_int_dist(vector<int> a, vector<int> b) {
	long double distance = 0.0;
	for (int i = 0; i < d; i++) distance += pow(a[i] - b[i], 2);
	distance = sqrtl(distance);
	return floor(distance) == ceil(distance);
}

int main() {
	int n;
	vector<vector<int>> points;
	cin >> n >> d;
	for (int i = 0; i < n; i++) {
		vector<int> point;
		for (int j = 0; j < d; j++) {
			int tmp;
			cin >> tmp;
			point.push_back(tmp);
		}
		points.push_back(point);
	}
	int ans = 0;
	for (int i = 0; i < n; i++) {
		for (int j = i + 1; j < n; j++) {
			ans += is_int_dist(points[i], points[j]);
		}
	}
	cout << ans;
}

Compiler output:
a.cc: In function 'int is_int_dist(std::vector<int>, std::vector<int>)':
a.cc:16:49: error: 'pow' was not declared in this scope
   16 |         for (int i = 0; i < d; i++) distance += pow(a[i] - b[i], 2);
      |                                                 ^~~
a.cc:17:20: error: 'sqrtl' was not declared in this scope; did you mean 'strtol'?
   17 |         distance = sqrtl(distance);
      |                    ^~~~~
      |                    strtol
a.cc:18:16: error: 'floor' was not declared in this scope
   18 |         return floor(distance) == ceil(distance);
      |                ^~~~~
a.cc:18:35: error: 'ceil' was not declared in this scope
   18 |         return floor(distance) == ceil(distance);
      |                                   ^~~~
Language: C

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

int main(){
  int N,D,i,j,count,k,s;
  double R;
  scanf("%d%d",&N,&D);
  int X[N][D];
  for(i=0;i<N;i++){
    for(j=0;j<D;j++){
      scanf("%d",&X[j][i]);
    }
    for(s=0;s<i;s++){
      for(j=0;j<N;j++){
        k += (X[s][j] - X[i][j])*(X[s][j] - X[i][j]);
      }
      R = sqrt(k);
      if(ceil(R) == floor(R)){
        count++;
      }
    }
    printf("%d",count);
  }

      
      

Compiler output:
main.c: In function 'main':
main.c:23:3: error: expected declaration or statement at end of input
   23 |   }
      |   ^
Language: C

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

int main(){
  int N,D,i,j,count,k,s;
  double R;
  scanf("%d%d",%N,%D);
  int X[N][D];
  for(i=0;i<N;i++){
    for(j=0;j<D;j++){
      scanf("%d",&X[j][i]);
    }
    for(s=0;s<i;s++){
      for(j=0;j<N;j++){
        k += (X[s][j] - X[i][j])*(X[s][j] - X[i][j]);
      }
      R = sqrt(k);
      if(ceil(R) == floor(R)){
        count++;
      }
    }
    printf("%d",count);
  }

      
      

Compiler output:
main.c: In function 'main':
main.c:7:16: error: expected expression before '%' token
    7 |   scanf("%d%d",%N,%D);
      |                ^
main.c:23:3: error: expected declaration or statement at end of input
   23 |   }
      |   ^
Language: C

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

int main(){
  int N,D,i,j,count,k;
  double R;
  scanf("%d%d",%N,%D);
  int X[N][D];
  for(i=0;i<N;i++){
    for(j=0;j<D;j++){
      scanf("%d",&X[j][i]);
    }
    for(s=0;s<i;s++){
      for(j=0;j<N;j++){
        k += (X[s][j] - X[i][j])*(X[s][j] - X[i][j]);
      }
      R = sqrt(k);
      if(ceil(R) == floor(R)){
        count++;
      }
    }
    printf("%d",count);
  }

      
      

Compiler output:
main.c: In function 'main':
main.c:7:16: error: expected expression before '%' token
    7 |   scanf("%d%d",%N,%D);
      |                ^
main.c:13:9: error: 's' undeclared (first use in this function)
   13 |     for(s=0;s<i;s++){
      |         ^
main.c:13:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:23:3: error: expected declaration or statement at end of input
   23 |   }
      |   ^
Language: C

#include<stdio.h>

int main(void)
{ 
  int d,n,i,j,k,cnt,dis;
  double distance;
  int za[10][10]={0};
  scanf("%d %d",&n,&d);
 k=cnt=dis=0;
 distance=0;
 for(i=0;i<n;i++){
   for(k=0;k<d;k++){
     scanf("%d",&j);
     za[i][k]=j;
   }
 }
　for(i=0;i<n;i++)
  for(k=i+1;k<n;k++){ 
    dis=distance=0;
   for(j=0;j<d;j++)
    dis+=(za[i][j]-za[k][j])*(za[i][j]-za[k][j]);
    distance=sqrt((double)dis);
    dis=sqrt(dis);
    if(distance==dis)cnt++;
 }
 printf("%d",cnt);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:1: error: stray '\343' in program
   17 | <U+3000>for(i=0;i<n;i++)
      | ^~~~~~~~
main.c:22:14: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   22 |     distance=sqrt((double)dis);
      |              ^~~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'sqrt'
    1 | #include<stdio.h>
  +++ |+#include <math.h>
    2 | 
main.c:22:14: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
   22 |     distance=sqrt((double)dis);
      |              ^~~~
main.c:22:14: note: include '<math.h>' or provide a declaration of 'sqrt'
Language: C++

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

int main() {
    uint n, d; cin >> n >> d;
    int a[n][d];
    int count = 0;

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

    // i行とj行を比較する
    for (int i=0;i<n;i++) for(int j=i+1;j<n;j++){
        int dist = 0;
        for (int k=0;k<d;k++){
            dist += (a[i][k] - a[j][k]) * (a[i][k] - a[j][k]);
        }

        if ((int) sqrt(dist) * (int) sqrt(dist) == dist) {
            count++;
        }
    }

    cout << count << endl;
    return 0;
}

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

#include <stdio.h>
int dis(int (*A)[30], int a, int b);//a番目とb番目の距離
int sq(int s);//平方数の判定

int main(void){
  int N, D, i, j, x[30][30], ans=0;
  scanf("%d %d", &N, &D);
  for(i=1; i<=N; i++){
    for(j=1; j<=D; j++){
      scanf("%d", &x[i][j]);
    }
  }
  for(i=1; i<N; i++){
    for(j=i+1; j<=N; j++){
      ans += dis(x, i, j, D);
    }
  }
  printf("%d", ans);
  return 0;
}

int dis(int (*A)[30], int a, int b, int D){
  int sum=0, i;
  for(i=1; i<=D; i++){
    sum += (A[a][i] - A[b][i])*(A[a][i] - A[b][i]);
  }
  return sq(sum);
}
int sq(int s){
  int i;
  if(s == 1) return 1;
  for(i=2; i*i <= s; i++){
    if(s == i*i) return 1;
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:14: error: too many arguments to function 'dis'
   15 |       ans += dis(x, i, j, D);
      |              ^~~
main.c:2:5: note: declared here
    2 | int dis(int (*A)[30], int a, int b);//a番目とb番目の距離
      |     ^~~
main.c: At top level:
main.c:22:5: error: conflicting types for 'dis'; have 'int(int (*)[30], int,  int,  int)'
   22 | int dis(int (*A)[30], int a, int b, int D){
      |     ^~~
main.c:2:5: note: previous declaration of 'dis' with type 'int(int (*)[30], int,  int)'
    2 | int dis(int (*A)[30], int a, int b);//a番目とb番目の距離
      |     ^~~
Language: C

#include <stdio.h>
int dis(int (*A)[30], int a, int b);//a番目とb番目の距離
int sq(int s);//平方数の判定

int main(void){
  int N, D, i, j, x[30][30], ans=0;
  scanf("%d %d", &N, &D);
  for(i=1; i<=N; i++){
    for(j=1; j<=D; j++){
      scanf("%d", &x[i][j]);
    }
  }
  for(i=1; i<N; i++){
    for(j=i+1; j<=N; j++){
      ans += dis(x, i, j, D)
    }
  }
  printf("%d", ans);
  return 0;
}

int dis(int (*A)[30], int a, int b, int D){
  int sum=0, i;
  for(i=1; i<=D; i++){
    sum += (A[a][i] - A[b][i])*(A[a][i] - A[b][i]);
  }
  return sq(sum);
}
int sq(int s){
  int i;
  if(s == 1) return 1;
  for(i=2; i*i <= s; i++){
    if(s == i*i) return 1;
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:14: error: too many arguments to function 'dis'
   15 |       ans += dis(x, i, j, D)
      |              ^~~
main.c:2:5: note: declared here
    2 | int dis(int (*A)[30], int a, int b);//a番目とb番目の距離
      |     ^~~
main.c:15:29: error: expected ';' before '}' token
   15 |       ans += dis(x, i, j, D)
      |                             ^
      |                             ;
   16 |     }
      |     ~                        
main.c: At top level:
main.c:22:5: error: conflicting types for 'dis'; have 'int(int (*)[30], int,  int,  int)'
   22 | int dis(int (*A)[30], int a, int b, int D){
      |     ^~~
main.c:2:5: note: previous declaration of 'dis' with type 'int(int (*)[30], int,  int)'
    2 | int dis(int (*A)[30], int a, int b);//a番目とb番目の距離
      |     ^~~
Language: C

#include <stdio.h>
int dis(int (*A)[30], int a, int b);//a番目とb番目の距離
int sq(int s);//平方数の判定

int main(void){
  int N, D, i, j, x[30][30], ans=0;
  scanf("%d %d", &N, &D);
  for(i=1; i<=N, i++){
    for(j=1; j<=D; j++){
      scanf("%d", &x[i][j]);
    }
  }
  for(i=1; i<N; i++){
    for(j=i+1; j<=N; j++){
      ans += dis(x, i, j, D)
    }
  }
  printf("%d", ans);
  return 0;
}

int dis(int (*A)[30], int a, int b, int D){
  int sum=0, i;
  for(i=1; i<=D; i++){
    sum += (A[a][i] - A[b][i])*(A[a][i] - A[b][i]);
  }
  return sq(sum);
}
int sq(int s){
  int i;
  if(s == 1) return 1;
  for(i=2; i*i <= s; i++){
    if(s == i*i) return 1;
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:21: error: expected ';' before ')' token
    8 |   for(i=1; i<=N, i++){
      |                     ^
      |                     ;
main.c:15:14: error: too many arguments to function 'dis'
   15 |       ans += dis(x, i, j, D)
      |              ^~~
main.c:2:5: note: declared here
    2 | int dis(int (*A)[30], int a, int b);//a番目とb番目の距離
      |     ^~~
main.c:15:29: error: expected ';' before '}' token
   15 |       ans += dis(x, i, j, D)
      |                             ^
      |                             ;
   16 |     }
      |     ~                        
main.c: At top level:
main.c:22:5: error: conflicting types for 'dis'; have 'int(int (*)[30], int,  int,  int)'
   22 | int dis(int (*A)[30], int a, int b, int D){
      |     ^~~
main.c:2:5: note: previous declaration of 'dis' with type 'int(int (*)[30], int,  int)'
    2 | int dis(int (*A)[30], int a, int b);//a番目とb番目の距離
      |     ^~~
Language: C++

#include<iostream>
using namespace std;

int main(){
  int n,d,i,k;
  int c=0,l=0;
  cin>>n>>d;
  s[n][d];
  
  for(i=0;i<n;i++){
    for(k=0;k<d;k++){
      cin>>s[i][k];
    }
  }
  
  for(i=0;i<n;i++){
    for(k=i+1;k<n;k++){
      for(int j=0;j<d;j++){
        l += (s[i][j]-s[k][j])*(s[i][j]-s[k][j]);
      }
      if(modf(sqrt(l))==0) c+=1;
    }
  }
  
  cout<<c<<endl;
  return 0;
}
         
         
    
         

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 's' was not declared in this scope
    8 |   s[n][d];
      |   ^
a.cc:21:15: error: 'sqrt' was not declared in this scope
   21 |       if(modf(sqrt(l))==0) c+=1;
      |               ^~~~
a.cc:21:10: error: 'modf' was not declared in this scope
   21 |       if(modf(sqrt(l))==0) c+=1;
      |          ^~~~
Language: C++

#include<iostream>
#include<vector>

int main(void)
{
	int N, D;

	std::cin >> N;
	std::cin >> D;

	std::vector<std::vector<int>> X;

	X.push_back(std::vector<int>());

	for (int i = 0; i < N; i++) {
		std::vector<int> tmp;
		tmp.push_back(0);
		int buf;
		for (int j = 0; j < D; j++) {
			std::cin >> buf;
					tmp.push_back(buf);
		}
		X.push_back(tmp);	
	}
	int cnt = 0;
	for (int i = 1; i < X.size() - 1; i++) {
		for (int j = i + 1; j < X.size(); j++) {
			double sum = 0;
			for (int k = 1; k <= D; k++) {
				sum += pow((X[i][k] - X[j][k]), 2);
			}
			sum = sqrt(sum);
			
			// 整数の判定
			if (ceil(sum) == floor(sum))
				cnt++;

		}
	}
	std::cout << cnt << std::endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:40: error: 'pow' was not declared in this scope
   30 |                                 sum += pow((X[i][k] - X[j][k]), 2);
      |                                        ^~~
a.cc:32:31: error: 'sqrt' was not declared in this scope
   32 |                         sum = sqrt(sum);
      |                               ^~~~
a.cc:35:29: error: 'ceil' was not declared in this scope
   35 |                         if (ceil(sum) == floor(sum))
      |                             ^~~~
a.cc:35:42: error: 'floor' was not declared in this scope
   35 |                         if (ceil(sum) == floor(sum))
      |                                          ^~~~~
Language: C++

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

int main() {
  int N, D;
  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[i][j];
    }
  }
  
  int ans = 0;
  
  for (int i = 0; i < N; i++) {
    for (int j = i+1; j < N; j++) {
      int dis = 0;
      for (int k = 0; k < D; k++) {
        int dif = abs(X[i][k]-X[j][k]);
        dis += dif * dif
      }
      for (int k = 0; k <= dis; k++) {
        if (k*k == dis) ans++;
      }
    }
  }
  
  cout << ans << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:25: error: expected ';' before '}' token
   21 |         dis += dif * dif
      |                         ^
      |                         ;
   22 |       }
      |       ~
Language: C++

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

int main() {
  int N, D;
  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[i][j];
    }
  }
  
  int ans = 0;
  
  for (int i = 0; i < N; i++) {
    for (int j = i+1; j < N; j++) {
      int dis = 0;
      for (int k = 0; k < D; k++) {
        int dif = abs(X[i][k]-X[j][k]);
        dis += dif * dif
      }
      for (int k = 0; k <= dis; k++) {
        if (k*k == norm) ans++;
      }
    }
  }
  
  cout << ans << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:25: error: expected ';' before '}' token
   21 |         dis += dif * dif
      |                         ^
      |                         ;
   22 |       }
      |       ~                  
a.cc:24:17: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator=='
   24 |         if (k*k == norm) ans++;
      |             ~~~~^~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){ 
int N,D;
cin>>N>>D;
  vector<vector<int> >data(N,vector<int>(D,0));
  for (int i=0; i<N; i++){
    for (int j=0; j<D; j++){
      cin >>data.at(i).at(j);
    }
  }
  int t=0;
 for (int i=0; i<N-1; i++){
   for (int k=i+1; k<N; k++){
     int s=0;
    for (int j=0; j<D; j++){
      s+=(data.at(k).at(j)-data.at(i).at(j))*(data.at(k).at(j)-data.at(i).at(j));
    }
  float o= sqrt(s);
     s=sqrt(s);
     if (s==o){
    t+=1;
   }
 }
 }
  cout<<t<<endl;
}
}
  

Compiler output:
a.cc:28:1: error: expected declaration before '}' token
   28 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){ 
int N,D;
cin>>N>>D;
  vector<vector<int> >data(N,vector<int>(D,0));
  for (int i=0; i<N; i++){
    for (int j=0; j<D; j++){
      cin >>data.at(i).at(j);
    }
  }
  int t=0;
 for (int i=0; i<N-1; i++){
   for (int k=i+1; k<N; k++){
     int s=0;
    for (int j=0; j<D; j++){
      s+=(data.at(k).at(j)-data.at(i).at(j))*(data.at(k).at(j)-data.at(i).at(j));
    }
  float o= sqrt(s);
     s=sqrt(s);
     if (s==o){
    t+=1;
   }
 }
 }
  cout<<t<<endl;
}<endl;
}
  

Compiler output:
a.cc:27:2: error: expected unqualified-id before '<' token
   27 | }<endl;
      |  ^
a.cc:28:1: error: expected declaration before '}' token
   28 | }
      | ^
Language: C++

int main() {
    int N, D, 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 res = 0;
    for (int i = 0; i < N - 1; i++) {
        for (int j = i + 1; j < N; j++) {
            int d = 0;
            for (int k = 0; k < D; k++) {
                d += (X[i][k] - X[j][k]) * (X[i][k] - X[j][k]);
            }
            int sq = sqrt(d);
            for (int x = 0; i < sq + 1; i++) {
                if (x * x == d) {
                    res++;
                    break;
                }
            }
        }
    }
    cout << res << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin >> N >> D;
      |     ^~~
a.cc:16:22: error: 'sqrt' was not declared in this scope; did you mean 'sq'?
   16 |             int sq = sqrt(d);
      |                      ^~~~
      |                      sq
a.cc:25:5: error: 'cout' was not declared in this scope
   25 |     cout << res << endl;
      |     ^~~~
a.cc:25:20: error: 'endl' was not declared in this scope
   25 |     cout << res << endl;
      |                    ^~~~
Language: C++

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

int main(){
	int N;
	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);
		}
	}
	
	int cnt = 0;
	for(int i = 0; i < N; i++){
		for(int j = i + 1; j < N; j++){
			int dis = 0;
			for(int k = 0; k < D; k++){
				dis += (X.at(i).at(k) - X.at(j).at(k)) * (X.at(i).at(k) - X.at(j).at(k));
			}
			double diss = sqrt(dis);
			if(diss == floor(diss)) cnt++;
		}
	}
	cout << cnt << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:46: error: 'D' was not declared in this scope
    6 |         vector<vector<int>> X(N, vector<int>(D));
      |                                              ^
Language: C++

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

int main() {
	int, n, d;
	cin >> n >> d;
	vector<vector<int>> x(n, vector<int>(d));
	rep(i, n) {
		rep(j, d) cin >> x[i][j];
	}
	int ans = 0;
	rep(i, n)rep(j, i) {
		int sq = 0;
		rep(k, d) {
			int s = x[i][k] - x[j][k];
			sq += s * s;
		}
		int s = sqrt(sq);
		if (s * s == sq)ans++;
	}
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: expected unqualified-id before ',' token
    6 |         int, n, d;
      |            ^
Language: C++

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

int main() {
	int, n, d;
	cin >> n >> d;
	vector<vector<int>> x(n, vector<int>(d));
	rep(i, n) {
		rep(j, d) cin >> x[i][j];
	}
	int ans = 0;
	rep(i, n)rep(j, i) {
		int sq = 0;
		rep(k, d) {
			int s = x[i][k] - x[j][k];
			sq += s * s;
		}
		int s = sqrt(sq);
		if (s * s == sq)ans++;
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: expected unqualified-id before ',' token
    6 |         int, n, d;
      |            ^
Language: C++

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

int main() {
	int n, d;
	cin >> n >> d;
	vector<vector<int>> x(n, vector<int>(d));
	rep(i, n) {
		rep(j, d) cin >> x[i][j];
	}

	int ans = 0;
	rep(i, n)rep(j, i) {
		int sq = 0;
		rep(k, d) {
			int s = x[i][k] - x[j][k];
			sq += s * s;
		}
		int s = sqrt(sq);
		if (s * s == sq)ans++;
	}
	cout << ans << endl;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin >> n >> d;
      |         ^~~
a.cc:8:9: error: 'vector' was not declared in this scope
    8 |         vector<vector<int>> x(n, vector<int>(d));
      |         ^~~~~~
a.cc:8:23: error: expected primary-expression before 'int'
    8 |         vector<vector<int>> x(n, vector<int>(d));
      |                       ^~~
a.cc:10:34: error: 'x' was not declared in this scope
   10 |                 rep(j, d) cin >> x[i][j];
      |                                  ^
a.cc:17:33: error: 'x' was not declared in this scope
   17 |                         int s = x[i][k] - x[j][k];
      |                                 ^
a.cc:20:25: error: 'sqrt' was not declared in this scope; did you mean 'sq'?
   20 |                 int s = sqrt(sq);
      |                         ^~~~
      |                         sq
a.cc:23:9: error: 'cout' was not declared in this scope
   23 |         cout << ans << endl;
      |         ^~~~
a.cc:23:24: error: 'endl' was not declared in this scope
   23 |         cout << ans << endl;
      |                        ^~~~
Language: C++

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

int main() {
	int n, d;
	cin >> n >> d;
	vector<vector<int>> x(n, vector<int>(d));
	rep(i, n) {
	rep(j, d) {
			cin >> x[i][j];
	}
	}
	int ans = 0;
	rep(i, n) {
	rep(j, i) {
			int sq = 0;
			rep(k, d) {
				int s = x[i][k] - x[j][k];
				sq += s * s;
			}
			bool flag = false;
			rep(k, sq) {
				if (k * k == sq) {
					flag = true;
				}
			}
			if (flag)++ans;
	}
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'vector' was not declared in this scope
    8 |         vector<vector<int>> x(n, vector<int>(d));
      |         ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:8:23: error: expected primary-expression before 'int'
    8 |         vector<vector<int>> x(n, vector<int>(d));
      |                       ^~~
a.cc:11:32: error: 'x' was not declared in this scope
   11 |                         cin >> x[i][j];
      |                                ^
a.cc:19:41: error: 'x' was not declared in this scope
   19 |                                 int s = x[i][k] - x[j][k];
      |                                         ^
Language: C++

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

int main() {
	int n, d;
	cin >> n >> d;
	vector<vector<int>> x(n, vector<int>(d));
	rep(i, n) {
		rep(j, d) {
			cin >> x[i][j];
		}
	}
	int ans = 0;
	rep(i, n) {
		rep(j, i) {
			int sq = 0;
			rep(k, d) {
				int s = x[i][k] - x[j][k];
				sq += s * s;
			}
			bool flag = false;
			rep(k, sq) {
				if (k * k == sq) {
					flag = true;
				}
			}
			if (flag)++ans;
	}
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'vector' was not declared in this scope
    8 |         vector<vector<int>> x(n, vector<int>(d));
      |         ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:8:23: error: expected primary-expression before 'int'
    8 |         vector<vector<int>> x(n, vector<int>(d));
      |                       ^~~
a.cc:11:32: error: 'x' was not declared in this scope
   11 |                         cin >> x[i][j];
      |                                ^
a.cc:19:41: error: 'x' was not declared in this scope
   19 |                                 int s = x[i][k] - x[j][k];
      |                                         ^
Language: C++

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

int main() {
	int n, d;
	cin >> n >> d;
	vector<vector<int>> x(n, vector<int>(d));
	rep(i, n) {
		rep(j, d)cin >> x[i][j];
	}
	int ans = 0;
	rep(i, n) {
		rep(j, i) {
			int sq = 0;
			rep(k, d) {
				int s = x[i][k] - x[j][k];
				sq += s * s;
			}
			bool flag = false;
			rep(k, sq) {
				if (k * k == sq) {
					flag = true;
				}
			}
			if (flag)++ans;
	}
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'vector' was not declared in this scope
    8 |         vector<vector<int>> x(n, vector<int>(d));
      |         ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:8:23: error: expected primary-expression before 'int'
    8 |         vector<vector<int>> x(n, vector<int>(d));
      |                       ^~~
a.cc:10:33: error: 'x' was not declared in this scope
   10 |                 rep(j, d)cin >> x[i][j];
      |                                 ^
a.cc:17:41: error: 'x' was not declared in this scope
   17 |                                 int s = x[i][k] - x[j][k];
      |                                         ^
Language: C++

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

int main() {
	int n, d;
	cin >> n >> d;
	vector<vector<int>> x(n, vector<int>(d));
	rep(i, n) {
		rep(j, d)cin >> x[i][j];
	}
	int ans = 0;
	rep(i, n) {
		rep(j, i) {
			int sq = 0;
			rep(k, d) {
				int s = x[i][k] - x[j][k];
				sq += s * s;
			}
			bool flag = false;
			rep(k, sq) {
				if (k * k == sq) {
					flag = true;
				}
			}
			if (flag)++ans;
		}
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'vector' was not declared in this scope
    8 |         vector<vector<int>> x(n, vector<int>(d));
      |         ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:8:23: error: expected primary-expression before 'int'
    8 |         vector<vector<int>> x(n, vector<int>(d));
      |                       ^~~
a.cc:10:33: error: 'x' was not declared in this scope
   10 |                 rep(j, d)cin >> x[i][j];
      |                                 ^
a.cc:17:41: error: 'x' was not declared in this scope
   17 |                                 int s = x[i][k] - x[j][k];
      |                                         ^
Language: C++

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

int main() {
	int n, d;
	cin >> n >> d;
	vector<vector<int>> x(n, vector<int>(d));
	rep(i, n) {
		rep(j, d)cin >> x[i][j];
	}
	int ans = 0;
	rep(i, n)rep(j, i) {
		int sq = 0;
		rep(k, d) {
			int s = x[i][k] - x[j][k];
			sq += s * s;
		}
		bool flag = false;
		rep(k, sq) {
			if (k * k == sq) {
				flag = true;
			}
		}
		if (flag)++ans;
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'vector' was not declared in this scope
    8 |         vector<vector<int>> x(n, vector<int>(d));
      |         ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:8:23: error: expected primary-expression before 'int'
    8 |         vector<vector<int>> x(n, vector<int>(d));
      |                       ^~~
a.cc:10:33: error: 'x' was not declared in this scope
   10 |                 rep(j, d)cin >> x[i][j];
      |                                 ^
a.cc:16:33: error: 'x' was not declared in this scope
   16 |                         int s = x[i][k] - x[j][k];
      |                                 ^
Language: C++

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

int main() {
	int n, d;
	cin >> n >> d;
	vector<vector<int>> x(n, vector<int>(d));
	rep(i, n) {
		rep(j, d)cin >> x[i][j];
	}
	int ans = 0;
	rep(i, n)rep(j, i) {
		int sq = 0;
		rep(k, d) {
			int s = x[i][k] - x[j][k];
			sq += s * s;
		}
		int s = sqrt(sq);
		if (s * s = sq)ans++;
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'vector' was not declared in this scope
    8 |         vector<vector<int>> x(n, vector<int>(d));
      |         ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:8:23: error: expected primary-expression before 'int'
    8 |         vector<vector<int>> x(n, vector<int>(d));
      |                       ^~~
a.cc:10:33: error: 'x' was not declared in this scope
   10 |                 rep(j, d)cin >> x[i][j];
      |                                 ^
a.cc:16:33: error: 'x' was not declared in this scope
   16 |                         int s = x[i][k] - x[j][k];
      |                                 ^
a.cc:19:25: error: 'sqrt' was not declared in this scope; did you mean 'sq'?
   19 |                 int s = sqrt(sq);
      |                         ^~~~
      |                         sq
a.cc:20:23: error: lvalue required as left operand of assignment
   20 |                 if (s * s = sq)ans++;
      |                     ~~^~~
Language: C++

#include<bits/stdc++.h>

using namespace std;
int main()
{
  	int n, d, l;
 	cin>>n>>d;
 	int mat[n][d];
  	for(int i=0; i<n; i++)
    for(int j=0; j<d; j++)
      cin>>mat[i][j];
  	for(int i=0; i+1<n; i++)
    	for(int k=i+1; k<n; k++){
    		for(int j=0; j<d; j++)
      			sum+=abs(mat[i][j]-mat[k][j])*abs(mat[i][j]-mat[k][j]);
         	float x = sqrt((float)sum);
          	if(x==(int)x)
             	l++;
        }
  	cout<<l<<endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:15:25: error: 'sum' was not declared in this scope
   15 |                         sum+=abs(mat[i][j]-mat[k][j])*abs(mat[i][j]-mat[k][j]);
      |                         ^~~
a.cc:16:39: error: 'sum' was not declared in this scope
   16 |                 float x = sqrt((float)sum);
      |                                       ^~~
a.cc:20:23: error: expected '}' at end of input
   20 |         cout<<l<<endl;
      |                       ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

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


int main(){
  int n,d;
  cin>>n>>d;
  vector<vector<int>>v(n,vector<int>(d));
  for(int i=0;i<n;i++){
    for(int j=0;j<d;j++){
      cin>>v[i][j];
    }
  }
  
  for(int i=0;i<n;i++){
    for(int j=i+1;j<n;j++){
      
      for(int k=0;k<d;k++){
        int a=abs(v[i][k]-v[j][k]);
        int b=0;
        b+=a*a;
      }
      bool flag = false;
     for(int x=0;x<=b;x++) {
       if(b==x*x){
         flag=true; 
       }
     }
      int ans = 0;
     if(flag)ans++;
    }
    
  }
  cout<<ans<<endl;
}
    
    

Compiler output:
a.cc: In function 'int main()':
a.cc:24:21: error: 'b' was not declared in this scope
   24 |      for(int x=0;x<=b;x++) {
      |                     ^
a.cc:34:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   34 |   cout<<ans<<endl;
      |         ^~~
      |         abs
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,d;
  cin>>n>>d;
  vector<vector<int>>v(n,vector<int>(d));
  for(int i=0;i<n;i++){
    for(int j=0;j<d;j++){
      cin>>v[i][j];
    }
  }
  for(int i=0;i<n;i++){
    for(int j=i+1;j<n;j++){
      int b=0;
      for(int k=0;k<d;k++){
        int a=abs(v[i][k]-v[j][k]);
        b+=a*a;
      }
      bool flag = false;
     for(int x=0;x<=b;x++) {
       if(b==x*x){
         flag=true; 
       }
     }
     if(flag)ans++;
    }
    
  }
  cout<<ans<<endl;
}
    
    

Compiler output:
a.cc: In function 'int main()':
a.cc:25:14: error: 'ans' was not declared in this scope; did you mean 'abs'?
   25 |      if(flag)ans++;
      |              ^~~
      |              abs
a.cc:29:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   29 |   cout<<ans<<endl;
      |         ^~~
      |         abs
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,d,a=0,b=0,ans=0;
  cin>>n,d;
  vector<vector<int>>v(n,vector<int>(d));
  for(int i=0;i<n;i++){
    for(int j=0;j<d;j++){
      cin>>v[i][j];
    }
  }
  for(int i=0;i<n;i++){
    for(int j=i+1;j<n;j++){
      for(int k=0;k<d;k++){
        a=abs(v[i][k]-v.at[j][k]);
        b+=a*a;
      }
     for(int x=1;x<b;x++) if(b==x*x)ans++;   
     
    }
    
  }
  cout<<ans<<endl;
}
    
    

Compiler output:
a.cc: In function 'int main()':
a.cc:15:27: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   15 |         a=abs(v[i][k]-v.at[j][k]);
      |                           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,d,a=0,b=0,ans=0;
  cin>>n,d;
  vector<vector<int>>v(n,vector<int>(d));
  for(int i=0;i<n;i++){
    for(int j=0;j<d;j++){
      cin>>v[i][j];
    }
  }
  for(int i=0;i<n;i++){
    for(int j=i+1;j<n;j++){
      for(int k=0;k<d;k++){
        int a=abs(v[i][k]-v.at[j][k]);
        int b+=a*a;
      }
        
      for(int x=1;x<b;x++) if(b==x*x)ans++;
    }
  }
  cout<<ans<<endl;
}
    
    

Compiler output:
a.cc: In function 'int main()':
a.cc:15:31: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   15 |         int a=abs(v[i][k]-v.at[j][k]);
      |                               ^
a.cc:16:14: error: expected initializer before '+=' token
   16 |         int b+=a*a;
      |              ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,d,a=0,b=0,ans=0;
  cin>>n,d;
  vector<vector<int>>v(n,vector<int>(d));
  for(int i=0;i<n;i++){
    for(int j=0;j<d;j++){
      cin>>v.at(i)(j);
    }
  }
  for(int i=0;i<n;i++){
    for(int j=i+1;j<n;j++){
      for(int k=0;k<d;k++){
        int a=abs(v.at(i)(k)-v.at(j)(k));
        int b+=a*a;
      }
        
      for(int x=1;x<b;x++) if(b==x*x)ans++;
    }
  }
  cout<<ans<<endl;
}
    
    

Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: no match for call to '(__gnu_cxx::__alloc_traits<std::allocator<std::vector<int> >, std::vector<int> >::value_type {aka std::vector<int>}) (int&)'
    9 |       cin>>v.at(i)(j);
      |            ~~~~~~~^~~
a.cc:15:26: error: no match for call to '(__gnu_cxx::__alloc_traits<std::allocator<std::vector<int> >, std::vector<int> >::value_type {aka std::vector<int>}) (int&)'
   15 |         int a=abs(v.at(i)(k)-v.at(j)(k));
      |                   ~~~~~~~^~~
a.cc:15:37: error: no match for call to '(__gnu_cxx::__alloc_traits<std::allocator<std::vector<int> >, std::vector<int> >::value_type {aka std::vector<int>}) (int&)'
   15 |         int a=abs(v.at(i)(k)-v.at(j)(k));
      |                              ~~~~~~~^~~
a.cc:16:14: error: expected initializer before '+=' token
   16 |         int b+=a*a;
      |              ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int a,b,c,d,e,f;
  cin>>a>>b>>c>>d>>e>>f;
  int m,n,j;
  cin>>m>>n>>j;
  int integer;
  int an;
  if((a-b)*(a-b)+(c-d)*(c-d)==m*m)
    cin>>m;
  if((c-e)*(c-e)+(d-f)*(d-f)==n*n)
    cin>>n;
  if((e-a)*(e-a)+(f-b)*(f-b)==j*j)
    cin>.j;
  if(m==integer)
    cout<<m;
  else
    cout<<0;
  if(n==integer)
    cout<<n;
  else
    cout<<0;
  if(j==integer)
    cout<<j;
  else
    cout<<0;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:9: error: expected primary-expression before '.' token
   16 |     cin>.j;
      |         ^
Language: C++

#include <iostream>
#include <string>
#include <map>
#include <algorithm>
#define rep(i,s,n)for(int i = s;i<n;i++)
#define repe(i,s,n)for(int i = s;i<=n;i++)
using namespace std;
typedef long long ll;
static const ll MOD = 1e9 + 7;

ll a[20][20] = {};
int main() {
	ll n, d; cin >> n >> d;

	rep(i, 0, n)rep(j, 0, d) {
		cin >> a[i][j];
	}
	ll ans = 0;
	rep(i, 0, n)rep(j, i+1, n) {
		if (i != j) {
			double X = 0;
			rep(k, 0, d) {
				X += (a[i][k] - a[j][k])*(a[i][k] - a[j][k]);
			}
			double Y = sqrt(X);
			int Z = sqrt(X);
			if (Y == Z)ans++;
		}
	}

	cout << ans << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:36: error: 'sqrt' was not declared in this scope
   25 |                         double Y = sqrt(X);
      |                                    ^~~~
Language: C++

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

int main(){
  int P;
  int D;
  cin >> P >> D;
  vector<vector<int>> points(P, vector<int> (D));
  for (int i = 0; i < P; i++){
    for (int j = 0; j < D; j++){
      cin >> points[i][j];
    }
  }
  for (int i = 0; i < P; i++){
    for (int j = 0; j < i; j++){
      int dist = 0;
      for (int k = 0; k < D; k++){
        dist += (points[i][k] - points[j][k]) * (points[i][k] - points[j][k]);
      }
      for (int k = 0; k <= dist; k++){
        if (k * k == dist)
      }
    }
  }
  int ans = 0;
  for (int i = 0; i < dis.size(); i++){
    for (int j = 0; j < dis.at(i); i++){
      if (j * j == dis.at(i)) ans++;
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:7: error: expected primary-expression before '}' token
   22 |       }
      |       ^
a.cc:26:23: error: 'dis' was not declared in this scope; did you mean 'div'?
   26 |   for (int i = 0; i < dis.size(); i++){
      |                       ^~~
      |                       div
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int a,b,count=0; cin >> a >> b;
  int x[a][b];
  for(int i=0;i<a;i++) {
    for (int j=0;j<b;j++) {
      cin >> x[i][j];
    }
  }
  for(int i=0;i<a-1;i++) {
    double ans=0;
    for (int j=0;j<b-1;j++) {
      ans=x[i][j]+x[i+1][j+1];
    }
    ans=sqrt(ans);
    if(ans-(int)ans==0) {
      count++;
    }
  cout << count << endl;
}

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