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

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

using namespace std;

int Pow2(int x) {
  return x * x;
}

bool IsSquare(int x) {
  int y = (int) sqrt(x);
  return y * y == x;
}

int main() {
  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];
    }
  }

  int ans = 0;

  for (int i = 0; i < N; i++) {
    for (int j = i + 1; j < N; j++) {
      int d2 = 0;
      for (int d = 0; d < D; d++) {
        d2 += Pow2(x[i][d] - x[j][d]);
      }
      if (IsSquare(d2)) {
        ans ++;
      }
    }
  }

  cout << ans << endl;

  return 0;
}


Compiler output:
a.cc: In function 'bool IsSquare(int)':
a.cc:17:17: error: 'sqrt' was not declared in this scope
   17 |   int y = (int) sqrt(x);
      |                 ^~~~
Language: C

#include <stdio.h>
int main(){
int t,y,n,i;
scanf("%d %d\n",&t,&y);
for(n=1;n<=y;n++)
{
{for(n=1;n<=t;n++)
scanf("%d ",&i);
}
scanf("%d ",&i);
printf("\n");
}

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

#include <bits/stdc++.h>
#include <math.h>
using namespace std;
int main(void){
    // Your code here!
    int n,d;
    cin>>n>>d;
    int M=0;
    int x[n][d];
    for(int i=0;i<n;i++){
        for(int j=0;j<d;j++){
            cin>>x[i][j];
        }
    }
    double sum=0;
    for(int i=0;i<n-1;i++){
        for(int j=i+1;j<n;j++){
            sum=0;
            for(int k=0;k<d;k++){
                sum+=pow(x[i][k]-x[j][k], 2);
            }
            if (ceil(sqrt(sum)) == floor(sqrt(sum))) {
　　　　    M++;
            }
        }
    }
    cout<<M;
}


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

#include<bits/stdc++.h>
using namespce std;
int main()
{
  int a,b,n;
  if(a+b==n*n)
  cout<<n;
  else
    cout<<a+b;
  return 0;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespce'
    2 | using namespce std;
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |   cout<<n;
      |   ^~~~
      |   std::cout
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |     cout<<a+b;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

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


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

    int N[10][10];
    int sum=0;

    for(int i=0; i<N-1; i++){
        for(int j=i+1; j<N; j++){
            float dis=0;
            for(int k=0; k<D; k++){
                 dis += std::pow(N[i][k]-N[j][k], 2.0);
            }
            dis = std::sqrt(dis);
            if(dis%1 == 0) sum += 1;
        }
    }

    cout << sum << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: conflicting declaration 'int N [10][10]'
   11 |     int N[10][10];
      |         ^
a.cc:8:9: note: previous declaration as 'int N'
    8 |     int N, D;
      |         ^
a.cc:18:35: error: invalid types 'int[int]' for array subscript
   18 |                  dis += std::pow(N[i][k]-N[j][k], 2.0);
      |                                   ^
a.cc:18:43: error: invalid types 'int[int]' for array subscript
   18 |                  dis += std::pow(N[i][k]-N[j][k], 2.0);
      |                                           ^
a.cc:21:19: error: invalid operands of types 'float' and 'int' to binary 'operator%'
   21 |             if(dis%1 == 0) sum += 1;
      |                ~~~^~
      |                |   |
      |                |   int
      |                float
Language: C

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

int main(void){
  int n,d,x[8][9];
  int i,j,k;
  int dist,count;
  double sq;
  scanf("%d %d",&n,&d);
  for(i=0;i<n-2;i++){
    for(j=0;j<d-1;j++){
      scanf("%d",&x[i][j]);
    }
  }
  
  count = 0;
  for(i=0;i<n-2;i++){
    for(j=i+1;j<n-2;j++){
      dist = 0;
      for(k=0;k<d-1;k++){
        dist += (x[i][k] - x[j][k])*(x[i][k] - x[j][k]);
      }
      sq = sqrt(dist);
      if((sq-(int)sq)==0){
        count += 1;
      }
    }
  }
  
  printf("%d\n",count);
  return 0;
}

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


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

using namespace std;

#define square(x) ((x) * (x))

int main()
{
	int N, D;
	cin >> N >> D;
	vector<vector<int>> x;
	x.resize(N);
	for (int i = 0; i < N; i++)
	{
		x[i].resize(D);
		for (int d = 0; d < D; d++)
		{
			cin >> x[i][d];
		}
	}

	int ans = 0;
	for (int i = 0; i < N - 1; i++)
	{
		for (int j = i + 1; j < N; j++)
		{
			int sq = 0;
			for (int d = 0; d < D; d++)
			{
				sq += square(x[i][d] - x[j][d]);
			}
			int dst = (int)std::sqrt(sq);
			if (dst * dst == sq)
			{
				ans++;
			}
		}
	}
	cout << ans << endl;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:45: error: 'sqrt' is not a member of 'std'
   35 |                         int dst = (int)std::sqrt(sq);
      |                                             ^~~~
Language: C++

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

using namespace std;

typedef long long ll;
typedef vector<ll> vl;
typedef list<ll> listl;
typedef string str;

#define min(A, B) min(static_cast<ll>(A), static_cast<ll>(B))
#define max(A, B) max(static_cast<ll>(A), static_cast<ll>(B))

#define _rep(i, m)		for(ll i = 0, i_max = m; i < i_max; i++)
#define _erep(i, m)		for(ll i = 0, i_max = m; i <= i_max; i++)
#define _brep(i, b, m)	for(ll i = b, i_max = m; i < i_max; i++)
#define _ebrep(i, b, m)	for(ll i = b, i_max = m; i <= i_max; i++)
#define _rrep(i, m)		for(ll i = m; i >= 0; i--)
#define _rerep(i, b, e)	for(ll i = b; i >= e; i--)

#define rep(m)			_rep(i, m)
#define erep(m)			_erep(i, m)
#define brep(b, m)		_brep(i, b, m)
#define ebrep(b, m)		_ebrep(i, b, m)
#define rrep(m)			_rrep(i, m)
#define rerep(b, e)		_rerep(i, b, e)

ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return a * b / gcd(a, b); }

void in(ll& I)
{
	cin >> I;
}

void in(vl& I)
{
	for (auto& i : I)
	{
		cin >> i;
	}
}

void in(listl& I)
{
	for (auto& i : I)
	{
		cin >> i;
	}
}

void in(str& s)
{
	cin >> s;
}

void out(ll O)
{
	cout << O;
}

void out(vl& O)
{
	for (auto& o : O)
	{
		cout << o;
	}
}

void rout(bool b, str True, str False)
{
	if (b)
	{
		cout << True.c_str();
	}
	else
	{
		cout << False.c_str();
	}
}

int main()
{
	ll N;
	in(N);
	ll D;
	in(D);

	vector<vector<ll>> X;

	X.resize(N);
	
	rep(N)
	{
		X[i].resize(D);
		_rep(j, D)
		{
			in(X[i][j]);
		}
	}

	ll Max = 0;

	rep(N)
	{
		_brep(j, i + 1, N)
		{
			int len = 0;
			_rep(d, D)
			{
				len += (X[i][d] - X[j][d])*(X[i][d] - X[j][d]);
			}

			float l = sqrtf(len);

			if ((l - (int)l) == 0)
			{
				Max++;
			}
		}
	}

	out(Max);

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:117:35: error: 'sqrtf' was not declared in this scope; did you mean 'strtof'?
  117 |                         float l = sqrtf(len);
      |                                   ^~~~~
      |                                   strtof
Language: C++

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

#include <math.h>





int main(){

	int N, D, **X, i, j, k, count=0, dis, a;	
    long long int sum = 1, result;

	scanf("%d %d", &N, &D);

	X = malloc(sizeof(int *)* N);
	for (i = 0; i<N; i++) {
		X[i] = malloc(sizeof(int)* 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 = i + 1; j < N; j++){
			dis = 0.0;
			for (k = 0; k < D; k++){
				dis += (X[i][k] - X[j][k])*(X[i][k] - X[j][k]);
			}
			a = (int)sqrt((double)dis);
			if (a*a == dis)
				count++;
				
		}
	}

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

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:19: error: invalid conversion from 'void*' to 'int**' [-fpermissive]
   18 |         X = malloc(sizeof(int *)* N);
      |             ~~~~~~^~~~~~~~~~~~~~~~~~
      |                   |
      |                   void*
a.cc:20:30: error: invalid conversion from 'void*' to 'int*' [-fpermissive]
   20 |                 X[i] = malloc(sizeof(int)* D);
      |                        ~~~~~~^~~~~~~~~~~~~~~~
      |                              |
      |                              void*
Language: C++

#include<bits/stdc++.h>
#define ll long long
#define mod 1000000007
#define pb push_back
#define fi first
#define se second
#define fr(i,s,e) for(i=s;i<e;i++)
#define ms(arr,val) memset(arr,val,sizeof(arr))
using namespace std;

const int mxn=2e5+1;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

#endif
  int t=1;
//  cin>>t;
  int tt=1;
  while(t--){
    int n,d,i,j;
    cin>>n>>d;
    int arr[n][d];
    fr(i,0,n)
    {
      fr(j,0,d)
      cin>>arr[i][j];
      
   // cout<<"Case #"<<tt<<": ";
   // tt++;
    }
    int ans=0;
    fr(i,0,n)
    {
      fr(j,i+1,n)
      {
        int k;
        long double temp=0;
        fr(k,0,d)
        temp+=pow((arr[i][k]-arr[j][k]),2);
        temp=sqrt(temp);
        if(temp==(ll)(temp))
          ans++;
      }
    }
    cout<<ans;
    }
  return 0;
}



Compiler output:
a.cc:18:2: error: #endif without #if
   18 | #endif
      |  ^~~~~
Language: C++

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

using namespace std;



int main(int argc, char const *argv[]){
    int n, d, answer=0;
    cin >> n >> d;
    vector<int> x;
    int _x;
    for(int i=0;i<(n*d);i++){
        cin >> _x;
        x.push_back(_x);
    }
    for(int i=0;i<n;i++){
        for(int j=(i+1);j<n;j++){
            double sum1 = 0;
            for(int k=0;k<d;k++){
                sum1+=(x[i*d+k]-x[j*d+k])*(x[i*d+k]-x[j*d+k]);
            }
            sum1 = std::sqrt(sum1);
            answer += int(double(int(sum1))==sum1);
        }
    }
    cout << answer << endl;


    return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:25:25: error: 'sqrt' is not a member of 'std'; did you mean 'sort'?
   25 |             sum1 = std::sqrt(sum1);
      |                         ^~~~
      |                         sort
Language: C++

#include <algorithm>
#include <bitset>
#include <cstdio>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define REP(i, b, n) for (Int i = b; i < Int(n); i++)
#define rep(i, n) REP(i, 0, n)
using namespace std;
using Int = long long;
Int inf = 1000000000000000001LL;
using vi = vector<Int>;
using vvi = vector<vi>;
using mapis = unordered_map<Int,string>;
using mapii = unordered_map<Int,Int>;
using pii = pair<Int,Int>;

Int GCD(Int a, Int b){
    if(b==0) return a;
    if(a < b) return GCD(b, a);
    unsigned r;
    while ((r=a%b)) {
        a = b;
        b = r;
    }
    return b;
}
Int printX(Int r, Int D, Int X, int count){
    if(count == 10){
        return 0;
    }
    Int nextX = r*X - D;
    cout<< nextX <<endl;
    printX(r,D,nextX,count+1);

}
int main() {
    int N,D;
    cin >> N>>D;
    vvi X = vvi(N,vi(D));

    map<Int,Int> pows;
    rep(i,10000){
        pows[i*i] = 1;
    }
    rep(i,N){
        rep(j,D){
            cin >> X[i][j];
        }

    }
    Int ans =0;

    rep(i,N){
        REP(k,i+1,N){
            int tmp =0;
            if(i==k){
                continue;
            }
            rep(j,D){
                tmp += pow(X[i][j]-X[k][j],2);
            }
            if(pows[tmp] == 1){
                ans++;
            }
        }
    }



    cout << ans << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:71:24: error: 'pow' was not declared in this scope; did you mean 'pows'?
   71 |                 tmp += pow(X[i][j]-X[k][j],2);
      |                        ^~~
      |                        pows
a.cc: In function 'Int printX(Int, Int, Int, int)':
a.cc:44:11: warning: control reaches end of non-void function [-Wreturn-type]
   44 |     printX(r,D,nextX,count+1);
      |     ~~~~~~^~~~~~~~~~~~~~~~~~~
Language: C++

#include<iostream>
#include<queue>
#include<algorithm>
#include<vector>
#include<string>
#include<utility>
#include<cstdlib>
#include<math>
using namespace std;

template<class T>inline bool chmax(T&a, T b) { if (a < b) { a = b; return 1; }return 0; }
template<class T>inline bool chmin(T&a, T b) { if (a > b) { a = b; return 1; }return 0; }




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

		for (int j = i+1; j < n; j++) {
			double sum = 0;
			for (int k = 0; k < d; k++) {

				
				sum += pow(x[j][k] - x[i][k], 2);

			}
			sum = sqrt(sum);
			if (ceil(sum) == floor(sum))cnt++;
		}
	}





	cout << cnt << endl;

	return 0;
}


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

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

int n, d;
double x[10][10], y[10][10];

double dd(int y, int z) {
	double ret = 0;
	for (int i = 0; i < d; i++) {
		ret += (x[y][i] - x[z][i]) * (x[y][i] - x[z][i]);
	}
	return std::sqrt(ret);
}

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

	for (int i = 0; i < n; i++) {
		for (int j = i + 1; j < n; j++) {
			double tmp = dd(i, j);
			if (tmp - int(tmp) == 0)
				ret++;
		}
	}
	cout << ret << endl;
	return 0;
}

Compiler output:
a.cc: In function 'double dd(int, int)':
a.cc:13:21: error: 'sqrt' is not a member of 'std'
   13 |         return std::sqrt(ret);
      |                     ^~~~
Language: C++

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

using namespace std;



int main(int argc, char const *argv[]){
    int n, d, answer=0;
    cin >> n >> d;
    vector<int> x;
    int _x;
    for(int i=0;i<(n*d);i++){
        cin >> _x;
        x.push_back(_x);
    }
    for(int i=0;i<n;i++){
        for(int j=(i+1);j<n;j++){
            double sum1 = 0;
            for(int k=0;k<d;k++){
                sum1+=(x[i*d+k]-x[j*d+k])*(x[i*d+k]-x[j*d+k]);
            }
            sum1 = sqrt(sum1);
            answer += int(double(int(sum1))==sum1);
        }
    }
    cout << answer << endl;


    return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:25:20: error: 'sqrt' was not declared in this scope
   25 |             sum1 = sqrt(sum1);
      |                    ^~~~
Language: C++

#include <iostream>
#include <unordered_map>
#include <vector>
#include <algorithm>
#include <stdio.h>
#include <stdlib.h>
#include <cstring>

using namespace std;


int main(){
    int N, D;
    std::vector<std::vector<int>> points;
    cin>>N>>D;
    for(int i=0; i<N; i++){
        std::vector<int> tmp;
        for(int j=0; j<D; j++){
            int X;
            cin>>X;
            tmp.push_back(X);
        }
        points.push_back(tmp);
    }

    int answer = 0;
    for(int i=0; i<N-1; i++){
        for(int j=i+1; j<N; j++){
            std::vector<int> a = points[i];
            std::vector<int> b = points[j];
            double norm=0;
            for(int k=0; k<D; k++){
                norm += pow(a[k]-b[k],2);
            }
            norm = sqrt(norm);

            if(ceil(norm)==floor(norm))
                answer++;
        }
    }

    cout<<answer<<endl;

    return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:25: error: 'pow' was not declared in this scope
   33 |                 norm += pow(a[k]-b[k],2);
      |                         ^~~
a.cc:35:20: error: 'sqrt' was not declared in this scope
   35 |             norm = sqrt(norm);
      |                    ^~~~
a.cc:37:16: error: 'ceil' was not declared in this scope
   37 |             if(ceil(norm)==floor(norm))
      |                ^~~~
a.cc:37:28: error: 'floor' was not declared in this scope
   37 |             if(ceil(norm)==floor(norm))
      |                            ^~~~~
Language: C++

#include <algorithm>
#include <iostream>
#include <cstring>
#include <bitset>
#include <string>
#include <cstdio>
#include <vector>
#include <queue>
#include <stack>
#include <map>

int n, d, ans;
long long a[20][20];

int main()
{
    std::ios::sync_with_stdio(0), std::cin.tie(0), std::cout.tie(0);
    std::cin >> n >> d;
    for (int i = 1; i <= n; ++i)
        for (int j = 1; j <= d; ++j)
            std::cin >> a[i][j];
    for (int i = 1; i < n; ++i)
    {
        for (int j = i + 1; j <= n; ++j)
        {
            long long s = 0;
            for (int k = 1; k <= d; ++k)
                s += (a[i][k] - a[j][k]) * (a[i][k] - a[j][k]);
            if ((int)std::sqrt(s) * (int)std::sqrt(s) == s)
                ++ans;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:29:27: error: 'sqrt' is not a member of 'std'; did you mean 'sort'?
   29 |             if ((int)std::sqrt(s) * (int)std::sqrt(s) == s)
      |                           ^~~~
      |                           sort
a.cc:29:47: error: 'sqrt' is not a member of 'std'; did you mean 'sort'?
   29 |             if ((int)std::sqrt(s) * (int)std::sqrt(s) == s)
      |                                               ^~~~
      |                                               sort
Language: C++

#include<bits/stdc++.h>
using namespace std;
int a[50][50],n,ans;
int main(){
  cin>>n>>d;
  for(int i=1;i<=n;i++){
    for(int j=1;j<=n;j++){cin>>a[i][j];}}
  for(int i=1;i<n;i++){
    for(int j=i+1;j<=n;j++){
      	int res=0;
      	for(int k=1;k<=d;k++)res+=(a[i][k]-a[j][k])*(a[i][k]-a[j][k]);
      	int pp=sqrt(res);
      	if(pp*pp==res)ans++;
    }}
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:11: error: 'd' was not declared in this scope
    5 |   cin>>n>>d;
      |           ^
Language: C++

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

int n, d;
double x[10][10], y[10][10];

double dd(int y, int z) {
	double ret = 0;
	for (int i = 0; i < d; i++) {
		ret += (x[y][i] - x[z][i]) * (x[y][i] - x[z][i]);
	}
	return sqrt(ret);
}

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

	for (int i = 0; i < n; i++) {
		for (int j = i + 1; j < n; j++) {
			double tmp = dd(i, j);
			if (tmp - int(tmp) == 0)
				ret++;
		}
	}
	cout << ret << endl;
	return 0;
}

Compiler output:
a.cc: In function 'double dd(int, int)':
a.cc:13:16: error: 'sqrt' was not declared in this scope
   13 |         return sqrt(ret);
      |                ^~~~
Language: C++

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

using namespace std;



int main(int argc, char const *argv[]){
    int n, d, answer=0;
    cin >> n >> d;
    vector<int> x;
    int _x;
    for(int i=0;i<(n*d);i++){
        cin >> _x;
        x.push_back(_x);
    }
    for(int i=0;i<n;i++){
        for(int j=(i+1);j<n;j++){
            double sum = 0;
            for(int k=0;k<d;k++){
                sum+=(x[i*d+k]-x[j*d+k])*(x[i*d+k]-x[j*d+k]);
            }
            sum = sqrt(sum);
            answer += int(double(int(sum))==sum);
        }
    }
    cout << answer << endl;


    return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:25:19: error: 'sqrt' was not declared in this scope
   25 |             sum = sqrt(sum);
      |                   ^~~~
Language: C

#include<iostream>
#include<cstdio>
#include<vector>
#include<map>
#include<unordered_map>
#include<set>
#include<string>
#include<algorithm>
#include<math.h>
#include<numeric>
#include<iomanip>
#include<queue>
#include<functional>
#include<iso646.h>
#include<bitset>

using namespace std;

typedef vector<int> vi;
typedef pair<int, int> pii;
typedef long long ll;
typedef vector<long long> vll;
typedef pair<long long, long long> pll;

const double INF = 1e16;
const ll MOD = 1e9 + 7;
//const ll MOD = 998244353;

template<class T> inline bool chmin(T& a, T b) {
	if (a > b) {
		a = b;
		return true;
	}
	return false;
}
template<class T> inline bool chmax(T& a, T b) {
	if (a < b) {
		a = b;
		return true;
	}
	return false;
}


int main() {
	ll i, j;
	ll N, D;
	cin >> N >> D;
	vector<vector<double>> X;
	for (i = 0; i < N; i++) {
		vector<double> x;
		for (j = 0; j < D; j++) {
			double xj;
			cin >> xj;
			x.push_back(xj);
		}
		X.push_back(x);
	}

	ll ans = 0;
	for (i = 0; i < N; i++) {
		for (j = i + 1; j < N; j++) {
			double d = 0;
			for (ll k = 0; k < D; k++) {
				double dabs = abs(X[i][k] - X[j][k]);
				d += pow(dabs, (int)2);
			}
			d = sqrt(d);
			double e;
			if (modf(d, &e) < 1e-5) {
				ans++;
			}
		}
	}
	cout << ans << endl;

	return 0;
}


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

#include<iostream>
#include<queue>
#include<algorithm>
#include<vector>
#include<string>
#include<utility>
#include<cstdlib>
using namespace std;

template<class T>inline bool chmax(T&a, T b) { if (a < b) { a = b; return 1; }return 0; }
template<class T>inline bool chmin(T&a, T b) { if (a > b) { a = b; return 1; }return 0; }




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

		for (int j = i+1; j < n; j++) {
			double sum = 0;
			for (int k = 0; k < d; k++) {

				
				sum += pow(x[j][k] - x[i][k], 2);

			}
			sum = sqrt(sum);
			if (ceil(sum) == floor(sum))cnt++;
		}
	}



	cout << cnt << endl;

	return 0;
}


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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:19:12: error: expected ';' before 'for'
   19 |       sum=0
      |            ^
      |            ;
   20 |       for (k=0;k<N;++k){
      |       ~~~   
a.cc:20:23: error: expected ';' before ')' token
   20 |       for (k=0;k<N;++k){
      |                       ^
      |                       ;
a.cc:24:14: error: expected ';' before '}' token
   24 |         cnt++
      |              ^
      |              ;
   25 |       }
      |       ~
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int x[110][110],ans;
int main()
{
  	int N,D;
  	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;i++)
      	for(int j=0;j<i;j++)
        {
          	long long cnt=0LL;
          	for(int k=0;k<D;k++)
              	cnt+=(x[i][k]-x[j][k])*(x[i][k]-x[j][k]);
          	if(sqrt(cnt)==floor(sqrt(cnt)))
              	ans++;
        }
 	cout<<ans<<endl;
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:20: error: 'sqrt' was not declared in this scope
   18 |                 if(sqrt(cnt)==floor(sqrt(cnt)))
      |                    ^~~~
a.cc:18:31: error: 'floor' was not declared in this scope
   18 |                 if(sqrt(cnt)==floor(sqrt(cnt)))
      |                               ^~~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:8: error: 'i' was not declared in this scope
   16 |   for (i=0;i<N;++i){
      |        ^
a.cc:17:10: error: 'j' was not declared in this scope
   17 |     for (j=i+1;j<N;++j){
      |          ^
a.cc:18:12: error: expected ';' before 'for'
   18 |       sum=0
      |            ^
      |            ;
   19 |       for (k=0;k<N;++k){
      |       ~~~   
a.cc:19:16: error: 'k' was not declared in this scope
   19 |       for (k=0;k<N;++k){
      |                ^
a.cc:23:14: error: expected ';' before '}' token
   23 |         cnt++
      |              ^
      |              ;
   24 |       }
      |       ~
Language: C++

//
// Created by kuroneko on 2019-07-06.
//

#include<iostream>
#include<cmath>
using namespace std;
typedef long long int llint;
typedef long long ll;
typedef long int lint;
typedef vector<char> vchar;
typedef vector<int> vint;
typedef vector<long long> vll;
typedef vector<vector<long long>> vvll;
typedef vector<vector<int>> vvint;
typedef vector<vector<char>> vvchar;
#define vsort(v) sort((v).begin(), (v).end())
#define vrsort(v) sort((v).rbegin(), (v).rend())
#define vreverse(v) reverse((v).begin(), (v).end())
#define pb(a) push_back(a)
#define INF 2000000009
#define MOD 1000000007
int main() {
    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];
        }
    }
    int ans = 0;
    for (int i = 0; i < N; i++) {
        for (int j = i + 1; j < N; j++) {
            double sum = 0;
            for (int k = 0; k < D; k++) {
                sum += double(X[i][k] - X[j][k]) * double(X[i][k] - X[j][k]);
            }
            sum = sqrt(sum);
            if (sum == int(sum)) ans++;
        }
    }
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc:11:9: error: 'vector' does not name a type
   11 | typedef vector<char> vchar;
      |         ^~~~~~
a.cc:12:9: error: 'vector' does not name a type
   12 | typedef vector<int> vint;
      |         ^~~~~~
a.cc:13:9: error: 'vector' does not name a type
   13 | typedef vector<long long> vll;
      |         ^~~~~~
a.cc:14:9: error: 'vector' does not name a type
   14 | typedef vector<vector<long long>> vvll;
      |         ^~~~~~
a.cc:15:9: error: 'vector' does not name a type
   15 | typedef vector<vector<int>> vvint;
      |         ^~~~~~
a.cc:16:9: error: 'vector' does not name a type
   16 | typedef vector<vector<char>> vvchar;
      |         ^~~~~~
Language: C++

/*Lucky_Glass*/
#include<map>
#include<vector>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
const int N=10;
int n,d;
int pos[N+5][N+5];
int main(){
	scanf("%d%d",&n,&d);
	for(int i=1;i<=n;i++){
		for(int j=1;j<=d;j++)
			scanf("%d",&pos[i][j]);
	}
	int ans=0;
	for(int u=1;u<=n;u++)
		for(int v=u+1;v<=n;v++){
			long long tot=0;
			for(int i=1;i<=d;i++)
				tot+=1ll*(pos[u][i]-pos[v][i])*(pos[u][i]-pos[v][i]);
			double _tot=sqrt(tot);
			long long A=(long long)ceil(_tot),B=(long long)floor(_tot);
			if(A*A==tot || B*B==tot)
				ans++;
		}
	printf("%d\n",ans);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:37: error: 'sqrt' was not declared in this scope
   23 |                         double _tot=sqrt(tot);
      |                                     ^~~~
a.cc:24:48: error: 'ceil' was not declared in this scope
   24 |                         long long A=(long long)ceil(_tot),B=(long long)floor(_tot);
      |                                                ^~~~
a.cc:25:40: error: 'B' was not declared in this scope
   25 |                         if(A*A==tot || B*B==tot)
      |                                        ^
Language: C++

import math

def dist(x1,x2):
    tmp = 0
    for i,j in zip(x1,x2):
        tmp += (i - j) * (i - j)
    return math.sqrt(tmp)

n,d = map(int,input().split()) 
x = []
for i in range(n):
    x.append(list(map(int,input().split())))

count = 0
for i in range(n):
    for j in range(i+1,n):
        tmp = dist(x[i],x[j])
        if abs(tmp - round(tmp)) < 0.01:
            count += 1
print(count)


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import math
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <queue>


using namespace std;
using ll = long long;

const ll mod = 1000000007;

int N, D, x[11][11];

int main()
{
	cin >> N >> D;
	for (int i = 0; i < N; i++)
	{
		for (int j = 0; j < D; j++)
		{
			cin >> x[i][j];
		}
	}
	int ans = 0;
	for (int i = 0; i < N; i++)
	{
		for (int j = i + 1; j < N; j++)
		{
			int temp = 0;
			for (int k = 0; k < D; k++)
			{
				temp += (x[i][k] - x[j][k]) * (x[i][k] - x[j][k]);
			}
			if (sqrt((double)temp) == floor(sqrt((double)temp))) ans++;
		}
	}
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:29: error: 'sqrt' was not declared in this scope
   34 |                         if (sqrt((double)temp) == floor(sqrt((double)temp))) ans++;
      |                             ^~~~
a.cc:34:51: error: 'floor' was not declared in this scope
   34 |                         if (sqrt((double)temp) == floor(sqrt((double)temp))) ans++;
      |                                                   ^~~~~
Language: C++

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

using namespace std;

vector < int > points[100];
int n, d, cnt;
long long dp[100][100];

int main()
{
    cin >> n >> d;
    for( int i = 0; i < n;i ++ ){
        for( int j = 0; j < d; j ++ ){
            int x; cin >> x;
            points[i].push_back( x );
        }
    }
    for( int i = 0; i < n; i ++ ){
        for( int j = 0; j < i; j ++ ){
            for ( int k = 0; k < d; k ++ ){
                dp[i][j] += ( points[i][k] - points[j][k] ) * ( points[i][k] - points[j][k]);
            }
            long long b = sqrt( dp[i][j] );
            if( b * b == dp[i][j] )cnt ++;
        }
    }
    cout << cnt;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:27: error: 'sqrt' was not declared in this scope
   25 |             long long b = sqrt( dp[i][j] );
      |                           ^~~~
Language: C++

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

int main() {
	int n, d;
	cin>>n>>d;
	vector<int> node[15];
	for (int i=0; i<n; i++)
		for (int j=0; j<d; j++)
			node[i].push_back(j);
	int ans = 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 = (node[i][k]-node[j][k])*(node[i][k]-node[j][k]);
			int sq = sqrt(dist);
			if (sq * sq == dist)
				ans++;
		}
	cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'vector' was not declared in this scope
    8 |         vector<int> node[15];
      |         ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include <cmath>
  +++ |+#include <vector>
    3 | using namespace std;
a.cc:8:16: error: expected primary-expression before 'int'
    8 |         vector<int> node[15];
      |                ^~~
a.cc:11:25: error: 'node' was not declared in this scope
   11 |                         node[i].push_back(j);
      |                         ^~~~
a.cc:17:41: error: 'node' was not declared in this scope
   17 |                                 dist = (node[i][k]-node[j][k])*(node[i][k]-node[j][k]);
      |                                         ^~~~
Language: C++

#include <iostream>
#include <cmath>
using namespace std;
int main(){
  int n,d;cin>>n>>d;
  int a[n][d];
  for(int i = 0; n > i; i++){
    for(int j = 0; d > j; j++){
      cin>>a[i][j];
    }
  }
  for(int i = 0; n > i; i++){
    for(int j = i; n > j; j++){
      if(i==j)continue;
      int tmp = 0;
      for(int k = 0; d > k; k++){
        tmp += abs(a[i][k]-a[j][k])*abs(a[i][k]-a[j][k]);
      }
      if(floor(sqrt(tmp))*floor(sqrt(tmp))==tmp)ans++;
    }
  }
  cout << ans << endl;
}
      

Compiler output:
a.cc: In function 'int main()':
a.cc:19:49: error: 'ans' was not declared in this scope; did you mean 'abs'?
   19 |       if(floor(sqrt(tmp))*floor(sqrt(tmp))==tmp)ans++;
      |                                                 ^~~
      |                                                 abs
a.cc:22:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   22 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C++

#include <bits/stdc++.h>

using namespace std;

#define REP(i, a, n) for (int i = a, _n = n; i <= _n; ++i)
#define DREP(i, a, n) for (int i = a, _n = n; i >= _n; --i)
#define FOR(i, a, n) for (int i = a, _n = n; i < _n; ++i)
#define EREP(i, a) for (int i = first[a]; i; i = edge[i].nxt)
#define debug(x) cout << #x << " = " << x << endl

int n;
vector<int> V[100];
int main () {
	scanf ("%d%d", &n, &d);

	REP (i, 1, n) 
		REP (j, 1, d) {
			int a;
			scanf ("%d", &a);
			V[i].push_back(a);
		}

	int ans = 0;
	REP (i, 1, n) REP(j, i + 1, n) {
		long long s = 0;
		FOR (k, 0, d) {
			s += (V[i][k] - V[j][k]) * (V[i][k] - V[j][k]);
		}
		int tem = sqrt(s);
		if (tem * tem == s) ++ans;
	}
	printf ("%d\n", ans);
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:29: error: 'd' was not declared in this scope
   14 |         scanf ("%d%d", &n, &d);
      |                             ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const int mxn= 5e5+5;
// check for forloop
// take input
// overflow
// intialize variable
// go for easy solution
#define mod 1000000007
ll INF = 1000000000000000005LL;
#define endl '\n'
void rishabh(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
}
int main(){
    ll n,k;
    cin>>n>>k;
    if(k-n>=2019){
        cout<<0;
    }
    else{
        ll ans=2019;
        for(int i=n;i<k;i++){
            for(int j=i+1;j<=k;j++){
                ans=min(ans,(i*j)%2019);
            }
        }
        cout<<ans;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:24: error: no matching function for call to 'min(ll&, int)'
   28 |                 ans=min(ans,(i*j)%2019);
      |                     ~~~^~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:28:24: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   28 |                 ans=min(ans,(i*j)%2019);
      |                     ~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:28:24: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   28 |                 ans=min(ans,(i*j)%2019);
      |                     ~~~^~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#include<iostream>
#include<vector>
#include<map>
#include<math.h>

#define irep(i,n) for(int i = 0; i < (int)(n); i++)
#define irep2(i,a,n) for(int i = (int)(a); i <= (int)(n); i++)
#define irrep(i,n) for(int i = (int)(n-1); i > -1; i--)
#define irrep2(i,n,a) for(int i = (int)(n); i >= (int)(a); i--)

#define fi first
#define se second

using namespace std;

using ll = long long;
using v_int = vector<int>;
using v2_int = vector<v_int>;
using v_ll = vector<ll>;
using v2_ll = vector<v_ll>;
using v_string = vector<string>;
using v_bool = vector<bool>;
using v2_bool = vector<v_bool>;
using pii = pair<int, int>;
using mii = map<int, int>;

const double PI = 3.1415926535897932;
const int INF = (int)2e9;
const ll LINF = (ll)2e18;
const ll MOD = 1000000007;
const int dc[8] = {1, -1, 0,  0, 1, -1,  1, -1};
const int dr[8] = {0,  0, 1, -1, 1,  1, -1, -1};

template<typename T, typename U> inline
ostream& operator<<(ostream &o, pair<T,U> &p) {
    return o << "{" << p.first << "," << p.second << "}";
}
template<typename T> inline
istream& operator>>(istream &is, vector<T> &vec) {
    for(auto &v : vec) { is >> v; }
    return is;
}
template<typename T> inline
ostream& operator<<(ostream &os, vector<T> &vec) {
    for(auto &v : vec) { os << v << ",";}
    return os;
}
template<typename T> inline
ostream& operator<<(ostream &os, vector<vector<T> > &mat) {
    for(auto &row : mat) { os << row << endl; }
    return os;
}

template<typename T> inline
void chmin(T &a, T b) { a = min(a, b); }
template<typename T> inline
void chmax(T &a, T b) { a = max(a, b); }

int main(void)
{
    ll l, r;
    cin >> l >> r;

    l %= 2019;
    r %= 2019;
    
    ll ans = 2019;
    for(int i = l; i <= r; i++) {
        for(int j = i+1; j <= r; j++) {
            chmin(ans, ((i*j)%2019));
        } 
    }
    cout << ans << endl;
    return 0;
} /*atcoder*/



Compiler output:
a.cc: In function 'int main()':
a.cc:71:18: error: no matching function for call to 'chmin(ll&, int)'
   71 |             chmin(ans, ((i*j)%2019));
      |             ~~~~~^~~~~~~~~~~~~~~~~~~
a.cc:56:6: note: candidate: 'template<class T> void chmin(T&, T)'
   56 | void chmin(T &a, T b) { a = min(a, b); }
      |      ^~~~~
a.cc:56:6: note:   template argument deduction/substitution failed:
a.cc:71:18: note:   deduced conflicting types for parameter 'T' ('long long int' and 'int')
   71 |             chmin(ans, ((i*j)%2019));
      |             ~~~~~^~~~~~~~~~~~~~~~~~~
Language: C

#define rep(i,n) for (int i=0;i<n;i++)
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define mod 1000000007
 
 
int main(){
  
  unsigned long long l, r, ll, rr, minn;
  
  ll = l % 2019;
  rr = r % 2019;
  
  minn = 2019;
  if(r - l > 2019) rr += 2019;
  rep(ll, rr){
      rep(ll + i - ll + 1, rr + 1){
          if(minn > i * j % 2019){
              minn = i * j * 2019;
          }
      }
  }
  printf('%d', minn);
  return 0;
}


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

define rep(i,n) for (int i=0;i<n;i++)
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define mod 1000000007
 
 
int main(){
  
  unsigned long long l, r, ll, rr, minn;
  
  ll = l % 2019;
  rr = r % 2019;
  
  minn = 2019;
  if(r - l > 2019) rr += 2019;
  rep(ll, rr){
      rep(ll + i - ll + 1, rr + 1){
          if(minn > i * j % 2019){
              minn = i * j * 2019
          }
      }
  }
  printf('%d', minn)
}


Compiler output:
main.c:1:1: error: unknown type name 'define'
    1 | define rep(i,n) for (int i=0;i<n;i++)
      | ^~~~~~
main.c: In function 'rep':
main.c:1:17: error: expected declaration specifiers before 'for'
    1 | define rep(i,n) for (int i=0;i<n;i++)
      |                 ^~~
main.c:1:30: error: expected declaration specifiers before 'i'
    1 | define rep(i,n) for (int i=0;i<n;i++)
      |                              ^
main.c:1:34: error: expected declaration specifiers before 'i'
    1 | define rep(i,n) for (int i=0;i<n;i++)
      |                                  ^
main.c:2:10: fatal error: bits/stdc++.h: No such file or directory
    2 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C

#include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i,n) for(int i=0;i<(n);i++)
#define rrep(i,n) for(int i = 1; i <= (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define all(v) v.begin(),v.end()
#define len(x) (ll)(x).length()
#define maxs(x,y) x = max(x,y)
#define mins(x,y) x = min(x,y)
#define pb push_back
#define sz(x) (ll)(x).size()
#define v(T) vector<T>
#define vv(T) vector<vector<T>>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<P> vp;
ll gcd(ll a,ll b){if(a%b==0){return b;}else{return(gcd(b,a%b));}}
ll lcm(ll a,ll b){return a*b/gcd(a,b);}
const int INF=1e9;
const ll INFS=1e18;
const int MOD=INF+7;
const int di[] = {-1,0,1,0};
const int dj[] = {0,-1,0,1};
const double PI=acos(-1);
 
int main() {
  int L,R;
  cin>>L>>R;
  int l=L%2019;
  int r=R%2019;
  cout<<l*(l+1)<<endl;
}

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

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

#define FAST ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);

#define MAXX 100005
#define INF INT_MAX

#define PI   3.14159265358979323846264338327950

#define PB push_back
#define PF push_front
#define F first
#define S second

#define fixx(n) fixed << setprecision(n)

#define ll 	 long long 

#define mod  1000000007



int main()
{
	FAST;
	
	ll n, m;
	cin >> n >> m;
	
	int ans = 2019;
	
	for(ll i = n; i < m; i ++){
		for(ll j = i + 1; j <= m; j ++){
			ans = min(ans, (i*j)  % 2019);
			if(ans == 0){
				break;
			}
		}
		if(ans == 0){
			break;
		}
	}
	cout << ans;
	return 0;
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:34: error: no matching function for call to 'min(int&, long long int)'
   35 |                         ans = min(ans, (i*j)  % 2019);
      |                               ~~~^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:35:34: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   35 |                         ans = min(ans, (i*j)  % 2019);
      |                               ~~~^~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:35:34: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   35 |                         ans = min(ans, (i*j)  % 2019);
      |                               ~~~^~~~~~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,N) for (int i = 0; i < (N); ++i)
#define all(v) v.begin(), v.end()
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int inf{int(1e9)};
int main(void){
  ll L, R;
  cin >> L >> R;
  /*
  ll sa = R - L;
  int l = L % 2019;
  int r = R % 2019;
  if (l == 0 || l == 2018) cout << 0 << endl;
  else if (sa < 2019 - l){

  }
  else cout << 0 << endl;
  */

  if (R - L >= 2018) cout << 0 << endl;
  else{
    int ans = 2018;
    for (ll i = L; i <= R; i++){
      for (ll j = i + 1; j <= R; j++){
        int x = i*j%2019;
        ans = min(ans, x);
      }
    }
  }
  cout << ans << endl;

  // R = min(R, L + 4038);  //???
  // int ans = 2018;
  // for (ll i = L; i <= R; i++){
  //   for (ll j = i + 1; j <= R; j++){
  //     int x = i*j%2019;
  //     ans = min(ans, x);
  //   }
  // }
  // cout << ans << endl;
  return 0;
}


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

#include <bits/stdc++.h>
#define rep(i,N) for (int i = 0; i < (N); ++i)
#define all(v) v.begin(), v.end()
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int inf{int(1e9)};
int main(void){
  ll L, R;
  cin >> L >> R;
  /*
  ll sa = R - L;
  int l = L % 2019;
  int r = R % 2019;
  if (l == 0 || l == 2018) cout << 0 << endl;
  else if (sa < 2019 - l){

  }
  else cout << 0 << endl;
  */

  if (R - L >= 2018) cout << 0 << endl;
  else{
    int ans = 2018;
    for (ll i = L; i <= R; i++){
      for (ll j = i + 1; j <= R; j++){
        int x = i*j%2019;
        ans = min(ans, x);
      }
  }
  cout << ans << endl;

  // R = min(R, L + 4038);  //???
  // int ans = 2018;
  // for (ll i = L; i <= R; i++){
  //   for (ll j = i + 1; j <= R; j++){
  //     int x = i*j%2019;
  //     ans = min(ans, x);
  //   }
  // }
  // cout << ans << endl;
  return 0;
}


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