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

#include<iostream>
#include<vector>
#include<algorithm>
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++) {
			double tmp = 0;
			for (int k = 0; k < d; k++) {
				tmp += (x[i][k] - x[j][k]) * (x[i][k] - x[j][k]);
			}
			double sqtmp = sqrt(tmp);
			int interger = sqtmp;
			if (sqtmp - interger == 0)ans++;			
		}
	}
	cout << ans << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:40: error: 'sqrt' was not declared in this scope
   23 |                         double sqtmp = sqrt(tmp);
      |                                        ^~~~
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<N;j++){
     cin >> X[i][j];
    }
  }
  int ans=0;
  for(int i=0;i<N;i++){
    for(int j=i+1;j<N;j++){
      int norm =0;
      for(int k=0;k<D;k++){
      int diff = abs(X[i][k]-X[j][k]);
        norm+=diff*diff;
      }
    
      bool flag=false;
      for(int k=0;k<=norm;k++){
        if(k*k=norm) flag=true;
      }
      if(flag) ans++;
      
      
    }
  
  }
  count << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:13: error: lvalue required as left operand of assignment
   25 |         if(k*k=norm) flag=true;
      |            ~^~
a.cc:33:9: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator<<'
   33 |   count << ans << endl;
      |   ~~~~~~^~~~~~
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<N;j++){
     cin >> X[i][j];
    }
  }
  int ans=0;
  for(int i=0;i<N;i++){
    for(int j=i+1;j<N;j++){
      int norm =0;
      for(int k=0;k<D;k++){
      int diff = abs(X[i][k]-X[j][k])
        norm+=diff*diff;
      }
    
      bool flag=false;
      for(int k=0;k<=norm;k++){
        if(k*k=norm) flag=true;
      }
      if(flag) ans++;
      
      
    }
  
  }
  count << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:9: error: expected ',' or ';' before 'norm'
   20 |         norm+=diff*diff;
      |         ^~~~
a.cc:25:13: error: lvalue required as left operand of assignment
   25 |         if(k*k=norm) flag=true;
      |            ~^~
a.cc:33:9: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator<<'
   33 |   count << ans << endl;
      |   ~~~~~~^~~~~~
Language: C++

#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
using namespace std;
#define ll long long 
#define ld double 
#define rep(i,a,b) for(ll i=a; i<b; ++i)
#define BOOST std::ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define pb push_back
#define all(v) v.begin(),v.end()
#define sl(a) a.size()
#define mod 1000000007 
#define lcm(a,b) (a*b)/__gcd(a,b)
#define MAX1 100006
#define f first
#define s second
#define pi 2*acos(0.0)
void solve()
{
    ll n,d  cin>>n>>d;
    ll arr[n][d];
    ll count=0;
    rep(i,0,n)
    {
        rep(j,0,d)  cin>>arr[i][j];
    }
    rep(i,0,n)
    {
        rep(j,i+1,n)
        {
            rep(k,0,d) ans+=(arr[i][k]-arr[j][k])*(arr[i][k]-arr[j][k]);
            ll temp=sqrt(ans);
            if(temp*temp==ans)  count++;
        }
    }cout<<count;
}
int main()
{
    #ifndef ONLINE_JUDGE
    // for getting input from input.txt
    freopen("input.txt","r",stdin);
    //for getting error from error.txt
    freopen("error.txt", "w", stderr);
    // for writing output to output.txt
    freopen("output.txt","w",stdout);
    #endif
    BOOST
    int T=1;  //cin>>T;
    while(T--) solve();
    cerr<<"Time taken : "<<(float)clock()/CLOCKS_PER_SEC<<" secs"<<"\n";
    cerr<<"My CLOCKS_PER_SEC= "<<CLOCKS_PER_SEC<<"\n";
    return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:19:13: error: expected initializer before 'cin'
   19 |     ll n,d  cin>>n>>d;
      |             ^~~
a.cc:20:15: error: 'd' was not declared in this scope
   20 |     ll arr[n][d];
      |               ^
a.cc:24:26: error: 'arr' was not declared in this scope
   24 |         rep(j,0,d)  cin>>arr[i][j];
      |                          ^~~
a.cc:30:24: error: 'ans' was not declared in this scope; did you mean 'abs'?
   30 |             rep(k,0,d) ans+=(arr[i][k]-arr[j][k])*(arr[i][k]-arr[j][k]);
      |                        ^~~
      |                        abs
a.cc:30:30: error: 'arr' was not declared in this scope
   30 |             rep(k,0,d) ans+=(arr[i][k]-arr[j][k])*(arr[i][k]-arr[j][k]);
      |                              ^~~
a.cc:31:26: error: 'ans' was not declared in this scope; did you mean 'abs'?
   31 |             ll temp=sqrt(ans);
      |                          ^~~
      |                          abs
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<n; i++)
#define rep2(i,a,n) for(int i=(a); i<(n); i++)
#define all(vec) vec.begin(),vec.end()
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
 
int main(){
  int N, D; cin >> N >> D;
  vvi x(N, vi(D));
  rep(i,N)rep(j,D) cin >> x[i][j];
  int count = 0;
  rep(i,N){
    rep2(j, i+1, N){
      float l = 0; 
      rep(k,D) l += pow(x[i][k]-x[j][k],2);
      l = sqrt(l);
      if(floor(l)==l) count++;
    }
  }
  cout << count << endl;  
  return 0;


Compiler output:
a.cc: In function 'int main()':
a.cc:25:12: error: expected '}' at end of input
   25 |   return 0;
      |            ^
a.cc:11:11: note: to match this '{'
   11 | int main(){
      |           ^
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 = 0; j < N; j++) {
            if(i == j) {
                continue;
            }
            int b = 0;
            for(int k = 0; k < D; k++) {
                x+=abs(X[i][k]-X[j][k])*abs(X[i][k]-X[j][k]);
            }
            for(int k = 0; k*k <= x; k++) {
                if(k*k == x) {
                    ans++;
                }
            }
        }
    }
    cout << ans/2 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:17: error: 'x' was not declared in this scope
   21 |                 x+=abs(X[i][k]-X[j][k])*abs(X[i][k]-X[j][k]);
      |                 ^
a.cc:23:35: error: 'x' was not declared in this scope
   23 |             for(int k = 0; k*k <= x; k++) {
      |                                   ^
Language: C++

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

bool isSquare(int num)
{
  int r = (int)floor(sqrt((double)num));
  return (r * r) == num;
}

int main()
{
  int N, D;
  cin >> N >> D;
  vector<vector<int> > points;
  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++)
    {
      int sum = 0;
      for (int k = 0; k < D; k++)
      {
        sum += (points[i][k] - points[j][k]) * (points[i][k] - points[j][k]);
      }

      if (isSquare(sum)){
        ans++;
      }
    }
  }

  cout << ans << endl;

  return 0;
}

Compiler output:
a.cc: In function 'bool isSquare(int)':
a.cc:7:22: error: 'sqrt' was not declared in this scope
    7 |   int r = (int)floor(sqrt((double)num));
      |                      ^~~~
a.cc:7:16: error: 'floor' was not declared in this scope
    7 |   int r = (int)floor(sqrt((double)num));
      |                ^~~~~
Language: C++

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

int main() {
  int N, D;
  cin >> N >> D;
  vector<vector<long long>> x(N, vector<long long>(D));
  for (int i = 0; i < N; ++i) for (int j = 0; j < D; ++j) cin >> x[i][j];
  
  long long res = 0;
  for (int i = 0; i < N; ++i) {
    for (int j = i+1; j < N; ++j) {
      long long dis = 0;
      for (int d = 0; d < D; ++d) dis += (x[i][d] - x[j][d]) * (xi][d] - x[j][d]);
      long long s = (long long)(sqrt(dis) + 0.1);
      if (s*s == dis) ++res;
    }
  }
  cout << res << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:65: error: 'xi' was not declared in this scope; did you mean 'i'?
   14 |       for (int d = 0; d < D; ++d) dis += (x[i][d] - x[j][d]) * (xi][d] - x[j][d]);
      |                                                                 ^~
      |                                                                 i
a.cc:14:67: error: expected ')' before ']' token
   14 |       for (int d = 0; d < D; ++d) dis += (x[i][d] - x[j][d]) * (xi][d] - x[j][d]);
      |                                                                ~  ^
      |                                                                   )
Language: C++

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

int main() {
  int N, D;
  cin >> N >> D;
  vector<vector<long long>> x(N, vector<long long>(D));
  for (int i = 0; i < N; ++i) for (int j = 0; j < D; ++j) cin >> x[i][j];
  
  long long res = 0;
  for (int i = 0; i < N; ++i) {
    for (int j = i+1; j < N; ++j) {
      long long dis = 0;
      for (int d = 0; d < D; ++d) 
        dis += (x[i][d] - x[j][d]) * (xi][d] - x[j][d]);
    }
    long long s=(long long)(sqrt(dis) + 0.1);
    if (s*s == dis) ++res;
    }
  }
  cout << res << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:39: error: 'xi' was not declared in this scope; did you mean 'i'?
   15 |         dis += (x[i][d] - x[j][d]) * (xi][d] - x[j][d]);
      |                                       ^~
      |                                       i
a.cc:15:41: error: expected ')' before ']' token
   15 |         dis += (x[i][d] - x[j][d]) * (xi][d] - x[j][d]);
      |                                      ~  ^
      |                                         )
a.cc:17:34: error: 'dis' was not declared in this scope; did you mean 'div'?
   17 |     long long s=(long long)(sqrt(dis) + 0.1);
      |                                  ^~~
      |                                  div
a.cc: At global scope:
a.cc:21:3: error: 'cout' does not name a type
   21 |   cout << res << endl;
      |   ^~~~
a.cc:22:1: error: expected declaration before '}' token
   22 | }
      | ^
Language: C++

#include <algorithm>
#include <bitset>
#include <tuple>
#include <cstdint>
#include <cstdio>
#include <cctype>
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <limits>
#include <map>
#include <memory>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#define ArraySizeOf(array)     (sizeof(array) / sizeof(array[0]))
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i,n) for(int i=1;i<n;i++)
#define rev(i,n) for(int i=n-1;i>=0;i--)
#define REV(i,n) for(int i=n-1;i>0;i--)
#define _GLIBCXX_DEBUG
int INF = 1e9 + 7;
unsigned NthDayOfWeekToDay(unsigned n, unsigned dow, unsigned dow1)
{
    unsigned day;
    if (dow < dow1) dow += 7;
    day = dow - dow1;
    day += 7 * n - 6;
    return day;
}
unsigned DayToWeekNumber(unsigned day)
{
    return (day - 1) / 7 + 1;
}
unsigned AnotherDayOfWeek(unsigned day, unsigned day0, unsigned dow0)
{
    return (dow0 + 35 + day - day0) % 7;
}
using namespace std;
signed 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 answer = 0;
    rep(i, N) {
        long double ans = 0;
        for(int j=i+1;j<N;j++) {
            ans += pow(abs([i][j] - X[i][j]), 2);
        }
        ans = sqrt(ans);
        if (ans == int(ans))answer++;
    }
    cout << answer << endl;
}

Compiler output:
a.cc: In lambda function:
a.cc:67:31: error: expected '{' before '[' token
   67 |             ans += pow(abs([i][j] - X[i][j]), 2);
      |                               ^
a.cc: In function 'int main()':
a.cc:67:31: error: no match for 'operator[]' (operand types are 'main()::<lambda()>' and 'int')
Language: C++

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

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 = i + 1; j < n; j++){
            int norm = 0;
            for(int k = 0; k < d; k++){
                int diff = abs(x[i][k] - x[j][k]);
                norm += diff * diff;
            }
            bool flag = false;
            for(int k = 0; k <= norm; k++){
                if(k*k == norm){
                    flag = true;
                }
            }
            if(flag) ++ans; 
        }
    }
    cout << ans << endl;
    return 0;
}

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

#include <iostream>
#include <string>
#include <array>
#include <algorithm>
#include <vector>
#include <string>
#include <set>
#include <cctype>
#include <map>
#include <stdio.h>
#include <string.h>


#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")

#define FOR(i,l,r) for(size_t i=(l);i<(r);++i)
#define REP(i,n) FOR(i,0,n)



using namespace std;

bool is_integer( float x ){
    return floor(x)==x;
}


int main() {
    int n,d;
    int x[11][11];
    int ans = 0;
    float val;

    cin >> n >> 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-1; i ++){
        for(int j = i+1; j < n; j ++){
            val = 0;
            for(int k = 0; k <d; k ++) {
                val += (x[i][k] - x[j][k]) * (x[i][k] - x[j][k]);
            }
            if(is_integer(sqrtf(val))) ans ++;

        }
    }

    cout << ans;

}







Compiler output:
a.cc: In function 'bool is_integer(float)':
a.cc:26:12: error: 'floor' was not declared in this scope
   26 |     return floor(x)==x;
      |            ^~~~~
a.cc: In function 'int main()':
a.cc:50:27: error: 'sqrtf' was not declared in this scope; did you mean 'strtof'?
   50 |             if(is_integer(sqrtf(val))) ans ++;
      |                           ^~~~~
      |                           strtof
Language: C++

/*
 * Author : Sadi
 * Mon 06/07/2020
 * 16:30:21.13
 */
#include <iostream>
#include <cstdio>
#include <climits>
#include <string>
#include <sstream>
#include <algorithm>
#include <utility>
#include <vector>
#include <deque>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <bitset>
#include <cassert>

using namespace std;

#define    watch(x); cout << "\n" <<  #x << " is: " << x << "\n";
#define    all(a) (a).begin(), (a).end()
#define    fi first
#define    se second

template<class A, class B>
ostream& operator << (ostream& output, const pair<A, B>& p) {
    output << "(" << p.first << ", " << p.second << ")";
    return output;
}

template<class A>
ostream& operator << (ostream& output, const vector<A>& a) {
    output << "[";
    for(auto it = a.begin(); it != a.end(); ++it) {
        if(it != a.begin()) {
            output << ", ";
        }
        output << *it;
    }
    output << "]";
    return output;
}

using lld = long long;
using pii = pair<int, int>;
using pll = pair<lld, lld>;

//const int inf = 1e9;
//const int mod = 1e9 + 7;
//const double PI = acos(-1.0);
//const int mx = 1e5 + 5;

bool nein(vector<int>& v1, vector<int>& v2) {
	double dis = 0;
	for(int i = 0; i < (int) v1.size(); ++i) {
		dis += pow(abs(v1[i] - v2[i]), 2);
	}
	double result = sqrt(dis);
	if(result - floor(result) == 0) {
		return true;
	}
	else {
		return false;
	}
}

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
#ifndef ONLINE_JUDGE
//    freopen("input.txt", "r", stdin);
//    freopen("output.txt", "w", stdout);
#endif // ONLINE_JUDGE

	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) {
			int point;
			cin >> point;
			v[i].push_back(point);
		}
	}  
	// assert(false);  
	int ans = 0;
	for(int i = 0; i < n - 1; ++i) {
		for(int j = i + 1; j < n; ++j) {
			// assert(false);
			if(nein(v[i], v[j])) {
				ans++;
			}
		}
	}
	cout << ans << endl;
    return 0;
}




Compiler output:
a.cc: In function 'bool nein(std::vector<int>&, std::vector<int>&)':
a.cc:62:24: error: 'pow' was not declared in this scope
   62 |                 dis += pow(abs(v1[i] - v2[i]), 2);
      |                        ^~~
a.cc:64:25: error: 'sqrt' was not declared in this scope
   64 |         double result = sqrt(dis);
      |                         ^~~~
a.cc:65:21: error: 'floor' was not declared in this scope
   65 |         if(result - floor(result) == 0) {
      |                     ^~~~~
a.cc:71:1: warning: control reaches end of non-void function [-Wreturn-type]
   71 | }
      | ^
Language: C++

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

int main() {
int n,d;
cin >> n >> d;
vector<vector<int>> a(n,vector<int>(d));
rep(i,n){
  rep(j,d){
    cin >> a.at(i).at(j);
  }
}
int ans = 0;
rep(i,n){
  rep(j,i){
    int dis = 0;
    rep(k,d){
      dis += (a.at(i).at(k) - a.at(j).at(k))*(a.at(i).at(k) - a.at(j).at(k))
    }
    int s = sqrt(dis) + 0.5;
    if(s*s == dis) ans++;
  }
}
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:20:77: error: expected ';' before '}' token
   20 |       dis += (a.at(i).at(k) - a.at(j).at(k))*(a.at(i).at(k) - a.at(j).at(k))
      |                                                                             ^
      |                                                                             ;
   21 |     }
      |     ~
Language: C++

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

int main(){
  int N,D,p=0;
  cin>>N>>D;
  vector<vector<int>> X(N,vector<int>(D));
  for(vector<int> &i:X)
    for(int &j;i)
      cin>>j;
  for(int i=0;i<N-1;i++){
    for(int j=i+1;j<N;j++){
      int l=0;
      for(int k=0;k<D;k++)
        l+=pow(X[i][k]-X[j][k],2);
      if(pow(l,0.5)==(int)pow(l,0.5))
        p++;
    }
  }
  cout<<p<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: 'j' declared as reference but not initialized
    9 |     for(int &j;i)
      |              ^
a.cc:9:16: error: could not convert 'i' from 'std::vector<int>' to 'bool'
    9 |     for(int &j;i)
      |                ^
      |                |
      |                std::vector<int>
a.cc:9:17: error: expected ';' before ')' token
    9 |     for(int &j;i)
      |                 ^
      |                 ;
Language: C++

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

int main(){
  int N,D,p=0;
  cin>>N>>D;
  vector<vector<int>> X(N,vector<int>(D));
  for(vector<int> &i:X)
    for(int &j;X)
      cin>>j;
  for(int i=0;i<N-1;i++){
    for(int j=i+1;j<N;j++){
      int l=0;
      for(int k=0;k<D;k++)
        l+=pow(X[i][k]-X[j][k],2);
      if(pow(l,0.5)==(int)pow(l,0.5))
        p++;
    }
  }
  cout<<p<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: 'j' declared as reference but not initialized
    9 |     for(int &j;X)
      |              ^
a.cc:9:16: error: could not convert 'X' from 'std::vector<std::vector<int> >' to 'bool'
    9 |     for(int &j;X)
      |                ^
      |                |
      |                std::vector<std::vector<int> >
a.cc:9:17: error: expected ';' before ')' token
    9 |     for(int &j;X)
      |                 ^
      |                 ;
Language: C++

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

int main(){
  int N,D,p=0;
  cin>>N>>D;
  vector<vector<int>> X(N,vector<int>(D));
  for(int &i:X)
    for(int &j;X)
      cin>>j;
  for(int i=0;i<N-1;i++){
    for(int j=i+1;j<N;j++){
      int l=0;
      for(int k=0;k<D;k++)
        l+=pow(X[i][k]-X[j][k],2);
      if(pow(l,0.5)==(int)pow(l,0.5))
        p++;
    }
  }
  cout<<p<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: invalid initialization of reference of type 'int&' from expression of type 'std::vector<int>'
    8 |   for(int &i:X)
      |              ^
a.cc:9:14: error: 'j' declared as reference but not initialized
    9 |     for(int &j;X)
      |              ^
a.cc:9:16: error: could not convert 'X' from 'std::vector<std::vector<int> >' to 'bool'
    9 |     for(int &j;X)
      |                ^
      |                |
      |                std::vector<std::vector<int> >
a.cc:9:17: error: expected ';' before ')' token
    9 |     for(int &j;X)
      |                 ^
      |                 ;
Language: C++

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

int main(){
  int N,D,norm,sum=0;
  cin >> N >> D;
  int X[N][D];
  
  for(int i=0;i<N;i++){
    for(int k=0;k<D;k++){
      cin >> X[i][k];
    }
  }
  for(int i=0;i<N;i++){
    for(int j=0;j<N;j++){
      norm = 0;
      for(int k=0;k<D;k++){
        norm += (X[i][k]-X[j][k])*(X[i][k]-X[j][k]);
      }
      bool sq = false
      for(int l=0;l<10000;l++){
        if(norm == l*l){
          sq=true;
        }
      }
      if(sq){
        sum++;
      }
    }
  }
  cout << sum << endl;
  return 0;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:21:7: error: expected ',' or ';' before 'for'
   21 |       for(int l=0;l<10000;l++){
      |       ^~~
a.cc:21:19: error: 'l' was not declared in this scope
   21 |       for(int l=0;l<10000;l++){
      |                   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(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.at(i).at(j);
		}
	}

	int cnt = 0;
	for(int i = 0; i < n-1; i++){
		for(int j = i+1; j < n;j++){
			int dist = 0;
			for(int k = 0; k < d; k++){
				int tmp = x.at(j).at(k) - x.at(i).at(k); 
				dist += tmp*tmp;
			}

			bool res = false;
			for(int n = 1; n <= dist; n++){
				if(n*n = dist) res = true;
			}

			if(res) cnt++;
		}
	}

	cout << cnt << endl;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:37: error: lvalue required as left operand of assignment
   26 |                                 if(n*n = dist) res = true;
      |                                    ~^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(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.at(i).at(j);
		}
	}

	int cnt = 0;
	for(int i = 0; i < n-1; i++){
		for(int j = i+1; j < n;j++){
			int dist = 0;
			for(int k = 0; k < 4; k++){
				int tmp = x.at(j).at(k) - x.at(i).at(k); 
				dist += tmp*tmp;
			}
			double jud = sqrt(dist);
			if(jud%1 == 0) cnt++;
		}
	}

	cout << cnt << endl;

	return 0;
}


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

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

int main(void)
{
	int n, d, i, j, k;
	int sumCoordinate = 0;
	int count = 0;
	int x[10][10];

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

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

	//座標の距離を調べる
	for (i = 0; i < n - 1; i++) {
		for (j = i + 1; j < n; j++) {
			for (k = 0; k < d; k++) {
				//座標の差を合計する(sumCoordinate)
				sumCoordinate += (x[j][k] - x[i][k]) * (x[j][k] - x[i][k]);
			}
			//sumCoordinateの平方根が整数か調べる
			if (sqrt(sumCoordinate) == (int)sqrt(sumCoordinate)) {
				count++;//整数ならカウント
			}
			sumCoordinate = 0;
		}
	}
	
	printf("%d\n", count);

	return 0;
}

Compiler output:
main.c:2:10: fatal error: corecrt_math_defines.h: No such file or directory
    2 | #include <corecrt_math_defines.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C

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

int main(void)
{
	int n, d, i, j, k;
	int sumCoordinate = 0;
	int count = 0;
	int x[10][10];

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

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

	for (i = 0; i < n - 1; i++) {
		for (j = i + 1; j < n; j++) {
			for (k = 0; k < d; k++) {
				sumCoordinate += (x[j][k] - x[i][k]) * (x[j][k] - x[i][k]);

				if (sqrt(sumCoordinate) == (int)sqrt(sumCoordinate)) {
					count++;
				}
			}
		}
	}

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

	return 0;
}

Compiler output:
main.c:2:10: fatal error: corecrt_math_defines.h: No such file or directory
    2 | #include <corecrt_math_defines.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

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


int main(){
int N,D;
int ten[20][20];
for(int i =0;i<N;i++){
    for(int j =0;j<D;j++){
    cin>>ten[i][j];
    }
    }
    int ans = 0;
    for(int i = 0;i<N;i++){
        for(int j = i+1;j<N;j++){
            int norm = 0;
            for(int k = 0; k<D;k++){
int diff = abs(ten[i][k]-ten[j][k]);
norm += diff*diff;
            }
for(int k = 0;k<=norm; k++){
    if(k*k == norm)ans++;
        }
    }
cout<<ans<<endl;
}


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

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

int main(){
  int n,d,x[30][30];
  cin>>n>>d;
  for(int i=1;i<=n;i++){
    for(int j=1;j<=d;j++){
      cin>>x[i][j];
    }
  }
  int ans=0;
  for(int i=1;i<=n;i++){
    for(int j=1;j<=i;j++){
      int as=0;
      for(int k=1;k<=j;k++){
        int s=x[i][k]-x[j][k];
      as+=s*s;
      }
    }
    int s=sqrt(as)+0.5;
    if(s*s==as) ans++;
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:16: error: 'as' was not declared in this scope; did you mean 's'?
   21 |     int s=sqrt(as)+0.5;
      |                ^~
      |                s
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:21:16: error: 'sq' was not declared in this scope; did you mean 's'?
   21 |     int s=sqrt(sq)+0.5;
      |                ^~
      |                s
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, srt, end) for (long long i = (srt); i < (long long)(end); i++)
#define VL vector<ll>
#define VS vector<string>
#define VB vector<bool>
#define VP vector<pair<ll,ll>>
#define VVL vector<vector<ll>>
#define VVP vector<vector<pair<ll,ll>>>
#define PL pair<ll,ll>
#define ALL(v) (v).begin(), (v).end()

bool check(VL &x1, VL &x2) {
    ll n=x1.size();
    ll s = 0;
    rep(i,0,N) s += (x1[i]-x2[i]) * (x1[i]-x2[i]);
    ll sq = (ll)sqrt(s);
    return (sq*sq) == s;
}

int main() {
	ll N; cin>>N;
    ll D; cin>>D;
    VVL X(N,VL(D,0));
	rep(i,0,N) rep(j,0,D) cin>>X[i][j];
    ll ans = 0;
    rep(i,0,N) rep(j,i+1,N) {
    ans += (ll)check(X[i], X[j]);
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'bool check(std::vector<long long int>&, std::vector<long long int>&)':
a.cc:17:13: error: 'N' was not declared in this scope
   17 |     rep(i,0,N) s += (x1[i]-x2[i]) * (x1[i]-x2[i]);
      |             ^
a.cc:4:68: note: in definition of macro 'rep'
    4 | #define rep(i, srt, end) for (long long i = (srt); i < (long long)(end); i++)
      |                                                                    ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
#define ll long long
#define fi first
#define se second
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rep1(i, n) for (int i = 1; i <= (int)(n); ++i)
#define rep11(i, n) for (int i = 1; i < (int)(n); ++i)
#define repo(i, o, n) for (int i = o; i < (int)(n); ++i)
#define repm(i, n) for (int i = (int)(n)-1; i >= 0; --i)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define pb(n) push_back(n)
#define mp make_pair
#define MOD 1002000007
#define INF LONG_LONG_MAX

typedef pair<int, int> P;
int main(){
   long long n,d;
   long long x[n][d];
   rep(i,n)
       rep(j,d){
            long long t;
            cin>>t;
            x[i][j]=t;
       }
    long long ans=0;
    rep(i,n){
        rep(j,n){
            long long dis=0;
            rep(k,d){

                if(i==j){
                    break;
                }
                dis+=pow((x[i][k]-x[j][k]),2);
             }
             long long p=(long long)sqrt(dis);
             if(p*p==dis){
                 ans++;
             }
        }
    }
    cout<<ans<<endl;



Compiler output:
a.cc: In function 'int main()':
a.cc:46:21: error: expected '}' at end of input
   46 |     cout<<ans<<endl;
      |                     ^
a.cc:20:11: note: to match this '{'
   20 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,d;
  cin >> n >> d;
  int x[n][d],r=0;
  double s;
  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++){
      s=0;
      for(int k=0;k<d;k++){
        s+=(d[i][k]-d[j][k])*(d[i][k]-d[j][k]);
      }
    }
    if(fmod(sqrt(s),1)==0)r++;
  }
  cout << r;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:14: error: invalid types 'int[int]' for array subscript
   17 |         s+=(d[i][k]-d[j][k])*(d[i][k]-d[j][k]);
      |              ^
a.cc:17:22: error: invalid types 'int[int]' for array subscript
   17 |         s+=(d[i][k]-d[j][k])*(d[i][k]-d[j][k]);
      |                      ^
a.cc:17:32: error: invalid types 'int[int]' for array subscript
   17 |         s+=(d[i][k]-d[j][k])*(d[i][k]-d[j][k]);
      |                                ^
a.cc:17:40: error: invalid types 'int[int]' for array subscript
   17 |         s+=(d[i][k]-d[j][k])*(d[i][k]-d[j][k]);
      |                                        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
typedef long long ll;
#define _GLIBCXX_DEBUG
typedef vector<int> vec;
typedef vector<ll> lvec;
typedef vector<char>cvec;
typedef pair<ll, ll> LP;
typedef tuple<ll, ll, ll> LT;
typedef pair<int, int> P;
typedef tuple<int, int, int> T;
int main()	{
  int n,d;
  cin>>n>>d;
  vector<vector<int>>data(n,vector<int>(d));
  rep(i,n){
    rep(j,d){
      cin>>data[i][j];
    }
  }
  rep(i,n){
    rep(j,i){
      int ans=0;
      int sum=0;
      rep(k,d){
        int dif=data[i][k]-data[j][k];
        sum+=dif*dif;
      }
      int s=sqrt(sum)+0.5;
      if(s*s=sum) ans++;
    }
    cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:11: error: lvalue required as left operand of assignment
   33 |       if(s*s=sum) ans++;
      |          ~^~
a.cc:35:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   35 |     cout<<ans<<endl;
      |           ^~~
      |           abs
a.cc:36:2: error: expected '}' at end of input
   36 | }
      |  ^
a.cc:15:17: note: to match this '{'
   15 | int main()      {
      |                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int n,d;
  cin>>n>>d;
  vector<vector<int>> vec(n,vector<int>(d));
  for(int i=0;i<n;i++){
    for(int j=0;j<d;j++){
      cin>>vec[i][j];
    }
  }
  int ans=0;
  for(int i=0;i<n;i++)[
    for(int j=0;j<n;j++){
      int sum=0;
      for(int k=0;k<n;k++){
        sum+=(vec[i][k]-vec[j][k])*(vec[i][k]-vec[j][k]);
      }
      int root=sqrt(sum);
      if(root*root==sum)ans++;
    }
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:5: error: expected identifier before 'for'
   14 |     for(int j=0;j<n;j++){
      |     ^~~
a.cc:14:16: error: expected ']' before ';' token
   14 |     for(int j=0;j<n;j++){
      |                ^
      |                ]
a.cc: In lambda function:
a.cc:14:16: error: expected '{' before ';' token
a.cc: In function 'int main()':
a.cc:14:17: error: 'j' was not declared in this scope
   14 |     for(int j=0;j<n;j++){
      |                 ^
a.cc: At global scope:
a.cc:23:3: error: 'cout' does not name a type
   23 |   cout<<ans<<endl;
      |   ^~~~
a.cc:24:1: error: expected declaration before '}' token
   24 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int n,d;
  cin>>n>>d;
  vector<vector<int>> vec(n,vector<int>(d));
  for(int i=0;i<n;i++){
    for(j=0;j<d;j++){
      cin>>vec[i][j];
    }
  }
  int ans=0;
  for(int i=0;i<n;i++)[
    for(int j=0;j<n;j++){
      int sum=0;
      for(int k=0;k<n;k++){
        sum+=(vec[i][k]-vec[j][k])*(vec[i][k]-vec[j][k]);
      }
      int root=sqrt(sum);
      if(root*root==sum)ans++;
    }
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'j' was not declared in this scope
    8 |     for(j=0;j<d;j++){
      |         ^
a.cc:14:5: error: expected identifier before 'for'
   14 |     for(int j=0;j<n;j++){
      |     ^~~
a.cc:14:16: error: expected ']' before ';' token
   14 |     for(int j=0;j<n;j++){
      |                ^
      |                ]
a.cc: In lambda function:
a.cc:14:16: error: expected '{' before ';' token
a.cc: In function 'int main()':
a.cc:14:17: error: 'j' was not declared in this scope
   14 |     for(int j=0;j<n;j++){
      |                 ^
a.cc: At global scope:
a.cc:23:3: error: 'cout' does not name a type
   23 |   cout<<ans<<endl;
      |   ^~~~
a.cc:24:1: error: expected declaration before '}' token
   24 | }
      | ^
Language: C++

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

void solveproblem(int ar[][20] , int n ,int d){
  	int count=0;
	for(int i=0;i<n-1;i++){
      for(int j=i+1;j<n;j++){
        float ans=0.0;
        for(int k=0;k<d;k++){
          ans += sqrt(ar[i][k]*ar[i][k]*1.0 + ar[j][k]*ar[j][k]);
        }
        if(ans==int(ans)){
          count++;
      }
    }
     cout<<count;
}

int main(){
  int n,d;
  cin>>n>>d;
  int ar[20][20];
  for(int i=0;i<n;i++){
    for(int j=0;j<d;j++){
      cin>>ar[i][j];
    }
  }
  solveproblem(ar,n,d);
}

Compiler output:
a.cc: In function 'void solveproblem(int (*)[20], int, int)':
a.cc:19:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   19 | int main(){
      |         ^~
a.cc:19:9: note: remove parentheses to default-initialize a variable
   19 | int main(){
      |         ^~
      |         --
a.cc:19:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:19:11: error: a function-definition is not allowed here before '{' token
   19 | int main(){
      |           ^
a.cc:29:2: error: expected '}' at end of input
   29 | }
      |  ^
a.cc:4:47: note: to match this '{'
    4 | void solveproblem(int ar[][20] , int n ,int d){
      |                                               ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() 
{  
    .//freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    ios_base::sync_with_stdio(false); 
        cin.tie(NULL);
    int N,D;
    cin>>N>>D;
    vector< vector<int> > arr;
    for(int i=0;i<N;i++)
    {
        vector<int> d;
        for(int i=0;i<D;i++)
        {
            int x;
            cin>>x;
            d.push_back(x);
        }
        arr.push_back(d);
    }
    int count=0;
    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+=(arr[j][k]-arr[i][k])*((arr[j][k]-arr[i][k]));
            }
            int FLAG=0;
            for(int i=0;i<=100;i++)
            {
                if(i*i==dist)
                {
                    FLAG=1;
                    break;
                }
            }
            if(FLAG==1)
            {
                count++;
            }
        }
    }
    cout<<count;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: expected primary-expression before '.' token
    5 |     .//freopen("input.txt","r",stdin);
      |     ^
Language: C++

#include <bits/std++.h>
#include <math.h>
using namespace std;
int main(){
  int n,d;
  cin >> n >> d;
  vector<vector<int>> a(n, vector<int>(d));
  for(int i;i<n;i++){
    for(int j;j<d;j++){
      cin >> a[i][j];
    }
  }
  int r;
  for(int i;i<n;i++){
    for(int j=i+1;j<n;j++){
      int k=0;
      for(int m;m<d;m++){
        int d=a[i][m]-a[j][m];
        int s=pow(d,2);
        k+=s;
      }
      if(floor(sqrt(k)) == ceil(sqrt(k))){
        r++;
      }
    }
  }
  cout << r;
  return 0;
}
  


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

#include <iostream>
#include <math.h>
using namespace std;
int main(){
  int n,d;
  cin >> n >> d;
  vector<vector<int>> a(n, vector<int>(d));
  for(int i;i<n;i++){
    for(int j;j<d;j++){
      cin >> a[i][j];
    }
  }
  int r;
  for(int i;i<n;i++){
    for(int j=i+1;j<n;j++){
      int k=0;
      for(int m;m<d;m++){
        int d=a[i][m]-a[j][m];
        int s=pow(d,2);
        k+=s;
      }
      if(floor(sqrt(k)) == ceil(sqrt(k))){
        r++;
      }
    }
  }
  cout << r;
  return 0;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'vector' was not declared in this scope
    7 |   vector<vector<int>> a(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 <math.h>
  +++ |+#include <vector>
    3 | using namespace std;
a.cc:7:17: error: expected primary-expression before 'int'
    7 |   vector<vector<int>> a(n, vector<int>(d));
      |                 ^~~
a.cc:10:14: error: 'a' was not declared in this scope
   10 |       cin >> a[i][j];
      |              ^
a.cc:18:15: error: 'a' was not declared in this scope
   18 |         int d=a[i][m]-a[j][m];
      |               ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
typedef long long ll;
#define _GLIBCXX_DEBUG
typedef vector<int> vec;
typedef vector<ll> lvec;
typedef vector<char>cvec;
typedef pair<ll, ll> LP;
typedef tuple<ll, ll, ll> LT;
typedef pair<int, int> P;
typedef tuple<int, int, int> T;
int main()	{
  int n,d;
  cin>>n>>d;
  vector<vector<int>>data(n,vector<int>(d));
  rep(i,n){
    rep(j,d){
      cin>>data[i][j];
    }
  }
  int ans=0;
  rep(i,n) rep(k,i){
      int sq=0;
      rep(j,d){
        int dif=data[i][j]-data[k][j];
        sq+=dif*dif;
      }
    int s=sqrt(sqr)+0.5; //intは切り捨てなので、四捨五入になるように0.5を足す
    if(s*s==sq) ans++;
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:16: error: 'sqr' was not declared in this scope; did you mean 'sq'?
   31 |     int s=sqrt(sqr)+0.5; //intは切り捨てなので、四捨五入になるように0.5を足す
      |                ^~~
      |                sq
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
typedef long long ll;
#define _GLIBCXX_DEBUG
typedef vector<int> vec;
typedef vector<ll> lvec;
typedef vector<char>cvec;
typedef pair<ll, ll> LP;
typedef tuple<ll, ll, ll> LT;
typedef pair<int, int> P;
typedef tuple<int, int, int> T;
int main()	{
  int n,d;
  cin>>n>>d;
  vector<vector<int>>data(n,vector<int>(d));
  rep(i,n){
    rep(j,n){
      cin>>data[i][j];
    }
  }
  int ans=0;
  rep(i,n){
    rep(k,i){
      int sqr=0;
      rep(j,d){
        int dif=x[i][j]-x[k][j];
        sqr+=dif*dif;
      }
    int s=sqrt(sqr)+0.5; //intは切り捨てなので、四捨五入になるように0.5を足す
    if(s*s=sqr) ans++;
    }
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:17: error: 'x' was not declared in this scope
   29 |         int dif=x[i][j]-x[k][j];
      |                 ^
a.cc:33:9: error: lvalue required as left operand of assignment
   33 |     if(s*s=sqr) ans++;
      |        ~^~
Language: C

#include<stdio.h>
#include<math.h>
int main()
{
	int n,d,i,s=0,j,k,c=0;

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

	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-1;i++)
		for(j=i+1;j<n;j++){
			for(k=0;k<d;k++)
				s+=(s[j][k]-s[i][k])*(s[j][k]-s[i][k]);
			if(sqrt(s)==(int)sqrt(s))
				c++;
		}
	printf("%d",c);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:38: error: subscripted value is neither array nor pointer nor vector
   17 |                                 s+=(s[j][k]-s[i][k])*(s[j][k]-s[i][k]);
      |                                      ^
main.c:17:46: error: subscripted value is neither array nor pointer nor vector
   17 |                                 s+=(s[j][k]-s[i][k])*(s[j][k]-s[i][k]);
      |                                              ^
main.c:17:56: error: subscripted value is neither array nor pointer nor vector
   17 |                                 s+=(s[j][k]-s[i][k])*(s[j][k]-s[i][k]);
      |                                                        ^
main.c:17:64: error: subscripted value is neither array nor pointer nor vector
   17 |                                 s+=(s[j][k]-s[i][k])*(s[j][k]-s[i][k]);
      |                                                                ^
Language: C

#include<stdio.h>
#include<math.h>
int main()
{
	int n,d,i,s=0,j,k,c=0;

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

	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-1;i++)
		for(j=i+1;j<n;j++){
			for(k=0;k<d;k++)
				s+=pow((s[j][k]-s[i][k]),2);
			if(sqrt(s)==(int)sqrt(s))
				c++;
		}
	printf("%d",c);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:42: error: subscripted value is neither array nor pointer nor vector
   17 |                                 s+=pow((s[j][k]-s[i][k]),2);
      |                                          ^
main.c:17:50: error: subscripted value is neither array nor pointer nor vector
   17 |                                 s+=pow((s[j][k]-s[i][k]),2);
      |                                                  ^
Language: C

#include<stdio.h>
#include<math.h>
int main()
{
	int n,d,i,s=0,j,k,c=0;

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

	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-1;i++)
		for(j=i+1;j<n;j++){
			for(k=0;k<d;k++)
				s+=pow(s[j][k]-s[i][k],2);
			if(sqrt(s)==(int)sqrt(s))
				c++;
		}
	printf("%d",c);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:41: error: subscripted value is neither array nor pointer nor vector
   17 |                                 s+=pow(s[j][k]-s[i][k],2);
      |                                         ^
main.c:17:49: error: subscripted value is neither array nor pointer nor vector
   17 |                                 s+=pow(s[j][k]-s[i][k],2);
      |                                                 ^
Language: C

#include<stdio.h>
#include<math.h>
int main()
{
	int n,d,i,j,c=0;
	double s;

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

	int x[n][d];

	for(i=0;i<n;i++)
		for(j=0;j<d;j++)
			scanf("%d",&x[i][j]);
	for(i=0;i<n;i++)
		for(j=0;j<d;j++){
			s=sqrt(pow((double)x[i+1]-(double)x[i],2));
			if((s==ceil(s))&&(s==floor(s)))
				c++;
		}
	printf("%d",c);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:25: error: pointer value used where a floating-point was expected
   17 |                         s=sqrt(pow((double)x[i+1]-(double)x[i],2));
      |                         ^
main.c:17:25: error: pointer value used where a floating-point was expected
Language: C

#include<stdio.h>
#include<math.h>
int main()
{
	int n,d,i,j,s,c=0;

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

	int x[n][d];

	for(i=0;i<n;i++)
		for(j=0;j<d;j++)
			scanf("%d",&x[i][j]);
	for(i=0;i<n;i++)
		for(j=0;j<d;j++){
			s=sqrt(pow((double)x[i+1]-x[i],2));
			if((s==ceil(s))&&(s==floor(s)))
				c++;
		}
	printf("%d",c);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:25: error: pointer value used where a floating-point was expected
   16 |                         s=sqrt(pow((double)x[i+1]-x[i],2));
      |                         ^
Language: C

#include<stdio.h>
#include<math.h>
int main()
{
	int n,d,i,j,s,c=0;

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

	int x[n][d];

	for(i=0;i<n;i++)
		for(j=0;j<d;j++)
			scanf("%d",&x[i][j]);
	for(i=0;i<n;i++)
		for(j=0;j<d;j++){
			s=sqrt(pow((double)x[i+1]-x[i]),2);
			if((s==ceil(s))&&(s==foor(s)))
				c++;
		}
	printf("%d",c);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:25: error: pointer value used where a floating-point was expected
   16 |                         s=sqrt(pow((double)x[i+1]-x[i]),2);
      |                         ^
main.c:16:32: error: too few arguments to function 'pow'
   16 |                         s=sqrt(pow((double)x[i+1]-x[i]),2);
      |                                ^~~
In file included from /usr/include/features.h:523,
                 from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:28,
                 from main.c:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:173:1: note: declared here
  173 | __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
      | ^~~~~~~~~~~~~~
main.c:16:27: error: too many arguments to function 'sqrt'
   16 |                         s=sqrt(pow((double)x[i+1]-x[i]),2);
      |                           ^~~~
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:176:1: note: declared here
  176 | __MATHCALL (sqrt,, (_Mdouble_ __x));
      | ^~~~~~~~~~
main.c:17:46: error: implicit declaration of function 'foor'; did you mean 'floor'? [-Wimplicit-function-declaration]
   17 |                         if((s==ceil(s))&&(s==foor(s)))
      |                                              ^~~~
      |                                              floor