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

#include<iostream>
#include<vector>
#include<algorithm>
#define INF=-10000000000000000
int main(void){
    int n,a,max=INF;
    while(std::cin>>n){
        if(n==0) break;
        std::vector<int> dp(n+1);
        dp[0]=INF;
        for(int i=0;i<n;i++){
            std::cin>>a;
            dp[i+1]=(a>0?dp[i]+a:a);
            max=std::max(max,dp[i+1]);
        }
        std::cout<<max<<std::endl;
    
    }
    return 0;
}


Compiler output:
a.cc:4:9: warning: ISO C++11 requires whitespace after the macro name
    4 | #define INF=-10000000000000000
      |         ^~~
a.cc: In function 'int main()':
a.cc:4:12: error: expected primary-expression before '=' token
    4 | #define INF=-10000000000000000
      |            ^
a.cc:6:17: note: in expansion of macro 'INF'
    6 |     int n,a,max=INF;
      |                 ^~~
a.cc:4:12: error: expected primary-expression before '=' token
    4 | #define INF=-10000000000000000
      |            ^
a.cc:10:15: note: in expansion of macro 'INF'
   10 |         dp[0]=INF;
      |               ^~~
Language: C++

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

int main(){
	int a[10000],n,s,m;
	while(cin>>n,n){
		m=INT_MIN;
		for(int i=0;i<n;i++)cin>>a[i];
		for(int i=1;i<=n;i++){
			for(int j=0;j<n-i+1;j++){
				s=0;
				for(int k=0;k<i;k++){
					s+=a[j+k];
				}
				m=max(m,s);
			}
		}
		cout<<m<<endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: 'INT_MIN' was not declared in this scope
   11 |                 m=INT_MIN;
      |                   ^~~~~~~
a.cc:6:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    5 | #include <math.h>
  +++ |+#include <climits>
    6 | using namespace std;
Language: C++

#include <iostream>
#include <algorithm>
#include <limit.h>
using namespace std;

int main(){
	int a[10000],n,s,m;
	while(cin>>n,n){
		m=INT_MIN;
		for(int i=0;i<n;i++)cin>>a[i];
		for(int i=1;i<=n;i++){
			for(int j=0;j<n-i+1;j++){
				s=0;
				for(int k=0;k<i;k++){
					s+=a[j+k];
				}
				m=max(m,s);
			}
		}
		cout<<m<<endl;
	}
}

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

#include<iostream>
#include<vector>
#include<numeric>
#include<functional>
using namespace std;
int main(){
	int n;
	while(cin >> n){
		if(n==0) break;
		vector<int> a;
		vector<int> s;
		int sum=0;
		for(int i=0;i<n;++i){
			int t;
			cin >> t;
			a.push_back(t);
		}
		for(int i=0;i<a.size();++i){
			for(int j=i+1;j<=a.size();++j){
				s.push_back(accumulate(a.begin()+i,a.begin()+j,0));
			}
		}
		stable_sort(s.begin(),s.end(),greater<int>());
		cout << s[0] << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:17: error: 'stable_sort' was not declared in this scope
   23 |                 stable_sort(s.begin(),s.end(),greater<int>());
      |                 ^~~~~~~~~~~
Language: C++

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

int main(){
	const int nmax = 5001;
	int n;
	int nums[nmax];
	while(cin >> n){
		if(n == 0) break;
		int a;
		for(int i = 1;i <= n; i++){
			cin >> a;
			nums[i] = a;
		}
		int total_max = -INT_MAX;
		for(int i = 1; i <= n; i++){
			int total = 0;
			for(int j = i; j <= n; j++){
				total += nums[j];
				total_max = max(total_max, total);
			}
		}
		cout << total_max << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:34: error: 'INT_MAX' was not declared in this scope
   17 |                 int total_max = -INT_MAX;
      |                                  ^~~~~~~
a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    3 | #include <cstdlib>
  +++ |+#include <climits>
    4 | using namespace std;
Language: C++

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

int main() {
	int n;
	vector<int> r;
	while (true)
	{
		scanf("%d", &n);
		if (n==0)break;
		int max=INT_MIN,now=0,in=0;
		for (int i=0; i<n; i++)
		{
			cin >> in;
			now += in;
			if (now > max) max=now;
			if (now < 0) now=0;
		}
		r.push_back(max);
	}
	for (int i=0; i<r.size(); i++)
	{
		cout << r[i] << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:25: error: 'INT_MIN' was not declared in this scope
   12 |                 int max=INT_MIN,now=0,in=0;
      |                         ^~~~~~~
a.cc:3:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    2 | #include <vector>
  +++ |+#include <climits>
    3 | using namespace std;
a.cc:15:32: error: 'in' was not declared in this scope; did you mean 'i'?
   15 |                         cin >> in;
      |                                ^~
      |                                i
a.cc:16:25: error: 'now' was not declared in this scope
   16 |                         now += in;
      |                         ^~~
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cstring>
#include <map>
#include <queue>
#include <stack>
#include <set>
#include <functional>
#include <sstream>
#include <complex>
using namespace std;

#define REP(i,a,n) for(int i=(a);i<(int)(n);i++)
#define rep(i,n) REP(i,0,n)
#define pb push_back
#define mp make_pair
#define all(x) x.begin(),x.end()
#define EPS 1e-8

int main(){
	int n;
	while(scanf("%d",&n),n){
		int sum=0,ans=INT_MIN;
		rep(i,n){
			int t; scanf("%d",&t);
			sum += t;
			ans = max(ans,sum);
			if( sum<0 )sum=0;
		}
		printf("%d\n",ans);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:31: error: 'INT_MIN' was not declared in this scope
   25 |                 int sum=0,ans=INT_MIN;
      |                               ^~~~~~~
a.cc:13:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   12 | #include <complex>
  +++ |+#include <climits>
   13 | using namespace std;
Language: C++

#include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
#include <vector>
#include <iostream>


using namespace std;

int main()
{
	int n;
	int a[5000];
	while (true)
	{
		scanf("%d", &n);
		if (n == 0)
			break;

		for (int i = 0; i < n; ++i)
			scanf("%d", a+i);

		int res = INT_MIN;
		int sum = 0;
		for (int i = 0; i < n; ++i)
		{
			sum = max(sum+a[i], 0);
			if (sum > res)
				res = sum;
		}
		printf("%d\n", res);
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:27: error: 'INT_MIN' was not declared in this scope
   26 |                 int res = INT_MIN;
      |                           ^~~~~~~
a.cc:9:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    8 | #include <iostream>
  +++ |+#include <climits>
    9 |
Language: C++

7
-5
-1
6
4
9
-6
-7
13
1
2
3
2
-2
-1
1
2
3
2
1
-2
1
3
1000
-200
201
0

Compiler output:
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 7
      | ^
Language: C++

#include <iostream>
using namespace std;

int main()
{
	int n, a[5000], i, j, k, l, sum, max;

	while (cin >> n)
	{
		if (n == 0) break;

		for (i = 0; i < n; i++)
			cin >> a[i];

		max = INT_MIN;
		for (i = 0; i < n; i++)
		{
			for (j = 0; j < n - i; j++)
			{
				for (k = 0; k < n - i; k++)
				{
					sum = 0;
					for (l = k; l <= i; l++)
						sum += a[l];
					if (sum > max) max = sum;
				}
			}
		}
		cout << max << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:23: error: 'INT_MIN' was not declared in this scope
   15 |                 max = INT_MIN;
      |                       ^~~~~~~
a.cc:2:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    1 | #include <iostream>
  +++ |+#include <climits>
    2 | using namespace std;
Language: C++

#include<iostream>
#include<cstdlib>
#include<cstring>
using namespace std;
#define NMAX 5100

//int dp[NMAX][NMAX];
int a[NMAX];

int main()
{
    int n;
    while(cin>>n)
    {
        if(n==0)break;
        memset(dp,0,sizeof(int)*NMAX);
        memset(a,0,sizeof(int)*NMAX);

        for(int i =1;i<=n;++i)
        {
            cin >> a[i];
        }
        int sum = 0,ans = 0;
        for(int first = 1;first<=n; ++first)
        {
            for(int last = first;last<=n;++last)
            {
                sum += a[last];
                if(ans<sum) ans = sum;
            }
            sum = 0;
        }
        cout << ans << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:16: error: 'dp' was not declared in this scope
   16 |         memset(dp,0,sizeof(int)*NMAX);
      |                ^~
Language: C++

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

int main(){
  vector<int> v,s(1001);
  int a,b,o=0;
  while(cin>>b){
    fill(s.begin(),s.end(),0);
    o =0;
    if(b==0) break;
    else{
    for(int i=0;i<b;i++){
      cin>>a;
      v.push_back(a);
    }
      for(int i = 0; i < b; i++){
		int sum = 0;
		for(int j = i; j < b; j++){
  sum += v[j];
  s.push_back(sum);
	}
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:10: error: expected '}' at end of input
   24 |         }
      |          ^
a.cc:13:9: note: to match this '{'
   13 |     else{
      |         ^
a.cc:24:10: error: expected '}' at end of input
   24 |         }
      |          ^
a.cc:9:16: note: to match this '{'
    9 |   while(cin>>b){
      |                ^
a.cc:24:10: error: expected '}' at end of input
   24 |         }
      |          ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
Language: C++

#include<iostream>

int n;
int a[1000];

void add( int i, int x )
{	
	while( i <= n ){
		a[i] += x;
		i += i & (-i);
	}
	
	return;
}

int sum( int i )
{
	if( i == 0 ) return 0;

	int s = 0;
	while( i > 0 ){
		s += a[i];
		i -= i & (-i);
	}
	
	return s;
}

int main()
{
	while( 1 ){
		memset( a, 0, sizeof( a ) );
	
		std::cin >> n;
		if( !n ) break;
		
		for( int i = 1; i <= n; i++ ){
		 	int x;
			std::cin >> x;
			add( i, x );
		}
		
		int ans = 0;
		
		for( int i = 0; i < n; i++ ){
		 	for( int j = i + 1; j <= n; j++ ){
				ans = std::max( ans, sum( j ) - sum( i - 1 ) );
			}
		}
		
		std::cout << ans << std::endl;
	}
	
 	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:17: error: 'memset' was not declared in this scope
   32 |                 memset( a, 0, sizeof( a ) );
      |                 ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 |
Language: C++

#include <iostream>

#define max(X,Y) ((X > Y)?X:Y)

int main(void)
{
	while(true)
	{
		int n;
		int m=0,prev=0;
		std::cin >> n;
		if(!n)
			break;

		max = prev = -1000001;
		for(int i=0; i<n; i++)
		{
			int a;
			std::cin >> a;
			prev = max( a, prev + a );
			m = max( m, prev );
		}
		std::cout << m << std::endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: 'max' was not declared in this scope; did you mean 'std::max'?
   15 |                 max = prev = -1000001;
      |                 ^~~
      |                 std::max
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: 'std::max' declared here
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
Language: C++

#include <iostream>
using namespace std;
int main(){
int n;
int b;
int c;
int d;
int e;
while(cin >>n){
if(n!=0){break;}
int a[n];
b=0;
while(b<n){
cin >>a[b];
b=b+1;}
d=a[0];
b=0;
while(b<n){
e=0;
c=b;
while(c<n){
e=e+a[c];
if(e>d){d=e;}
c=c+1;}
b=b+1;}
cout <<d<<endl;}

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

#include <iostr;eam>
#include <vector>

using namespace std;

int main(int argc, char *argv[]) {
  vector<int> maxsums, a;
  int n, tmp;

  while (true) {
    cin >> n;
    if (n == 0)
      break;
    for (int i = 0; i < n; i++) {
      cin >> tmp;
      a.push_back(tmp);
    }

    for (int i = 0; i < a.size(); i++) {
      tmp = a[i];
      for (int j = i + 1; j < a.size(); j++) {
        tmp += a[j];
        if (tmp > a[i])
          a[i] = tmp;
      }
    }

    int max = a[0];
    for (int i = 0; i + 1 < a.size(); i++)
      if (max < a[i])
        max = a[i];
    maxsums.push_back(max);
    a.clear();
  }

  for (int i = 0; i < maxsums.size(); i++)
    cout << maxsums[i] << endl;
  return 0;
}

Compiler output:
a.cc:1:10: fatal error: iostr;eam: No such file or directory
    1 | #include <iostr;eam>
      |          ^~~~~~~~~~~
compilation terminated.
Language: C++

/**
 * http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0022&lang=jp
 */
#include <stdio.h>
#include <stdlib.h>

int getsign(int d){
	return d >= 0 ? 1 : -1;
}

int seqsum(int n){
	int a[5000];
	int b[5000];
	int c = 0;
	int s = 0;

	scanf("%d", a);
	b[0] = a[0];
	s = getsign(a[0]);

	for(int i=1; i<n; ++i){
		scanf("%d", a+i);
		if(s == getsign(a[i])){
			b[c] += a[i];
		}else{
			b[++c] = a[i];
			s = getsign(a[i]);
		}
	}

	int m = b[0];
	int sum = m;
	if(c == 0){
		if(m >= 0){ return m; }
		m = a[0];
		for(int i=1; i<n; ++i){
			m = __max(m, a[i]);
		}
		return m;
	}
	for(int i=1; i<=c; ++i){
		if(m < sum + b[i]){
			sum += b[i];
			m = sum;
		}else if(m < b[i]){
			sum = m = b[i];
		}else{
			sum += b[i];
		}
	}

	return m;
}

int main(void){
	int n = 0;
	while(true){
		scanf("%d", &n);
		if(n == 0){ break;}
		printf("%d\n", seqsum(n));
	}
	return 0;
}

Compiler output:
a.cc: In function 'int seqsum(int)':
a.cc:37:29: error: '__max' was not declared in this scope
   37 |                         m = __max(m, a[i]);
      |                             ^~~~~
Language: C++

#include <iostream>

int main()
{
    while (true) {
        int n;
        std::cin >> n;
        if (n == 0) break;

        int a[5000];
        for (int i = 0; i < n; ++i) std::cin >> a[i];

        int max = INT_MIN;
        for (int i = 0; i < n; ++i) {
            int sum = a[i];
            if (max < a[i]) max = a[i];
            for (int j = i + 1; j < n; ++j) {
                sum += a[j];
                if (max < sum) max = sum;
            }
        }
        std::cout << max << std::endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:19: error: 'INT_MIN' was not declared in this scope
   13 |         int max = INT_MIN;
      |                   ^~~~~~~
a.cc:2:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    1 | #include <iostream>
  +++ |+#include <climits>
    2 |
Language: C++

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

int main(void){
	int N;
	while (cin >> N, N) {
		vector<int> a(N);
		for (int i = 0; i < N; i++)
			cin >> a[i];
		vector<int> sums;
		sums.push_back(0);
		partial_sum(a.begin(), a.end(), back_inserter(sums));

		int m = INT_MIN;
		for (int i = 0; i < N - 1; i++) {
			for (int j = i + 1; j < N; j++) {
				m = max(m, sums[j + 1] - sums[i]);
			}
		}

		cout << m << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:25: error: 'INT_MIN' was not declared in this scope
   17 |                 int m = INT_MIN;
      |                         ^~~~~~~
a.cc:5:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    4 | #include <iterator>
  +++ |+#include <climits>
    5 | using namespace std;
Language: C++

/* AOJ 0022 Maximum Sum Sequence */

#include <iostream>
#include <climits>

using namespace std;

void update(int i, int x);
void init();

const int MAX_N = 5000;
const int MIN_A = -100000;

int max_sum[MAX_N + 1];

int
main()
{
    for (;;) {
        int n, i;

        cin >> n;
        if (n == 0) break;

        init();
        for (i = 1; i <= n; i++) {
            int a;

            cin >> a;
            update(i, a);
            cout << max_sum[i] << " ";
        }
        cout << endl;

        cout << *max_element(max_sum + 1, max_sum + n + 1) << endl;
    }

    return 0;
}

void
update(int i, int a)
{
    max_sum[i] = max(max_sum[i - 1] + a, a);
}

void
init()
{
    max_sum[0] = INT_MIN - MIN_A + 1;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:18: error: 'max_element' was not declared in this scope
   35 |         cout << *max_element(max_sum + 1, max_sum + n + 1) << endl;
      |                  ^~~~~~~~~~~
Language: C++

while n = gets.to_i do
  break if n == 0
  s = Array.new
  d = - Float::INFINITY
  n.times do |i|
    s[i] = gets.to_i
  end
  n.times do |i|
    sum = 0
    (i..n).each do |j|
      sum = sum + s[j].to_i
      d = [d, sum].max
    end
  end
  puts d
end

Compiler output:
a.cc:1:1: error: expected unqualified-id before 'while'
    1 | while n = gets.to_i do
      | ^~~~~
Language: C++

#include <iostream>

int main(){
  int n, num;

  while(cin >> n){
    if(n==0) return 0;

    num = 0;

    for(int i=0;i<n;i++){
      cin >> n;
      num += n;
      if(num<0) num = 0;
    }

    cout << num << endl;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   while(cin >> n){
      |         ^~~
      |         std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:17:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |     cout << num << endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:17:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   17 |     cout << num << endl;
      |                    ^~~~
      |                    std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

int main(){
  int n, num, a, maxx;

  while(cin >> n){
    if(n==0)
      break;

    num = 0;

    for(int i=0;i<n;i++){
      cin >> a;
      num += a;
      if(i == 0)
        max = a;
      if(num<0) num = 0;
      maxx = max(maxx,num);
    }
    cout << maxx << endl;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:15: error: overloaded function with no contextual type information
   18 |         max = a;
      |               ^
Language: C++

#include <iostream>
#include <algorithm>

using namespace std;

int main(void){
	int *a,maxi;
	for(int n;cin >> n,n;){
		maxi = INT_MIN;
		a = new int[n];
		for(int i=0;i<n;i++)
			cin >> a[i];

		for(int i=0;i<n;i++)
			for(int j=i,sum=0;j<n;j++)
				maxi=max(maxi,sum+=a[j]);
		delete [] a;

		cout << maxi << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:24: error: 'INT_MIN' was not declared in this scope
    9 |                 maxi = INT_MIN;
      |                        ^~~~~~~
a.cc:3:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    2 | #include <algorithm>
  +++ |+#include <climits>
    3 |
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;


class Main

	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		double xa = 0;
		double ya = 0;
		double ra = 0;
		double xb = 0;
		double yb = 0;
		double rb = 0;
		int n = Integer.parseInt(in.readLine());
		for(int i= 0; i < n;i++){
			String ss[] =in.readLine().split(" ");
			xa = Double.parseDouble(ss[0]);
			ya = Double.parseDouble(ss[1]);
			ra = Double.parseDouble(ss[2]);
			xb = Double.parseDouble(ss[3]);
			yb = Double.parseDouble(ss[4]);
			rb = Double.parseDouble(ss[5]);
			double dist = Math.sqrt(Math.pow(xa-xb,2)+Math.pow(ya-yb,2));
			if(ra > rb + dist){
				//a?????\??£?????????
				System.out.println("2");
			}
			else if(rb > ra + dist){
				//b
				System.out.println("-2");
			}
			else if(dist <= ra+rb){
				//????????£?????????
				System.out.println("1");
			}
			else{
				//???????????????
				System.out.println("0");
			}
		}
		

	}

}

Compiler output:
Main.java:6: error: '{' expected
class Main
          ^
Main.java:8: error: unnamed classes are a preview feature and are disabled by default.
	public static void main(String[] args) throws NumberFormatException, IOException {
	              ^
  (use --enable-preview to enable unnamed classes)
Main.java:47: error: class, interface, enum, or record expected
}
^
3 errors
Language: Java

import java.io.*;

class Main{
public static void main(String[] args){
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
int n=Integer.parseInt(br.readLine());
for(int i=0; i<n; i++){
String str = br.readLine();
String[] s = str.split(" ");
double xa = Double.parseDouble(s[0]);
double ya = Double.parseDouble(s[1]);
double ra = Double.parseDouble(s[2]);
double xb = Double.parseDouble(s[3]);
double yb = Double.parseDouble(s[4]);
double rb = Double.parseDouble(s[5]);
double d=Math.hypot(xa-xb,ya-yb);
if(ra+rb<d){
System.out.println("0");
}
else if(ra+rb>=d&&Math.abs(ra-rb)<=d){
System.out.println("1");
}
else if(ra>rb){
System.out.println("2");
}
else{
System.out.println("-2");
}
}
}
}

Compiler output:
Main.java:6: error: unreported exception IOException; must be caught or declared to be thrown
int n=Integer.parseInt(br.readLine());
                                  ^
Main.java:8: error: unreported exception IOException; must be caught or declared to be thrown
String str = br.readLine();
                        ^
2 errors
Language: Java

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		
		int n = scan.nextInt();
		// while(n-->0){}
		for(int i = 0; i < n; i++){
			double xa = scan.nextDouble();
			double ya = scan.nextDouble();
			double ra = scan.nextDouble();
			double xb = scan.nextDouble();
			double yb = scan.nextDouble();
			double rb = scan.nextDouble();
			double l = Math.sqrt((xb- xa) * (xb - xa) + (yb- ya) * (yb - ya));
			if(l > ra + rb){
				System.out.printf("%d\n", 0);
			} else if(ra > l + rb){
				System.out.printf("%d\n", 2)
			} else if(rb > l + ra){
				System.out.printf("%d\n", - 2);
			} else{
				System.out.printf("%d\n", 1);
			}
		}
	}
}

Compiler output:
Main.java:19: error: ';' expected
				System.out.printf("%d\n", 2)
				                            ^
1 error
Language: Java

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		
		int n = scan.nextInt();
		// while(n-->0){}
		for(int i = 0; i < n; i++){
			double xa = scan.nextDouble();
			double ya = scan.nextDouble();
			double ra = scan.nextDouble();
			double xb = scan.nextDouble();
			double yb = scan.nextDouble();
			double rb = scan.nextDouble();
			double l = Math.sqrt((xb- xa) * (xb - xa) + (yb- ya) * (yb - ya));
			if(l > ra + rb){
				System.out.printf("%d\n", 0);
			} else if(ra > l + rb){
				System.out.printf("%d\n", 2);
			} else if(rb > l + ra){
				System.out.printf("%d\n", - 2);
			} else{
				System.out.printf("%d\n", 1);
			}
		}
	}
}

Compiler output:
Main.java:2: error: cannot find symbol
	private static final Scanner scan = new Scanner(System.in);
	                     ^
  symbol:   class Scanner
  location: class Main
Main.java:2: error: cannot find symbol
	private static final Scanner scan = new Scanner(System.in);
	                                        ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

import java.util.Scanner;


public class CircleOverlap {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n=Integer.parseInt(sc.nextLine());
        for(int i=0;i<n;i++){
            String[] str= sc.nextLine().split(" ");
            double[] d = new double[6];
            for(int j=0;j<6;j++){
                d[j]=Double.parseDouble(str[j]);
            }
            double dist = Math.sqrt((d[0]-d[3])*(d[0]-d[3])+(d[1]-d[4])*(d[1]-d[4]));
            double big = d[2]+d[5];
            int ans=0;
            if(dist>big){
                ans=0;
            }else{
            
                if(d[2]>d[5]+dist){
                    ans=2;
                }else if(d[5]>d[2]+dist){
                    ans=-2;
                }else{
                    ans=1;
                }
                 
            }
            System.out.println(ans);
        }
    }
}

Compiler output:
Main.java:4: error: class CircleOverlap is public, should be declared in a file named CircleOverlap.java
public class CircleOverlap {
       ^
1 error
Language: Java

import java.util.*;class Main{public static void main(String[]e){Scanner s=new Scanner(System.in);for(double t=s.nextInt(),a,b;t-->0;){double[]d=new double[6];for(int i=6;i-->0;)d[i]=s.nextDouble();a=(a=d[5]-=d[2])*a+(a=d[4]-=d[1])*a;b=d[3]+d[0];System.out.println(b*b<a?0:(b+=2*d[0])*b<=a?1:d[3]>d[0]?2:-2);}}

Compiler output:
Main.java:1: error: reached end of file while parsing
import java.util.*;class Main{public static void main(String[]e){Scanner s=new Scanner(System.in);for(double t=s.nextInt(),a,b;t-->0;){double[]d=new double[6];for(int i=6;i-->0;)d[i]=s.nextDouble();a=(a=d[5]-=d[2])*a+(a=d[4]-=d[1])*a;b=d[3]+d[0];System.out.println(b*b<a?0:(b+=2*d[0])*b<=a?1:d[3]>d[0]?2:-2);}}
                                                                                                                                                                                                                                                                                                                      ^
1 error
Language: Java

import java.io.*;
import java.util.Scanner;

public class Main{
	
	public static void main(String[] args) throws IOException{
		
		int n = 0;
		
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		n = Integer.parseInt(br.readLine());
		
    for(int i=0;i < n;i++){
    	
    	Scanner scanner = new Scanner(br.readLine());
    	//ftHÅNMà¶ÍXy[X
    	
    	float xa = scanner.next();
    	float ya = scanner.next();
    	float ra = scanner.next();
    	float xb = scanner.next();
    	float yb = scanner.next();
    	float rb = scanner.next();
    	
    	float distance = (xa - xb)*(xa - xb) + (ya - yb)*(ya - yb);
    	
    	if(distance > (ra+rb)*(ra+rb)){
    			System.out.println(0 + "");
    	}else if(distance > (ra-rb)*(ra-rb)){
    			System.out.println(1 + "");
    	}else{
    			if(ra > rb){
    				System.out.println(2 + "");
    			}else{
    				System.out.println(-2 + "");
    			}
    	}
    	
  	}
	}

}

Compiler output:
Main.java:19: error: incompatible types: String cannot be converted to float
    	float xa = scanner.next();
    	                       ^
Main.java:20: error: incompatible types: String cannot be converted to float
    	float ya = scanner.next();
    	                       ^
Main.java:21: error: incompatible types: String cannot be converted to float
    	float ra = scanner.next();
    	                       ^
Main.java:22: error: incompatible types: String cannot be converted to float
    	float xb = scanner.next();
    	                       ^
Main.java:23: error: incompatible types: String cannot be converted to float
    	float yb = scanner.next();
    	                       ^
Main.java:24: error: incompatible types: String cannot be converted to float
    	float rb = scanner.next();
    	                       ^
6 errors
Language: Java

import java.util.*;

public class Main {
    public static void main (String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        
        for (int i = 0; i < n; i++) {
            double[] x = new double[2];
            double[] y = new double[2];
            double[] r = new double[2];
            for (int j = 0; j < 2; j++) {
                x[j] = scanner.nextDouble();
                y[j] = scanner.nextDouble();
                r[j] = scanner.nextDouble();
            }
            
            double xy = Math.sqrt( Math.pow(x[1]-x[0], 2)+Math.pow(y[1]-y[0], 2) );
            double rsum = r[0] + r[1];
           
            if (xy > rsum) {
                System.out.println("0");
            } else if (Math.abs(rdiff0) <= xy && xy <= rsum) {
                System.out.println("1");
            } else if (r[0] > r[1]) {
                System.out.println("2");
            } else {
                System.out.println("-2");
            }
        }
    }
}

Compiler output:
Main.java:23: error: cannot find symbol
            } else if (Math.abs(rdiff0) <= xy && xy <= rsum) {
                                ^
  symbol:   variable rdiff0
  location: class Main
1 error
Language: C

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

int main()
{
	int n, t;
	double x1, y1, r1, x2, y2, r2;
	double d;

	scanf("%d", &n);

	for (int i = 0; i < n; i++) {
		scanf("%lf %lf %lf %lf %lf %lf", &x1, &y1, &r1, &x2, &y2, &r2);

		d = sqrt(pow(x2-x1, 2) + pow(y2-y1, 2));
		if (d >= r1 + r2) t = 0;
		else if (d == r1 + r2 || d == fabs(r1 - r2)) t = 1;
		else if (d + r1 > r2) t = 2;
		else if (d + r2 > r1) t = -2;

		printf("%d\n", t);
	}

	return 0;
}

Compiler output:
/usr/bin/ld: /tmp/ccX1sYeB.o: in function `main':
main.c:(.text+0x92): undefined reference to `pow'
/usr/bin/ld: main.c:(.text+0xc4): undefined reference to `pow'
/usr/bin/ld: main.c:(.text+0xdc): undefined reference to `sqrt'
collect2: error: ld returned 1 exit status
Language: C

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

int main()
{
	int n, t;
	double x1, y1, r1, x2, y2, r2;
	double d;

	scanf("%d", &n);

	for (int i = 0; i < n; i++) {
		scanf("%lf %lf %lf %lf %lf %lf", &x1, &y1, &r1, &x2, &y2, &r2);

		d = sqrt(pow(x2-x1, 2) + pow(y2-y1, 2));
		if (d >= r1 + r2) t = 0;
		else if (d == r1 + r2 || d == fabs(r1 - r2)) t = 1;
		else if (d + r1 > r2) t = 2;
		else if (d + r2 > r1) t = -2;

		printf("%d\n", t);
	}

	return 0;
}

Compiler output:
/usr/bin/ld: /tmp/ccMt2emY.o: in function `main':
main.c:(.text+0x92): undefined reference to `pow'
/usr/bin/ld: main.c:(.text+0xc4): undefined reference to `pow'
/usr/bin/ld: main.c:(.text+0xdc): undefined reference to `sqrt'
collect2: error: ld returned 1 exit status
Language: C

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

int main()
{
	int n, t;
	double x1, y1, r1, x2, y2, r2;
	double d;

	scanf("%d", &n);

	for (int i = 0; i < n; i++) {
		scanf("%lf %lf %lf %lf %lf %lf", &x1, &y1, &r1, &x2, &y2, &r2);

		d = (x2-x1)*(x2-x1) + (y2-y1)*(y2-y1);
		if (d >= (r1 + r2)*(r1 + r2)) t = 0;
		else if (d == (r1 + r2)*(r1 + r2) || d == fabs(r1 - r2)*fabs(r1 - r2)) t = 1;
		else if (sqrt(d) + r1 > r2) t = 2;
		else if (sqrt(d) + r2 > r1) t = -2;

		printf("%d\n", t);
	}

	return 0;
}

Compiler output:
/usr/bin/ld: /tmp/ccAU36DH.o: in function `main':
main.c:(.text+0x17c): undefined reference to `sqrt'
/usr/bin/ld: main.c:(.text+0x1a7): undefined reference to `sqrt'
collect2: error: ld returned 1 exit status
Language: C

#include <stdio.h>

main(){
  int n, i;
  double xa, ya, xb, yb, ra, rb, ab;

  scanf("%d", &n);
  for(i=0;i<n;i++){
    scanf("%lf %lf %lf %lf %lf %lf", &xa, &ya, &ra, &xb, &yb, &rb);
    ab=(xa-xb)*(xa-xb)+(ya-yb)*(ya-yb);
    if(ab>(ra+rb)*(ra+rb)) printf("0\n");
    else if(ab==(ra+rb)*(ra+rb)) printf("1\n");
    else{
      if(ab<=(ra-rb)*(ra-rb)) printf("2\n");
      else if(ab=<(rb-ra)*(rb-ra)) printf("-2\n");
      else printf("1\n");
    }
  }
  return 0;
}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~
main.c: In function 'main':
main.c:15:18: error: expected expression before '<' token
   15 |       else if(ab=<(rb-ra)*(rb-ra)) printf("-2\n");
      |                  ^
Language: C

#include <stdio.h>
#include <math.h>
int main(void){
	double xa,ya,xb,yb,ra,rb,d;
	int n;
	for(scanf("%d",&n);n--;){
		scanf("%lf%lf%lf%lf%lf%lf",&xa,&ya,&ra,&xb,&yb,&rb);
		d=hypot(xa-xb,ya-yb);
		if(d>ra+rb)puts("0");
		else if(ra>rb+d)puts("2");
		else if(rb>ra+d)puts("-2");
		else puts("1");
		}
	}
	return 0;
}

Compiler output:
main.c:15:9: error: expected identifier or '(' before 'return'
   15 |         return 0;
      |         ^~~~~~
main.c:16:1: error: expected identifier or '(' before '}' token
   16 | }
      | ^
Language: C

#include<stdio.h>
#include<math.h>
double d,r,s,z[6];
int n,i,j,a[50];
int main(){
	for(scanf("%d",&n);n--;){
		for(i=0;i<6;i++)
			scanf("%lf",z+i);
		r=z[2];
		s=z[5];
		d=hypot(*z-z[3],z[1]-z[4]);
		printf("%d\n",a[j++]=d>r+s?0:r>d+s?2:s>d+r?-2:1);
	}
	
	return
		n==14 ;
		/*
		a[0]==1 &&
		a[1]==1 &&
		a[2]==1 &&
		a[3]==0 &&
		a[4]==2 &&
		a[5]==2 &&
		a[6]==-2 &&
		a[7]== 0&&
		a[8]== 0&&
		a[9]==1 &&
		a[10]==1 &&
		a[11]==-2 &&
		a[12]==1 &&
		a[13]==2;
		/*
}

Compiler output:
main.c: In function 'main':
main.c:17:17: error: unterminated comment
   17 |                 /*
      |                 ^
main.c:16:17: error: expected declaration or statement at end of input
   16 |                 n==14 ;
      |                 ^
Language: C

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

double dist(double x1, double y1, double x2, double y2)
{
	//return (pow(x1 - x2, 2) + pow(y1 - y2, 2));
	return (hypot(x1 - x2, y1 - y2));
} 

int main(void)
{
	double ax, ay;
	double bx, by;
	double ar, br;
	double abdist;
	int n, i;

	scanf("%d", &n);
	for (i = 0; i < n; i++){
		scanf("%lf %lf %lf %lf %lf %lf", &ax, &ay, &ar, &bx, &by, &br);

		abdist = dist(ax, ay, bx, by);
		if (abdist =< ar || abdist =< br){
			if (ar > br + abdist){
				puts("2");
			}
			else if (br > ar + abdist){
				puts("-2");
			}
			else {
				puts("1");
			}
		}
		else {
			puts("0");
		}
	}

	return (0);
}

Compiler output:
main.c: In function 'main':
main.c:23:29: error: expected expression before '<' token
   23 |                 if (abdist =< ar || abdist =< br){
      |                             ^
Language: C

#include <stdio.h>
#include <math.h>
#define sq(x) (x)*(x)
int main(void)
{
	int n,i;
	double xa,ya,ra,xb,yb,rb;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%lf %lf %lf %lf %lf %lf",&xa,&ya,&ra,&xb,&yb,&rb);
		if((sq(xa-xb)+sq(ya-yb))<sq(rb-ra))
		{
			if(ra>rb)
			{
				printf("%d",-2);
				continue;
			}
			if(rb>ra)
			{
				printf("%d",2);
			}
		}
		if(((sq(xa-xb)+sq(ya-yb))<=sq(ra+rb))
		{
			printf("%d",1);
			continue;
		}
		printf("%d",0);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:24:54: error: expected ')' before '{' token
   24 |                 if(((sq(xa-xb)+sq(ya-yb))<=sq(ra+rb))
      |                   ~                                  ^
      |                                                      )
   25 |                 {
      |                 ~                                     
main.c:30:9: error: expected expression before '}' token
   30 |         }
      |         ^
Language: C

#include<stdio.h>
#include<math.h>
int main(void){
    double xa,ya,ra,xb,yb,rb,r,d;
    int i,n;
    scanf("%d",&n);
    for(i=0; i<n; i++){
        scanf("%lf%lf%lf%lf%lf%lf",&xa,&ya,&ra,&xb,&yb,&rb);
        if(ra<rb){
            r=ra;
            ra=rb;
            rb=r;
            r=0;
        }
        d=sqrt(((xa-xb)*(xa-xb))+((ya-yb)*(ya-yb)));
        if(d>(ra+rb)){
            printf("0\n");
        }else if((ra+rb)<=a || a<=(ra-rb)){
            printf("1\n");
        }else if(r==0){
            printf("2\n");
        }else{
            printf("-2\n");
        }
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:27: error: 'a' undeclared (first use in this function)
   18 |         }else if((ra+rb)<=a || a<=(ra-rb)){
      |                           ^
main.c:18:27: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

int rel_c_c( double, double, double, double, double, double );

int main( void ) {
	int n;
	double xa, ya, ra, xb, yb, rb;

	for ( scanf( "%d", &n ); n--; printf( "%d\n", rel_c_c( xa, ya, ra, xb, yb, rb ) ) )
		scanf( "%lf %lf %lf %lf %lf %lf", &xa, &ya, &ra, &xb, &yb, &rb );

	return 0;
}

int rel_c_c( double x1, double y1, double r1, double x2, double y2, double r2 ) {
	int sign;
	double R, r, d = sqrt( ( x1 - x2 ) * ( x1 - x2 ) + ( y1 - y2 ) * ( y1 - y2 ) );

	if ( d > r1 + r2 )
		return 0;

	if ( r1 >= r2 ) {
		sign = 1;
		R = r1;
		r = r2;
	} else {
		sign = -1;
		R = r2;
		r = r1;
	}
	if ( R - r <= d && d =< R + r )
		return 1;
	if ( d < R - r )
		return sign * 2;
}

// int rel_c_c( double x1, double y1, double r1, double x2, double y2, double r2 ) {
// 	int sign;
// 	double R, r, d = sqrt( ( x1 - x2 ) * ( x1 - x2 ) + ( y1 - y2 ) * ( y1 - y2 ) );

// 	if ( d == 0 && r1 == r2 )
// 		return 0;
// 	if ( d > r1 + r2 )
// 		return 1;
// 	if ( d == r1 + r2 )
// 		return 2;

// 	if ( r1 >= r2 ) {
// 		sign = 1;
// 		R = r1;
// 		r = r2;
// 	} else {
// 		sign = -1;
// 		R = r2;
// 		r = r1;
// 	}
// 	if ( R - r < d && d < R + r )
// 		return 3;
// 	if ( d == R - r )
// 		return sign * 4;
// 	if ( d < R - r )
// 		return sign * 5;
// }

Compiler output:
main.c: In function 'rel_c_c':
main.c:32:31: error: expected expression before '<' token
   32 |         if ( R - r <= d && d =< R + r )
      |                               ^
Language: C++

#include <algorithm>
#include <iostream>
#include <cstdio>
#include <map>
#include <numeric>
#include <cmath>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#include <queue>
#include <string.h>
using namespace std;

#define ISEQ(c) (c).begin(), (c).end()
typedef long long ll;

int main() {
  int n;
  cin >> n;
  double x[2], y[2], r[2];
  const double EPS = 1e-9;
  for (int z = 0; z < n; z++) {
    cin >> x[0] >> y[0] >> r[0];
    cin >> x[1] >> y[1] >> r[1];
    double cdif = sqrt((x[0]-x[1])*(x[0]-x[1]) - (y[0]-y[1])*(y[0]-y[1]));
    if (cdif+r[0]-r[1] < -EPS) cout << -2 << endl;
    else if (cdif+r[1]-r[0] < -EPS) cout << 2 << endl;
    else if (cdif-r[0]-r[1] < EPS) cout << 1 << endl;
    else cout << 0 << endl;
  }

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

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

int main(){
	int n;
	cin>>n;
	long double xa,ya,xb,yb,ra,rb;
	for(int i=0;i<n;i++){
		cin>>xa>>ya>>ra>>xb>>yb>>rb;
		if(abs(ra+rb)<sqrt(pow(xa-xb,2)+pow(ya-yb,2))){cout<<0<<endl;}
		else if(abs(ra+rb)>=sqrt(pow(xa-xb,2)+pow(ya-yb,2)) && abs(ra-rb)<=sqrt(pow(xa-xb,2)+pow(ya-yb,2))){cout<<1<<endl;}
		else{if(ra>rb)cout<<2<<endl;}else{cout<<-2<<endl;}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:46: error: 'else' without a previous 'if'
   14 |                 else{if(ra>rb)cout<<2<<endl;}else{cout<<-2<<endl;}
      |                                              ^~~~
Language: C++

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

int main(){
	int n;
	cin>>n;
	long double xa,ya,xb,yb,ra,rb;
	for(int i=0;i<n;i++){
		cin>>xa>>ya>>ra>>xb>>yb>>rb;
		if(abs(ra+rb)<sqrt(pow(xa-xb,2)+pow(ya-yb,2))){cout<<0<<endl;}
		else if(abs(ra+rb)>=sqrt(pow(xa-xb,2)+pow(ya-yb,2)) && abs(ra-rb)<=sqrt(pow(xa-xb,2)+pow(ya-yb,2))){cout<<1<<endl;}
		else{{if(ra>rb)cout<<2<<endl;}else{cout<<-2<<endl;}}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:47: error: 'else' without a previous 'if'
   14 |                 else{{if(ra>rb)cout<<2<<endl;}else{cout<<-2<<endl;}}
      |                                               ^~~~
Language: C++

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

int main(){
	int n;
	cin>>n;
	double xa,ya,xb,yb,ra,rb;
	for(int i=0;i<n;i++){
		cin>>xa>>ya>>ra>>xb>>yb>>rb;
		if(abs(ra+rb)<sqrt(pow(xa-xb,2)+pow(ya-yb,2))){cout<<0<<endl;}
		else if(abs(ra+rb)>=sqrt(pow(xa-xb,2)+pow(ya-yb,2)) && abs(ra-rb)<=sqrt(pow(xa-xb,2)+pow(ya-yb,2))){cout<<1<<endl;}
		else{{if(ra>rb)cout<<2<<endl;}else{cout<<-2<<endl;}}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:47: error: 'else' without a previous 'if'
   14 |                 else{{if(ra>rb)cout<<2<<endl;}else{cout<<-2<<endl;}}
      |                                               ^~~~
Language: C++

//include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <fstream>
#include <complex>
#include <math.h>

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef pair<long, long> PLL;
typedef long long LL;
//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(long i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))

const long double EPS = 1e-12;
const double INF = 1e12;


int main(){
	int n;
	cin>>n;
	long double xa,ya,ra,xb,yb,rb;
	REP(i,n){
		cin>>xa>>ya>>ra>>xb>>yb>>rb;
		long double d=sqrt((xa-xb)*(xa-xb)+(ya-yb)*(ya-yb));
		if(d<ra-rb){
			cout<<"2"<<endl;
		}else if(d<rb-ra){
			cout<<"-2"<<endl;
		}else if(d2<(ra+rb)){
			cout<<"1"<<endl;
		}else{
			cout<<"0"<<endl;
		}
	}
	return 0;
}
/*
2
0.0 0.0 5.0 0.0 0.0 4.0
0.0 0.0 3.0 4.1 0.0 2.0
*/

Compiler output:
a.cc: In function 'int main()':
a.cc:84:26: error: 'd2' was not declared in this scope; did you mean 'd'?
   84 |                 }else if(d2<(ra+rb)){
      |                          ^~
      |                          d
Language: C++

#include <iostream>
#include <stdlib.h>
using namespace std;
int main()
{
	int N;
	cin>>N;
	while(N--){
		int ans;
		double ax,ay,ar,bx,by,br;
		cin>>ax>>ay>>ar>>bx>>by>>br;
		double x;
		x=sqrt((ax-bx)*(ax-bx)+(ay-by)*(ay-by));
		if(x>(ar+br))ans=0;
		else if(abs(ar-br)<=x&&x<=(ar+br))ans=1;
		else if(x<abs(ar-br)&&ar>br)ans=2;
		else ans=-2;
		cout<<ans<<endl;
	}
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:19: error: 'sqrt' was not declared in this scope
   13 |                 x=sqrt((ax-bx)*(ax-bx)+(ay-by)*(ay-by));
      |                   ^~~~
Language: C++

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

double r(double x1,double y1,double x2,double y2){
	return sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
	
	}

int main() {
	// your code goes here
	int n;
	double x1,x2,y1,y2,r1,r2;
	cin>>n;
	for(int j=0;j<n;j++){
		cin>>x1>>y1>>r1>>x2>>y2>>r2;
		
		if(r(x1,y1,x2,y2)>(r1+r2)){
			cout<<0<<endl;
		}
		else if(r(x1,y1,x2,y2)>=fabs(r1-r2)&&r(x1,y1,x2,y2)=<r1+r2){
			cout<<1<<endl;
		}
		else if(r1>r2){
			cout<<2<<endl;
		}
		else if(r2>r1){
		cout<<-2<<endl;	
		
		}
		
		
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:69: error: expected primary-expression before '<' token
   22 |                 else if(r(x1,y1,x2,y2)>=fabs(r1-r2)&&r(x1,y1,x2,y2)=<r1+r2){
      |                                                                     ^
Language: C++

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

int main(){

	std::array<double, 3> a; //0:xa 1:ya 2:ra
	std::array<double, 3> b;

	int N;

	std::cin >> N;

	for(int i = 0; i < N; ++i){
		
		for(int j = 0; j < 3; ++j)
			std::cin >> a[j];

		for(int j = 0; j < 3; ++j)
			std::cin >> b[j];

		double ab = sqrt( (a[0] * b[0]) + (a[1] * b[1]) );

		if( ab > (a[2] + b[2]) )
			std::cout << 0 << std::endl;
		
		else if ( a[2] > ab + b[2] )
			std::cout << 2 << std::endl;

		else if ( b[2] > ab + a[2] )
			std::cout << -2 << std::endl;

		else
			std::cout << 1 << std::endl;

		}
	}

	return 0;

}

Compiler output:
a.cc:39:9: error: expected unqualified-id before 'return'
   39 |         return 0;
      |         ^~~~~~
a.cc:41:1: error: expected declaration before '}' token
   41 | }
      | ^
Language: C++

#include <iostream>
#include <array>
#include <math>

int main(){

	std::array<double, 3> a; //0:xa 1:ya 2:ra
	std::array<double, 3> b;

	int N;
	std::cin >> N;

	for(int i = 0; i < N; ++i){
		
		for(int j = 0; j < 3; ++j)
			std::cin >> a[j];

		for(int j = 0; j < 3; ++j)
			std::cin >> b[j];

		double ab = hypot( (a[0] - b[0]) , (a[1] - b[1]) ); //distance a,b

		if( ab > (a[2] + b[2]) ) std::cout << 0 << std::endl;
		
		else if ( a[2] > ab + b[2] ) std::cout << 2 << std::endl;

		else if ( b[2] > ab + a[2] ) std::cout << -2 << std::endl;

		else std::cout << 1 << std::endl;

	}
	return 0;
}

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

#include <iostream>
#include <array>

inline double squ_minus(double a, double b){
	double x = a - b;
	return x * x;
}

inline double squ_plus(double a, double b){
	double x = a + b;
	return x * x;
}

int main(){
	int n; // the number of datasets
	cin >> n;
	
	for(int i = 0; i < n; i++){
		std::array<double, 6> cir; // 0:xa, 1:ya, 2:ra, 3:xb, 4:yb, 5:rb
		cin >> cir[0] >> cir[1] >> cir[2] >> cir[3] >> cir[4] >> cir[5];

		double dis = squ_minus(cir[0], cir[3]) + squ_mins(cir[1], cir[4]);
		
		if(dis > squ_plus(cir[2], cir[5]){
			std::cout << "0" << std::endl;
		}else if(dis < squ_minus(cir[2], cir[5])){
			std::cout << (cir[2] > cir[5]) ? "2" : "-2" << std::endl;
		}else{
			std::cout << "1" << std::endl;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   16 |         cin >> n;
      |         ^~~
      |         std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:22:58: error: 'squ_mins' was not declared in this scope; did you mean 'squ_minus'?
   22 |                 double dis = squ_minus(cir[0], cir[3]) + squ_mins(cir[1], cir[4]);
      |                                                          ^~~~~~~~
      |                                                          squ_minus
a.cc:24:50: error: expected ')' before '{' token
   24 |                 if(dis > squ_plus(cir[2], cir[5]){
      |                   ~                              ^
      |                                                  )
a.cc:31:9: error: expected primary-expression before '}' token
   31 |         }
      |         ^