Language: C++

/*
#include<rabbit>;
using blueHulkStress;
using AceOfSpades;
*/
#include<bits/stdc++.h>
#include<stdio.h>
using namespace std;
const double PI = acos(-1.0);
const double EPS = (1e-9);
typedef long long ll;
typedef unsigned long long ull;
#define flush fflush(stdout), cout.flush()
#define all(v) ((v).begin()),((v).end())
#define rall(v) ((v).rbegin()),((v).rend())
#define clr(v,line) memset(v,line,sizeof(v))
#define rep(i,n) for(int(i)=0;(i)<(int)(n);(i)++)
#define vi vector<int>
#define vll vector<ll>
#define pii pair<int,int>
#define pll pair<ll,ll>
#define lcm(a,b) (a*(b/__gcd(a,b)))
#define P 1000000007
#define endl '\n'
const int dx[] = {1,-1,0,0,1,-1,1,-1};
const int dy[] = {0,0,1,-1,1,-1,-1,1};
const int dxhorse[] = {-2,-2,-1,-1,1,1,2,2};
const int dyhorse[] = {1,-1,2,-2,2,-2,1,-1};
void file() {
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
}
void fast()
{
	std::ios_base::sync_with_stdio(0);
	cin.tie(NULL); cout.tie(NULL);
}

int n, k;

vi v[20];

double cacl(int r, int c)
{
	ll sum = 0;
	for(/*
#include<rabbit>;
using blueHulkStress;
using AceOfSpades;
*/
#include<bits/stdc++.h>
#include<stdio.h>
using namespace std;
const double PI = acos(-1.0);
const double EPS = (1e-9);
typedef long long ll;
typedef unsigned long long ull;
#define flush fflush(stdout), cout.flush()
#define all(v) ((v).begin()),((v).end())
#define rall(v) ((v).rbegin()),((v).rend())
#define clr(v,line) memset(v,line,sizeof(v))
#define rep(i,n) for(int(i)=0;(i)<(int)(n);(i)++)
#define vi vector<int>
#define vll vector<ll>
#define pii pair<int,int>
#define pll pair<ll,ll>
#define lcm(a,b) (a*(b/__gcd(a,b)))
#define P 1000000007
#define endl '\n'
const int dx[] = {1,-1,0,0,1,-1,1,-1};
const int dy[] = {0,0,1,-1,1,-1,-1,1};
const int dxhorse[] = {-2,-2,-1,-1,1,1,2,2};
const int dyhorse[] = {1,-1,2,-2,2,-2,1,-1};

int n, k;

vi v[20];

double cacl(int r, int c)
{
	ll sum = 0;
	for(int i=0; i<k;i++)
		sum+=(v[r][i] - v[c][i]) * (v[r][i] - v[c][i]);
	return sqrt(sum);
}
int main(int argc, char const *argv[])
{
	file();
	
	cin>>n>>k;

	for (int i = 0; i < n; ++i)
	{
		v[i].resize(k);
		rep(j,k)cin>>v[i][j];
	}
	ll ans = 0;

	for (int i = 0; i < n - 1; ++i)
	{
		for(int j = i+1; j<n; j++)
		{
			double ret = cacl(i,j);
			ans+=ret == int(ret);
		}
	}
	cout<<ans;
}	int i=0; i<k;i++)
		sum+=(v[r][i] - v[c][i]) * (v[r][i] - v[c][i]);
	return sqrt(sum);
}
int main(int argc, char const *argv[])
{
	
	cin>>n>>k;

	for (int i = 0; i < n; ++i)
	{
		v[i].resize(k);
		rep(j,k)cin>>v[i][j];
	}
	ll ans = 0;

	for (int i = 0; i < n - 1; ++i)
	{
		for(int j = i+1; j<n; j++)
		{
			double ret = cacl(i,j);
			ans+=ret == int(ret);
		}
	}
	cout<<ans;
}	

Compiler output:
a.cc: In function 'double cacl(int, int)':
a.cc:55:1: error: expected primary-expression before 'using'
   55 | using namespace std;
      | ^~~~~
a.cc:57:1: error: expected primary-expression before 'const'
   57 | const double EPS = (1e-9);
      | ^~~~~
a.cc:56:30: error: expected ')' before 'const'
   56 | const double PI = acos(-1.0);
      |                              ^
      |                              )
   57 | const double EPS = (1e-9);
      | ~~~~~                         
a.cc:48:12: note: to match this '('
   48 |         for(/*
      |            ^
a.cc:82:1: error: a function-definition is not allowed here before '{' token
   82 | {
      | ^
a.cc:89:1: error: a function-definition is not allowed here before '{' token
   89 | {
      | ^
a.cc:110:25: error: expected ';' before ')' token
  110 | }       int i=0; i<k;i++)
      |                         ^
      |                         ;