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

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

int main(void)
{
	int n, d, i, j, count2 = 0, f;
	double sue;
	int nd[10][10];
	double ans = 0;
	
	scanf("%d", &n);
	scanf("%d", &d);
	
	for (i = 0; i < n; i++){
		for (j = 0; j < d; j++){
			scanf("%d", &nd[i][j]);
		}
	}
	
	for (i = 0; i < n; i++){
		for (j = 0; j < d; j++){
			if (i == n - 1){
					sue = nd[i][j] - nd[0][j];
			}
			else {
				sue = nd[i][j] - nd[i + 1][j];
			}
			ans += sue * sue;
		}
		for (f = 0; f < 100; f++){
			if (f * f == ans){a
				count2++;
			}
		}
		ans = 0;		
	}
	printf("%d\n", count2);
	
	return (0);
}

Compiler output:
main.c: In function 'main':
main.c:31:43: error: unknown type name 'a'
   31 |                         if (f * f == ans){a
      |                                           ^
main.c:32:39: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   32 |                                 count2++;
      |                                       ^~
Language: C++

// B

#include <iostream>
#include <cmath>
using namespace std;
int main() {
  int n, d;
  int count = 0;
  cin >> n >> d;
  int p[n][d];
  double dis[n][n];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < d; j++) {
      cin >> p[i][j];
    }
  }
  for (int i = 0; i < n; i++) {
  	for (int j = 0; j < n; j++) {
  		for (int k = 0; k < d; k++) {
  			dis[i][j] += (p[i][k] - p[j][k]) * (p[i][k] - p[j][k]);
  		}
  	}
  }
  for (int i = 0; i < n; i++) {
  	for (int j = 0; j < i; j++) {
  		dis[i][j] = sqrt(dis[i][j]);
      for (int k = 0; k <= 200; k++) {
        if (dis[i][j] == k)
          count++;
          break;  
  		}
  }
  cout << count;
}

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

			for (f = 0; f < 100; f++){
				if (f * f == ans){
				count2++;
				}
			}

Compiler output:
main.c:1:25: error: expected identifier or '(' before 'for'
    1 |                         for (f = 0; f < 100; f++){
      |                         ^~~
main.c:1:39: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 |                         for (f = 0; f < 100; f++){
      |                                       ^
main.c:1:47: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
    1 |                         for (f = 0; f < 100; f++){
      |                                               ^~
Language: C++

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

int main() {
  // D 次元空間上に N 個の点があります。
  // i 番目の点の座標は (Xi1,Xi2,...,XiD) です。
  // 座標 (y1,y2,...,yD) の点と座標 (z1,z2,...,zD) の点の距離は
  // √(y1−z1)2+(y2−z2)2+...+(yD−zD)2 です。
  // i 番目の点と j 番目の点の距離が整数となるような組 (i,j) (i<j) はいくつあるでしょうか。
  // 入力は全て整数である。
  // 2≤N≤10
  // 1≤D≤10
  // −20≤Xij≤20
  // 同じ座標の点は与えられない。すなわち、i≠j ならば Xik≠Xjk なる k が存在する。
  
  int N, D;
  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];
    }
  }
  // X11 X12 ... X1D
  // X21 X22 ... X2D
  // :
  // :
  // XN1 XN2 ... XND
  
  // i番目とj番目の距離
  // sqrt((Xi1 - Xj1)^2 + (Xi2 - Xj2)^2 + ... + (XiD - XjD)^2)
  // 2乗和を distance と置く
  // int tmp = (int)sqrt(distance);
  // tmp^2 == distanceであれば整数
  // これを全組み合わせやる for (i=0; i<N-1; i++) for (j=i+1; j<N; j++)
  int cnt = 0;
  for (int i = 0; i < N - 1; i++) {
    for (int j = i + 1; j < N; j++) {
      int distance = 0;
      for (int k = 0; k < D; k++) {
        distance += (X[i][k] - X[j][k]) ^ 2;
      }
      bool flg = false;
      k = 0;
      while (k ^ 2 <= distance) {
        if (k ^ 2 == distance) {
          cnt++;
          break;
        }
        k++;
      }
    }
  }
  cout << cnt << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:44:7: error: 'k' was not declared in this scope
   44 |       k = 0;
      |       ^
Language: C++

#include <bits/stdc++.h>
#include <math.h>
using namespace std;
 
int main() {
  int N,D;
  cin >> N >> D;
  
  vector<vector<int>> A(N);
  for (int i = 0; i < N; i++) {
    vector<int> X(D);
    for (int j = 0; j < D; j++) {
      cin >> X.at(j);
    }
    
    A.at(i) = X;
  }
  
  int Answer = 0;
  for(int i = 0; i < N - 1; i++) {
    for(int j = i + 1; j < N; j++) {
      int S,T;
      for(int k = 0; k < D; k++) {
        S = abs(A.at(i).at(k) - A.at(j).at(k));
        T += S * S;
      }
      for(int l = 0; l < S;l++){
        int L = l * l
        if(L == S) {
          Answer++;
        }
      }
    }
  }
  cout << Answer << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:9: error: expected ',' or ';' before 'if'
   29 |         if(L == S) {
      |         ^~
Language: C++

#include <bits/stdc++.h>
#include <math.h>
using namespace std;
 
int main() {
  int N,D;
  cin >> N >> D;
  
  vector<vector<int>> A(N);
  for (int i = 0; i < N; i++) {
    vector<int> X(D);
    for (int j = 0; j < D; j++) {
      cin >> X.at(j);
    }
    
    A.at(i) = X;
  }
  
  int Answer = 0;
  for(int i = 0; i < N - 1; i++) {
    for(int j = i + 1; j < N; j++) {
      int S,T;
      for(int k = 0; k < D; k++) {
        S = abs(A.at(i).at(k) - A.at(j).at(k));
        T += S * S
      }
      for(int l = 0; l < S;l++){
        int L = l * l
        if(L == S) {
          Answer++;
        }
      }
    }
  }
  cout << Answer << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:19: error: expected ';' before '}' token
   25 |         T += S * S
      |                   ^
      |                   ;
   26 |       }
      |       ~            
a.cc:29:9: error: expected ',' or ';' before 'if'
   29 |         if(L == S) {
      |         ^~
Language: C++

#include<iostream>
#include<algorithm>
#include<cmath>
using namespace std;
int main() {
  int n,d,x[10][10],ans=0;
  cin >> n >> d;
  double cnt;
  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++) {
      cnt=0;
      for(int k=0; k<d; k++) {
        cnt+=(x[i][k]-x[j][k])*(x[i][k]-x[j][k]);
      }
      cnt=sqrt(cnt);
      if(cnt-(floor)cnt==0) {
        ans++;
      }
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:13: error: invalid operands of types 'double' and '<unresolved overloaded function type>' to binary 'operator-'
   21 |       if(cnt-(floor)cnt==0) {
      |          ~~~^~~~~~~~
a.cc:21:21: error: expected ')' before 'cnt'
   21 |       if(cnt-(floor)cnt==0) {
      |         ~           ^~~
      |                     )
Language: C++

#include <bits/stdc++.h>
#include <math.h>
using namespace std;
 
int main() {
  int N,D;
  cin >> N >> D;
  
  vector<vector<int>> A(N);
  for (int i = 0; i < N; i++) {
    vector<int> X(D);
    for (int j = 0; j < D; j++) {
      cin >> X.at(j);
    }
    
    A.at(i) = X;
  }
  
  int Answer = 0;
  for(int i = 0; i < N - 1; i++) {
    for(int j = i + 1; j < N; j++) {
      int S;
      for(int k = 0; k < D; k++) {
        S += abs(A.at(i).at(k) - A.at(j).at(k));
      }
      for(int l = 0; l < S;l++){
        if(l == S) {
          Answer++;
      }
    }
  }
  cout << Answer << endl;
}

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

#include <bits/stdc++.h>
#include <math.h>
using namespace std;
 
int main() {
  int N,D;
  cin >> N >> D;
  
  vector<vector<int>> A(N);
  for (int i = 0; i < N; i++) {
    vector<int> X(D);
    for (int j = 0; j < D; j++) {
      cin >> X.at(j);
    }
    
    A.at(i) = X;
  }
  
  int Answer = 0;
  for(int i = 0; i < N - 1; i++) {
    for(int j = i + 1; j < N; j++) {
      int S;
      for(int k = 0; k < D; k++) {
        S += abs(A.at(i).at(k) - Y.at(j).at(k));
      }
      for(int l = 0; l < S;l++){
        if(l == S) {
          Answer++;
      }
    }
  }
  cout << Answer << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:34: error: 'Y' was not declared in this scope
   24 |         S += abs(A.at(i).at(k) - Y.at(j).at(k));
      |                                  ^
a.cc:33:2: error: expected '}' at end of input
   33 | }
      |  ^
a.cc:5:12: note: to match this '{'
    5 | int main() {
      |            ^
Language: C

#include<stdio.h>
#include<math.h>
int main(){
  int n,d;
  double tmp=0;
  int x[10][10]={};
  int ans=0;
  scanf("%d %d",&n,&d);
  for(int i=0;i<n;i++){
    for(int j=0;j<d;j++){
      scanf("%d",&x[i][j]);
      //printf("%d\n",x[i][j]);
    }
  }
  for(int i=0;i<n;i++){
    for(int a=i+1;a<n;a++){
      tmp=0;
      for(int j=0;j<d;j++){
        //printf("i,a,j=%d,%d,%d\n",i,a,j);
        tmp=tmp+pow(abs(x[i][j]-x[a][j]),2.0);
      }
      for(int b=0;b<tmp;b++){
        if(tmp==b*b){
          ans++
        }
      }
    }
  }
printf("%d\n",ans);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:20:21: error: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
   20 |         tmp=tmp+pow(abs(x[i][j]-x[a][j]),2.0);
      |                     ^~~
main.c:3:1: note: include '<stdlib.h>' or provide a declaration of 'abs'
    2 | #include<math.h>
  +++ |+#include <stdlib.h>
    3 | int main(){
main.c:24:16: error: expected ';' before '}' token
   24 |           ans++
      |                ^
      |                ;
   25 |         }
      |         ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define watch(x) cout << (#x) << " is " << (x) << endl
#define fast                          \
	ios_base::sync_with_stdio(false); \
	cin.tie(NULL);
#define FOR(n) for(int i(0);i<n;++i)
	#define rep(i,n) for(int i(0);i<n;i++)
#define ASC(i,a,b) for(int i(a); i <=b; ++i)
#define DESC(i,a,b) for(int i(a);i>=b;i--)
#define WL(t) while(t--)
#define forr(i,n) for(int i(0);i<n;+)
#define SZ(a) int((a).size())
#define PB push_back
#define MP make_pair
#define FF first
#define SS second
#define BB begin()
#define EE end()
#define all(c) c.BB, c.EE
#define present(container, element) (container.find(element) != container.end())
// ^^for set,map etc
#define cpresent(container, element) (find(all(container), element) != container.end())
// for vector,array etc
#define tr(container, it) for (auto it = container.begin(); it != container.end(); it++)
#define gcd(a, b) __gcd((a), (b))
#define lcm(a, b) ((a) * (b)) / gcd((a), (b))
#define count(x) __builtin_popcount(x) 
typedef long long LL;
typedef long double LD;
typedef vector<int> vi;
typedef vector<LL> vl;
typedef map<char,int> mci;
typedef pair<int, int> pii;
typedef map<int,pii> ipii;
const float INF = numeric_limits<float>::infinity();
const int MOD = 1e9 + 7;
const double PI = 3.14159265358979323846264338;
const LL big=998244353;
 
#ifdef _DEBUG
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
 
bool sq(int x){
	int t = sqrt(x);
	if(t*t==x)return true;
	else return false;
}

int main(){

	int n, d , ans=0;
	cin>>n>>d;
	int array[n][d];
	rep(i,n){
		rep(j,d)cin>>array[i][j];
	}
	rep(i,n){
		f(j,i+1,n){
			int temp=0;
			rep(k,d){
				temp += (array[i][k] - array[j][k])*(array[i][k] - array[j][k]);
			}
			if(sq(temp))ans++;

		}

	}
	cout<<ans;


	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:61:19: error: 'j' was not declared in this scope
   61 |                 f(j,i+1,n){
      |                   ^
a.cc:61:17: error: 'f' was not declared in this scope
   61 |                 f(j,i+1,n){
      |                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define watch(x) cout << (#x) << " is " << (x) << endl
#define fast                          \
	ios_base::sync_with_stdio(false); \
	cin.tie(NULL);
#define FOR(n) for(int i(0);i<n;++i)
#define ASC(i,a,b) for(int i(a); i <=b; ++i)
#define DESC(i,a,b) for(int i(a);i>=b;i--)
#define WL(t) while(t--)
#define forr(i,n) for(int i(0);i<n;+)
#define SZ(a) int((a).size())
#define PB push_back
#define MP make_pair
#define FF first
#define SS second
#define BB begin()
#define EE end()
#define all(c) c.BB, c.EE
#define present(container, element) (container.find(element) != container.end())
// ^^for set,map etc
#define cpresent(container, element) (find(all(container), element) != container.end())
// for vector,array etc
#define tr(container, it) for (auto it = container.begin(); it != container.end(); it++)
#define gcd(a, b) __gcd((a), (b))
#define lcm(a, b) ((a) * (b)) / gcd((a), (b))
#define count(x) __builtin_popcount(x) 
typedef long long LL;
typedef long double LD;
typedef vector<int> vi;
typedef vector<LL> vl;
typedef map<char,int> mci;
typedef pair<int, int> pii;
typedef map<int,pii> ipii;
const float INF = numeric_limits<float>::infinity();
const int MOD = 1e9 + 7;
const double PI = 3.14159265358979323846264338;
const LL big=998244353;
 
#ifdef _DEBUG
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
 
bool sq(int x){
	int t = sqrt(x);
	if(t*t==x)return true;
	else return false;
}

int main(){

	int n, d , ans=0;
	cin>>n>>d;
	int array[n][d];
	rep(i,n){
		rep(j,d)cin>>array[i][j];
	}
	rep(i,n){
		f(j,i+1,n){
			int temp=0;
			rep(k,d){
				temp += (array[i][k] - array[j][k])*(array[i][k] - array[j][k]);
			}
			if(sq(temp))ans++;

		}

	}
	cout<<ans;


	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:56:13: error: 'i' was not declared in this scope
   56 |         rep(i,n){
      |             ^
a.cc:56:9: error: 'rep' was not declared in this scope
   56 |         rep(i,n){
      |         ^~~
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
int main(){
  int n,d;
  cin >> n >> d;
  int x[d][n];
  for(int i=0;i<n;i++){
    for(int j=0;j<d;j++){
      cin >> x[j][i];
    }
  }
  int h,cnt=0;
  for(int i=0;i<n-1;i++){
    for(int j=i+1;j<n;j++){
      h=0;
      for(int k=0;k<d;k++){
        h += (x[k][i]-x[k][j])* (x[k][i]-x[k][j]);
        if(((int)(pow(h,0.5)))*((int)(pow(h,0.5)))==h)cnt++;
      }
    }
  }
  cout << cnt << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:19: error: 'pow' was not declared in this scope
   19 |         if(((int)(pow(h,0.5)))*((int)(pow(h,0.5)))==h)cnt++;
      |                   ^~~
Language: C++

#include<iostream>
#include<cmath>
#include<string>
#include<vector>
#include<numeric>

#include <algorithm>
#include <functional>
#include <sstream>
using namespace std;

/**
 * abc 133a k
 */
int main01(){
  int n,d;
  
  vector< vector<int> > vec;
  cin >> n >> d;
  
  
  for (int i = 0; i <= n; i++) {
    vector<int> row; 
    string line;
     if (getline(cin, line)) {
       istringstream is(line);
       int a;
       while (is >> a) {
         row.push_back(a);
       }
     }

    vec.push_back(row); 
  }

  //calculate
  int N=n;
  int K=2;
  std::string bitmask(K, 1); 
  bitmask.resize(N, 0); 

  vector<int>vecrow;
  vector<long> sumvec;
  int integerCount=0;
  
  do {
      vecrow.clear();
      for (int i = 0; i < N; ++i) 
      {
          if (bitmask[i]){
           vecrow.push_back(i);
          }
      }
      sumvec.clear();
      //do distance calculation for two points here
      for(int i= 0; i <= d ; i++){
        
        int absval = abs(vec[vecrow[0]][vecrow[i]] - vec[vecrow[1]][vecrow[i]]);
        long square = absval * absval;
        sumvec.push_back(square); 
      }

      int sum;
      sum= accumulate(sumvec.begin(), sumvec.end(), 0);
      double rootsum = sqrt(sum);

      if(floor(rootsum)==ceil(rootsum)){
        //if integer 
        integerCount++;
      }

      
  } while (std::prev_permutation(bitmask.begin(), bitmask.end()));

  cout << integerCount;
  return 0;

}


Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: Java

mport java.util.Scanner;
public class Main {
	public static void main(String[] args){

        Scanner stdin = new Scanner(System.in);

        int n1 = stdin.nextInt();
        int n2 = stdin.nextInt();
        //System.out.println(n1);
        //System.out.println(n2);
        //System.out.println("b");
        int [][] input = new int [n1+1][n2+1];

        for(int i = 0; i < n1; i++) {
        	for(int j = 0; j < n2; j++) {
        		//System.out.println(stdin.nextInt());
        		input[n1][n2] = stdin.nextInt();
        	}
        }
        //System.out.println("a");
        stdin.close();

        int dis = 0;
        double tmp = 0;
        int output=0;
        for(int i = 0; i < n1; i++) {
        	for(int j = 0; j < n2; j++) {
        		for(int k = 1; k < n1; k++) {
        		tmp = tmp + Math.pow(input[i][j]-input[i+k][j], 2);
        		}
        	}
        	dis = (int) Math.pow(Math.sqrt(tmp),2);
        	if(dis == tmp) {
        		output++;
        	}
        }

        System.out.println(output);






	}
}


Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.util.Scanner;
^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N, D;
  cin >> N >>D;
  int a[110];
  int count = 0;
  int n[110];
  int i;
  for(i = 0; i < 100; i++) n[i] = i+1;
  for(i = 0; i < N * D; i++){
    cin >> a[i]; }
  for(i = 0; i < N; i++){
  int b = a[i + D] - a[i];
  int c = a[i + D + 1] - a[i + 1];
    int d =(b * b) + (c * c) ;
    if(d == n * n)
      count++ ;
  }
 cout << count << endl;
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:15: error: invalid operands of types 'int [110]' and 'int [110]' to binary 'operator*'
   18 |     if(d == n * n)
      |             ~ ^ ~
      |             |   |
      |             |   int [110]
      |             int [110]
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
int main(){
  int n,d;
  cin >> n >> d;
  int x[d][n];
  for(int i=0;i<n;i++){
    for(int j=0;j<d;j++){
      cin >> x[j][i];
    }
  }
  int h,cnt=0;
  for(int i=0;i<n-1;i++){
    for(int j=i+1;j<n;j++){
      h=0;
      for(int k=0;k<d;k++){
        h += (x[k][i]-x[k][j])* (x[k][i]-x[k][j]);
        if(((int)pow(h,0.5))*((int)pow(h,0.5))==h)cnt++;
      }
    }
  }
  cout << cnt << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:18: error: 'pow' was not declared in this scope
   19 |         if(((int)pow(h,0.5))*((int)pow(h,0.5))==h)cnt++;
      |                  ^~~
Language: C

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

int main(void)
{
	int n, d, i, j, k, count2 = 0;
	double sue;
	int ans3;
	int nd[10][10];
	double ans = 0;
	double ans2;
	
	scanf("%d", &n);
	scanf("%d", &d);
	
	for (i = 0; i < n; i++){
		for (j = 0; j < d; j++){
			scanf("%d", &nd[i][j]);
		}
	}
	
	for (i = 1; i <= n; i++){
		for (j = 1; j <= d; j++){
			for (k = 0; k < d; k++){
				sue = nd[i-1][j-1] - nd[i][j-1];
				if (sue < 0){
					sue *= -1.0;
				}
				ans += sue * sue;
			}
		}
		ans2 = sqrt(ans);
		ans3 = ans2;
			
		if (ans2 - ans3 == 0){
			count2++;
		}
		if (i == n - 1){
			ans = 0;
			sue = 0;
			for (j = 1; j <= d; j++){
				for (k = 0; k < d; k++){
					sue = nd[i][j-1] - nd[0][j-1];
					if (sue < 0){
						sue *= -1.0;
					}
					ans += sue * sue;
				}
			}
			ans2 = sqrt(ans);
			ans3 = ans2;
			
		if (ans2 - ans3 == 0){
			count2++;
		}
		ans = 0;		
	}
	printf("%d\n", count2);
	
	return (0);
}

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

#include<stdio.h>

int main(void)
{
        int i, j;
        int n, d;
        int a = 0;
        int sum = 0;

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

        int array[n][d];

        for(i = 0; i < n; i++){
                for(j = 0; j < d; j++){
                        scanf("%d", &array[i][j]);
                }
        }

        for(i = 0; i < n; i++){
                for(j = 0; j < d; j++){
                        if(i = n -1){
                                a += (array[0][j] - array[i][j]) * (ar
ray[0][j] - array[i][j]);
                        }
                        else{
                                a += (array[i][j] - array[i + 1][j]) *
 (array[i][j] - array[i + 1][j]);
                        }
                }
                if(a % 4 == 0 || a % 4 == 1){
                        sum++;
                }
                a = 0;
        }

        printf("%d\n", sum);

        return 0;
}

Compiler output:
main.c: In function 'main':
main.c:23:69: error: 'ar' undeclared (first use in this function); did you mean 'a'?
   23 |                                 a += (array[0][j] - array[i][j]) * (ar
      |                                                                     ^~
      |                                                                     a
main.c:23:69: note: each undeclared identifier is reported only once for each function it appears in
main.c:23:71: error: expected ')' before 'ray'
   23 |                                 a += (array[0][j] - array[i][j]) * (ar
      |                                                                    ~  ^
      |                                                                       )
   24 | ray[0][j] - array[i][j]);
      | ~~~
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
int main(){
  int n,d;
  cin >> n >> d;
  int x[d,n];
  for(int i=0;i<n;i++){
    for(int j=0;j<d;j++){
      cin >> x[j,i];
    }
  }
  int h,cnt=0;
  for(int i=0;i<n-1;i++){
    for(int j=i+1;j<n;j++){
      h=0;
      for(int k=0;k<d;k++){
        h += (x[k,i]-x[k,j])* (x[k,i]-x[k,j]);
        if(((int)pow(h,0.5))*((int)pow(h,0.5))==h)cnt++;
      }
    }
  }
  cout << cnt << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: expected ']' before ',' token
    7 |   int x[d,n];
      |          ^
      |          ]
a.cc:7:12: error: expected initializer before ']' token
    7 |   int x[d,n];
      |            ^
a.cc:10:14: error: 'x' was not declared in this scope
   10 |       cin >> x[j,i];
      |              ^
a.cc:18:15: error: 'x' was not declared in this scope
   18 |         h += (x[k,i]-x[k,j])* (x[k,i]-x[k,j]);
      |               ^
a.cc:19:18: error: 'pow' was not declared in this scope
   19 |         if(((int)pow(h,0.5))*((int)pow(h,0.5))==h)cnt++;
      |                  ^~~
Language: C

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

#define sqr(n) ((n) * (n))
double distance(int X[10][10],int n,int D){
  int count = 0;
  int i,j;
  for(i=0; i<n; i++){
    for(j=0; j<D; j++){
       int s[i] += sqr(X[i][j] - X[i+1][j])
    }
  }
  
  if(sqrt(s) == floor(sqrt(s)){
    count++;
  }
  return count;
}
int main(){
  int N,D,i,j;
  int X[10][10];
  scanf("%d %d", &N, &D);
  int k = (N * (N-1))/2;
  for(i = 0; i<N; i++){
    for(j = 0; j<D; j++){
      scanf("%d",X[i][j]);
    }
  }
  
  printf("%d", distance(X,k, D));
  return 0;

}

Compiler output:
main.c: In function 'distance':
main.c:10:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before '+=' token
   10 |        int s[i] += sqr(X[i][j] - X[i+1][j])
      |                 ^~
main.c:10:17: error: expected expression before '+=' token
main.c:11:5: error: expected ';' before '}' token
   11 |     }
      |     ^
main.c:14:11: error: 's' undeclared (first use in this function)
   14 |   if(sqrt(s) == floor(sqrt(s)){
      |           ^
main.c:14:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:31: error: expected ')' before '{' token
   14 |   if(sqrt(s) == floor(sqrt(s)){
      |     ~                         ^
      |                               )
main.c:18:1: error: expected expression before '}' token
   18 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N, D;
  cin >> N >>D;
  int a[110];
  int count = 0;
  int n[110];
  int i;
  for(i = 0; i < 100; i++) n[i] = i+1;
  for(i = 0; i < N * D; i++){
    cin >> a[i]; }
  for(i = 0; i < N; i++){
  int b = a[i + D] - a[i]
  int c = a[i + D + 1] - a[i + 1]
    int d =(b * b) + (c * c) 
    if(d == n * n)
      count++
  }
 cout << count << endl;
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:3: error: expected ',' or ';' before 'int'
   16 |   int c = a[i + D + 1] - a[i + 1]
      |   ^~~
Language: C

#include <stdio.h>
int main(){
int N,D,n,t[n],y[n],l,m=0;
l>=0;
scanf("%d %d",&N,&D);
for(n=0;n<N;n++)
{
scanf("%d",&t[n]);
for(n=0;n<D;n++)
{scanf("%d",&y[n]);
}
printf("\n");
}
for(n=0;n<=N&&n<=D;n++)
if(l=((t[n]-y[n])*(t[n]-y[n])))
l+=((t[n]-y[n])||(y[n]-t[n]));
l=(t[n]-y[n])||(y[n]-t[n])
m++;
printf("%d",m);
}

Compiler output:
main.c: In function 'main':
main.c:17:27: error: expected ';' before 'm'
   17 | l=(t[n]-y[n])||(y[n]-t[n])
      |                           ^
      |                           ;
   18 | m++;
      | ~
Language: C

#include<stdio.h>
#include<math.h>
#define sqr(n) ((n) * (n))
double distance(int X[10][10],int n,int D){
  int count = 0;
  int i,j;
  for(i=0; i<n; i++){
    for(j=0; j<D; j++){
       int s[i] = sqr()
    }
  }
  
  if(sqrt(s) == floor(sqrt(s)){
    count++;
  }
  return count;
}
int main(){
  int N,D,i,j;
  int X[10][10];
  scanf("%d %d", &N, &D);
  int k = (N * (N-1))/2;
  for(i = 0; i<N; i++){
    for(j = 0; j<D; j++){
      scanf("%d",X[i][j]);
    }
  }
  
  printf("%d", distance(X,k, D));
  return 0;

}

Compiler output:
main.c: In function 'distance':
main.c:3:19: error: expected expression before ')' token
    3 | #define sqr(n) ((n) * (n))
      |                   ^
main.c:9:19: note: in expansion of macro 'sqr'
    9 |        int s[i] = sqr()
      |                   ^~~
main.c:3:16: error: variable-sized object may not be initialized except with an empty initializer
    3 | #define sqr(n) ((n) * (n))
      |                ^
main.c:9:19: note: in expansion of macro 'sqr'
    9 |        int s[i] = sqr()
      |                   ^~~
main.c:10:5: error: expected ',' or ';' before '}' token
   10 |     }
      |     ^
main.c:13:11: error: 's' undeclared (first use in this function)
   13 |   if(sqrt(s) == floor(sqrt(s)){
      |           ^
main.c:13:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:31: error: expected ')' before '{' token
   13 |   if(sqrt(s) == floor(sqrt(s)){
      |     ~                         ^
      |                               )
main.c:17:1: error: expected expression before '}' token
   17 | }
      | ^
main.c:32:1: error: expected declaration or statement at end of input
   32 | }
      | ^
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main() {
	int n, d;
	cin >> n >> d;
	int x[10][20];
	for (int i=0; i < n; i++) {
		for (int j=0; j < d; j++) {
			cin >> x[i][j];
		}
	}
	int ans=0;
	int s1=0;
	float s=0;
	for (int i=0; i < n; i++) {
		for (int j=i+1; j < n; j++) {
			for (int k = 0; k < d; k++) {
				s1 += (x[i][k] - x[j][k])*(x[i][k] - x[j][k]);
			}
			s = sqrt(abs(s1));
			s1 = (int)sqrt(abs(s1));
			//cout << s << s1 << endl;
			//cout << s1 << endl;
			if (s == s1) {
				++ans;
			}
			s = s1 = 0;
		}
	}
	cout << ans << endl;
	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:29: error: 'sqrt' was not declared in this scope
   21 |                         s = sqrt(abs(s1));
      |                             ^~~~
Language: C

#include <stdio.h>
int main(){
int N,D,n,t[n],y[n],l=0;
l>=0;
scanf("%d %d",&N,&D);
for(n=0;n<N;n++)
{
scanf("%d",&t[n]);
for(n=0;n<D;n++)
{scanf("%d",&y[n]);
}
printf("\n");
}
for(n=0;n<=N&&n<=D;n++)
if(l=_((t[n]-y[n])*(t[n]-y[n])))
l=t[n]-y[n]||y[n]-t[n];
l++;
printf("%d",l);
}

Compiler output:
main.c: In function 'main':
main.c:15:6: error: implicit declaration of function '_' [-Wimplicit-function-declaration]
   15 | if(l=_((t[n]-y[n])*(t[n]-y[n])))
      |      ^
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main() {
	int n, d;
	cin >> n >> d;
	int x[10][20];
	for (int i=0; i < n; i++) {
		for (int j=0; j < d; j++) {
			cin >> x[i][j];
		}
	}
	int ans=0;
	int s1=0;
	float s=0;
	for (int i=0; i < n; i++) {
		for (int j=i+1; j < n; j++) {
			for (int k = 0; k < d; k++) {
				s1 += (x[i][k] - x[j][k])*(x[i][k] - x[j][k]);
			}
			s = sqrtf(abs(s1));
			s1 = (int)sqrtf(abs(s1));
			//cout << s << s1 << endl;
			//cout << s1 << endl;
			if (s == s1) {
				++ans;
			}
			s = s1 = 0;
		}
	}
	cout << ans << endl;
	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:29: error: 'sqrtf' was not declared in this scope; did you mean 'strtof'?
   21 |                         s = sqrtf(abs(s1));
      |                             ^~~~~
      |                             strtof
Language: C

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

int main(){
    int n, d;
    if(scanf("%d %d*c", &n, &d) !=)
        return 1;

    int a[n][d];
    for(int i=0;i<n;i++){
        for(int k=0;k<d;k++){
            if(scanf("%d", &a[i][k]) != 1)
                return 1;
        }
        scanf("*c");
    }
    
    double root;
    int count = 0;
    for(int i=0;i<n-1;i++){
        int norm = 0;
        for(int k=1;k<n;k++){
            for(int m=0;m<d;m++){
                norm += ((a[i][m]) - a[k][m]) * ((a[i][m]) - a[k][m]);
            }
        }
        root = sqrt(norm);
        if(norm == (root*root))
            count++;
        
    }
    printf("%d", count);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:35: error: expected expression before ')' token
    6 |     if(scanf("%d %d*c", &n, &d) !=)
      |                                   ^
Language: C++

#include <iostream>
using namespace std;

int main(){
	/*input*/
	int n, d;	cin >> n >> d; 
	int** x = new int[n];  
	for(int i = 0; i < n; i++){
		x[i] = new int[d]; 
	}
	/*calculation*/
	int o = 0;
	for(int i = 0; i < n - 1; i++){
		for(int j = 1; j <= n - i - 1; j++){
			int m_2 = 0;
			for(int k = 0; k < d; k++){
				m_2 += (x[i][k] - x[j][k])*(x[i][k] - x[j][k]);
			}
			for(int l = 0; m_2 > l*l; l++){
				if(m_2 == l*l)o++;
			}
		}
	}
	
	/*output*/
	cout << o << endl;
	for(int i = 0; i < n; i++){
		delete[] x[i];
	}
	delete[] x;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:28: error: cannot convert 'int*' to 'int**' in initialization
    7 |         int** x = new int[n];
      |                            ^
      |                            |
      |                            int*
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
int a[11][11];
bool f[11]={false};
int main()
{
	int n,m,ans=0,k=1,tmp=false;
	double sum;
	cin>>n>>m;
	for(int i=1;i<=n;i++){
		for(int j=1;j<=m;j++){
			cin>>a[i][j];
		}
	}
	for(int i=1;i<=n;i++){
		sum=0;
		for(int j=1;j<=m;j++){
			if(i!=n){
				sum+=pow(abs(a[i][j]-a[i+1][j]),2);
			}
			else sum+=pow(abs(a[n][j]-a[1][j]),2);
		}
		if(int(sqrt(sum))==sqrt(sum)) {
			f[i]=true;
			ans+=k;
		}
		if(int(sqrt(sum))==sqrt(sum)&&f[i-1]==true){
			k++;
			tmp=true
		} 
		else k=1;
	}
	if(tmp==false) cout<<ans;
	else cout<<ans-1;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:33: error: expected ';' before '}' token
   31 |                         tmp=true
      |                                 ^
      |                                 ;
   32 |                 }
      |                 ~
Language: C

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

void scanPoints(int N, int D, int *point);
int distanceIsInteger(int (*point1), int (*point2), int D);

int main(void)
{
    int N, D;
    int X[10] = {NULL};
    int (*point)[10] = {NULL};
    int ans = 0;
    
    scanf("%d %d", &N, &D);
    scanPoints(N, D, point);

    for (int NumberOfPoints = 0; NumberOfPoints < N; NumberOfPoints++)
    {
        for (int i = 0; i < N; i++)
        {
            if (NumberOfPoints == i)
            {
                continue;
            }
            
            if ( distanceIsInteger(point[NumberOfPoints], point[i], D) == 1)
            {
                ans ++;
            }

        }
    }
    
    printf("%d", ans);

    return 0;
}

void scanPoints(int N, int D, int *point)
{
    for (int NumberOfPoints = 0; NumberOfPoints < N; NumberOfPoints++)
    {
        for (int numberOfDimesion = 0; numberOfDimesion < D; numberOfDimesion++)
        {
            scanf("%d", &( (point[NumberOfPoints])[numberOfDimesion]) );
        }
    }
}

int distanceIsInteger(int (*point1), int (*point2), int D)
{
    int temp = 0;
    double ans = 0.0;

    for (int i = 0; i < D; i++)
    {
        temp += pow((point1[i] - point2[i]), 2.0);
    }
    
    ans = sqrt(temp);

    if (ceil(ans) == floor(ans))
    {
        ans = 1;
    } else
    {
        ans = 0;
    }
    
    return ans;
}

Compiler output:
main.c: In function 'main':
main.c:10:18: error: initialization of 'int' from 'void *' makes integer from pointer without a cast [-Wint-conversion]
   10 |     int X[10] = {NULL};
      |                  ^~~~
main.c:10:18: note: (near initialization for 'X[0]')
main.c:15:22: error: passing argument 3 of 'scanPoints' from incompatible pointer type [-Wincompatible-pointer-types]
   15 |     scanPoints(N, D, point);
      |                      ^~~~~
      |                      |
      |                      int (*)[10]
main.c:4:36: note: expected 'int *' but argument is of type 'int (*)[10]'
    4 | void scanPoints(int N, int D, int *point);
      |                               ~~~~~^~~~~
main.c: In function 'scanPoints':
main.c:45:51: error: subscripted value is neither array nor pointer nor vector
   45 |             scanf("%d", &( (point[NumberOfPoints])[numberOfDimesion]) );
      |                                                   ^
Language: C++

#include<iostream>
#include <math.h>
using namespace std;
int main()
{
    // 整数の入力
    int n;
    cin >> n;
    // スペース区切りの整数の入力
    int d;
  cin >> d;
  int data[n][d];
  int a;
  for(int i = 0;i<n;i++){
      for(int j = 0;j<d;j++){
    cin >> a;
    data[i][j] = a;
  	}  
  }
  int count = 0;
  for(int i = 0;i<(n - 1);i++){
    int sum =0;
      for(int j = i+1;j<n;j++){
         for(int m = 0;m<d;m++){
    sum = (data[i][m] - data[j][m])^2;
         }
    double d =  sqrt(sum);
    int f = d;count;
  	if(d==(doube)f){
      count++;
    }
      }  
  }
  
  cout<<count;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:16: error: 'doube' was not declared in this scope; did you mean 'double'?
   29 |         if(d==(doube)f){
      |                ^~~~~
      |                double
a.cc:29:22: error: expected ')' before 'f'
   29 |         if(d==(doube)f){
      |           ~          ^
      |                      )
Language: C

#include <stdio.h>
int main(){
int N,D,t[n],y[n],n,l;
l>0;
scanf("%d %d",&N,&D);
for(n=0;n<N;n++)
{
scanf("%d",&t[n]);
for(n=0;n<D;n++)
{scanf("%d",&y[n]);
}
printf("\n");
}
for(n=0;n<=N&&n<=L;n++)
if(l=(t[n]-y[n])*(t[n]-y[n]))
l=t[n]-y[n])||y[n]-t[n]);
l++;
printf("%d",l);
}

Compiler output:
main.c: In function 'main':
main.c:3:11: error: 'n' undeclared (first use in this function)
    3 | int N,D,t[n],y[n],n,l;
      |           ^
main.c:3:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:18: error: 'L' undeclared (first use in this function)
   14 | for(n=0;n<=N&&n<=L;n++)
      |                  ^
main.c:16:12: error: expected ';' before ')' token
   16 | l=t[n]-y[n])||y[n]-t[n]);
      |            ^
      |            ;
main.c:16:12: error: expected statement before ')' token
main.c:16:13: error: expected expression before '||' token
   16 | l=t[n]-y[n])||y[n]-t[n]);
      |             ^~
main.c:16:24: error: expected statement before ')' token
   16 | l=t[n]-y[n])||y[n]-t[n]);
      |                        ^
Language: C

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

int main(){
    int N, D, n, d;
    scanf("%d", &N);
    scanf("%d", &D);

    int x[N][D];

    int i, j ;

    double dist;
    int k, cnt = 0;
    for(n=0;n<N;n++){
        for(d=0;d<D;d++){
            scanf("%d", &x[n][d]);
        }
        if(n != 0){
            j = n;
            float tmp;
            for(i=0;i<j;i++){
                tmp = 0;
                for(k=0;k<D;k++){
                    tmp += std::pow(x[i][k] - x[j][k], 2);
                }
                dist = sqrt(tmp);
                if((dist - (float)(int)dist) == 0.0F) cnt++;
            }
        }
    }
    printf("%d\n", cnt);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:25:28: error: 'std' undeclared (first use in this function)
   25 |                     tmp += std::pow(x[i][k] - x[j][k], 2);
      |                            ^~~
main.c:25:28: note: each undeclared identifier is reported only once for each function it appears in
main.c:25:31: error: expected ';' before '::' token
   25 |                     tmp += std::pow(x[i][k] - x[j][k], 2);
      |                               ^~
      |                               ;
Language: C++

#include<iostream>
#include<math.h>
using namespace std;
#include<vector>
//√640= 25が最大
int main(){
    cin.tie(0);
   	ios::sync_with_stdio(false);
    
    int n,d;
    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];
        }
    }
    int cnt=0;
    double sum;
    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+=pow((x[a][i]-x[b][i]),2);
            }
            sum= sqrt(sum)*1000;
            if(sum%10==0) cnt++;
        }
    }
    cout << cnt << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:19: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   28 |             if(sum%10==0) cnt++;
      |                ~~~^~~
      |                |   |
      |                |   int
      |                double
Language: C

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

int main()
{
    int n,i,j,k,sum=0,m,temp;
    float d=0.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(k=0;k<n;k++)
            {
                for(m=0;m<d;m++)
                {
                    if(i!=k)
                        d+=(x[i][m]-x[k][m])*(x[i][m]-x[k][m]);
                }
                if(i!=k)
                {
                    d=sqrt(d);
                    temp=d*1000;
                    temp=temp%1000;
                    if(d==temp)
                    sum++;
                    d=0;
                }
            }
    }
    printf("%d",sum);
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:11:9: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
   11 |         return;
      |         ^~~~~~
main.c:5:5: note: declared here
    5 | int main()
      |     ^~~~
main.c:12:9: error: size of array 'x' has non-integer type
   12 |     int x[n][d];
      |         ^
Language: C++

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

int main() {
  // D 次元空間上に N 個の点があります。
  // i 番目の点の座標は (Xi1,Xi2,...,XiD) です。
  // 座標 (y1,y2,...,yD) の点と座標 (z1,z2,...,zD) の点の距離は
  // √(y1−z1)2+(y2−z2)2+...+(yD−zD)2 です。
  // i 番目の点と j 番目の点の距離が整数となるような組 (i,j) (i<j) はいくつあるでしょうか。
  // 入力は全て整数である。
  // 2≤N≤10
  // 1≤D≤10
  // −20≤Xij≤20
  // 同じ座標の点は与えられない。すなわち、i≠j ならば Xik≠Xjk なる k が存在する。
  
  int N, D;
  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];
    }
  }
  // X11 X12 ... X1D
  // X21 X22 ... X2D
  // :
  // :
  // XN1 XN2 ... XND
  
  // i番目とj番目の距離
  // sqrt((Xi1 - Xj1)^2 + (Xi2 - Xj2)^2 + ... + (XiD - XjD)^2)
  // 2乗和を distance と置く
  // int tmp = (int)sqrt(distance);
  // tmp^2 == distanceであれば整数
  // これを全組み合わせやる for (i=0; i<N-1; i++) for (j=i+1; j<N; j++)
  int cnt = 0;
  for (int i = 0; i < N - 1; i++) {
    for (int j = i + 1; j < N; j++) {
      int distance = 0;
      for (int k = 0; k < D; k++) {
        distance += fabs(X[i][k] - X[j][k]) ^ 2;
      }
      if (distance == ((int)sqrt(distance)) ^ 2) cnt++;
    }
  }
  cout << cnt << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:41:45: error: invalid operands of types '__gnu_cxx::__enable_if<true, double>::__type' {aka 'double'} and 'int' to binary 'operator^'
   41 |         distance += fabs(X[i][k] - X[j][k]) ^ 2;
      |                     ~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
      |                         |                     |
      |                         |                     int
      |                         __gnu_cxx::__enable_if<true, double>::__type {aka double}
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:19:13: error: assignment to expression with array type
   19 |       sum[i]+=(a[i][j]-a[i+t][j])*(a[i][j]-a[i+t][j]);
      |             ^~
Language: C++

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

using namespace std;

int main()
{
  int N, D;
  
  // 標準入力から点の数、次元数を受け取る
  cin >> N >> D;
  
  // N,Dの範囲チェック
  if( ( 2 <= N ) && ( N <= 10 ) &&
      ( 1 <= D ) && ( D <= 10 ))
  {
    vector<vector<int>> X;
    X.resize(N);
    for( int i = 0 ; i < N ; i++ )
    {
      X[i].resize(D);
      for( int j = 0 ; j < D ; j++ )
      {
        cin >> X[i][j];
      }
    }
    
    int count = 0;
    for( int a = 0 ; a < (N - 1) ; a++ )
    {
      for( int b = (a + 1) ; b < N ; b++ )
      {
        double D = 0.0;
        // 距離を計算
        for( int j = 0 ; j < D ; j++ )
        {
          D += (double)(X[a][j] - X[b][j]) * (X[a][j] - X[b][j]);
        }
        D  = sqrt(D);
        if( ceil(D) == floor(D) )
        {
          count++;
        }
      }
    }
    
    // 結果を出力
    cout << count << endl;
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:5: error: 'vector' was not declared in this scope
   17 |     vector<vector<int>> X;
      |     ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include<math.h>
  +++ |+#include <vector>
    3 | 
a.cc:17:19: error: expected primary-expression before 'int'
   17 |     vector<vector<int>> X;
      |                   ^~~
a.cc:18:5: error: 'X' was not declared in this scope
   18 |     X.resize(N);
      |     ^
Language: C

#include <stdio.h>
int main(){
int N,D,t,y,n,l;
l>0;
float("%d %d",&N,&D);
for(n=1;n<=N;n++)
{
float ("%d",&t);
for(n=1;n<=D;n++)
{float("%d",&y);
}
printf("\n");
}
if(l=(y-t)*(y-t))
l=y-t||t-y;
n++;
printf("%d",n);
}

Compiler output:
main.c: In function 'main':
main.c:5:7: error: expected identifier or '(' before string constant
    5 | float("%d %d",&N,&D);
      |       ^~~~~~~
main.c:8:8: error: expected identifier or '(' before string constant
    8 | float ("%d",&t);
      |        ^~~~
main.c:10:8: error: expected identifier or '(' before string constant
   10 | {float("%d",&y);
      |        ^~~~
Language: C++

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

using namespace std;

int main()
{
  int N, D;
  
  // 標準入力から点の数、次元数を受け取る
  cin >> N >> D;
  
  // N,Dの範囲チェック
  if( ( 2 <= N ) && ( N <= 10 ) &&
      ( 1 <= D ) && ( D <= 10 ))
  {
    vector<vector<int>> X;
    x.resize(N);
    for( int i = 0 ; i < N ; i++ )
    {
      X[i].resize(D);
      for( int j = 0 ; j < D ; j++ )
      {
        cin >> X[i][j];
      }
    }
    
    int count = 0;
    for( int a = 0 ; a < (N - 1) ; a++ )
    {
      for( int b = (a + 1) ; b < N ; b++ )
      {
        double D = 0.0;
        // 距離を計算
        for( int j = 0 ; j < D ; j++ )
        {
          D += (double)(X[a][j] - X[b][j]) * (X[a][j] - X[b][j]);
        }
        D  = sqrt(D);
        if( ceil(D) == floor(D) )
        {
          count++;
        }
      }
    }
    
    // 結果を出力
    cout << count << endl;
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:5: error: 'x' was not declared in this scope
   19 |     x.resize(N);
      |     ^
Language: C++

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

using namespace std;

int main()
{
  int N, D;
  
  // 標準入力から点の数、次元数を受け取る
  cin >> N >> D;
  
  // N,Dの範囲チェック
  if( ( 2 <= N ) && ( N <= 10 ) &&
      ( 1 <= D ) && ( D <= 10 ))
  {
    vector<vector<int>> X;
    x.resize(N);
    for( int i = 0 ; i < N ; i++ )
    {
      X[i].resize(D);
      for( int j = 0 ; j < D ; j++ )
      {
        cin >> X[i][j];
      }
    }
    
    int count = 0;
    for( int a = 0 ; a < (N - 1) ; a++ )
    {
      for( int b = (a + 1) ; b < N ; b++ )
      {
        double D = 0.0;
        // 距離を計算
        for( int j = 0 ; j < D ; j++ )
        {
          D += (double)(X[a][j] - X[b][j]) * (X[a][j] - X[b][j]);
        }
        D  = sqrt(D);
        if( ceil(D) == floor(D) )
        {
          count++;
        }
      }
    }
    
    // 結果を出力
    cout << count << endl;
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:5: error: 'vector' was not declared in this scope
   17 |     vector<vector<int>> X;
      |     ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include<math.h>
  +++ |+#include <vector>
    3 | 
a.cc:17:19: error: expected primary-expression before 'int'
   17 |     vector<vector<int>> X;
      |                   ^~~
a.cc:18:5: error: 'x' was not declared in this scope
   18 |     x.resize(N);
      |     ^
a.cc:21:7: error: 'X' was not declared in this scope
   21 |       X[i].resize(D);
      |       ^
a.cc:37:25: error: 'X' was not declared in this scope
   37 |           D += (double)(X[a][j] - X[b][j]) * (X[a][j] - X[b][j]);
      |                         ^
Language: C

#include <stdio.h>
int main(){
int N,D,t,y,n,l;
l>0;
scanf("%d %d",&N,&D);
for(n=1;n<=N;n++)
{
scanf("%d",&t);
for(n=1;n<=D;n++)
{scanf("%d",&y)
}
printf("\n");
}
if(l=(y-t)*(y-t))
l=y-t||t-y;
n++;
printf("%d",n);
}

Compiler output:
main.c: In function 'main':
main.c:10:16: error: expected ';' before '}' token
   10 | {scanf("%d",&y)
      |                ^
      |                ;
   11 | }
      | ~
Language: Java

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int d = s.nextInt();

		int i = 0;
		int j = 0;
		int k = 0;
		int sum = 0;//それぞれの距離の二乗
		int judgeSum = 0;//距離が整数なものの合計
		for (i = 0; i < n; i++) {
			int[][] x = new int[n][d];
			for (j = 0; j < d; j++) {
				x[i][j] = s.nextInt();
			}
			if (i != 0) {
				for (k = 0; k < j; k++) {
					sum = 0;
					if (j != k) {
						for (int m = 0; m < d; m++) {
							int sa = x[j][m] - x[k][m];
							int jijou = sa * sa;
							sum += jijou;
						}
					}
					judgeSum = (Math.sqrt(sum) * 10) % 10 == 0 ? 1 : 0;
				}
			}
		}
		System.out.println(judgeSum);

	}

}


Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
	public static void main(String[] args) {
	              ^
  (use --enable-preview to enable unnamed classes)
Main.java:34: error: class, interface, enum, or record expected
}
^
2 errors
Language: C++

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

int main() {
	int n, d; cin >> n >> d;
	vector< vector<double> >x;
	for (int i = 0; i < n; i++) {
		vector<double>tmp(d);
		for (int j = 0; j < d; j++) {
			cin >> tmp[j];
		}
		x.push_back(tmp);
	}
	int ans = 0;
	for (int i = 0; i < n-1; i++) {
		double point = 0;
		for (int j = i+1; j < n; j++) {
			for (int k = 0; k < d; k++) {
				point += (x[i][k] - x[j][k]) * (x[i][k] - x[j][k]);
			}
			point = sqrt(point);
			int pon = point;
			if (point - pon == 0) ans++;
		}
	}
	cout << ans << endl;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:33: error: 'sqrt' was not declared in this scope
   23 |                         point = sqrt(point);
      |                                 ^~~~