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

#include<iostream>
#include<stdio.h>
#include <algorithm>
#include<string>
#include <utility>
using namespace std;
using namespace std;
int main(){
	int m;
	string in,in2;
	int a[90],b[90],ans[90];
	int f;
	int a_len,b_len,m_len;
	cin>>m;
	while(m--){
		for(int i=0;i<90;i++){
			a[i]=b[i]=ans[i]=0;
		}
		cin>>in;
		cin>>in2;
		a_len=in.size();
		b_len=in2.size();
		for(int i=0;i<a_len;i++){
			a[a_len-1-i]=in[i]-'0';
		}
		for(int i=0;i<b_len;i++){
			b[b_len-1-i]=in2[i]-'0';
		}
		m_len=max(a_len,b_len);
		if(m_len>80){
			cout<<"overflow"<<endl;
			continue;
		}
		f=0;
		for(int i=0;i<m_len+1;i++){
			ans[i]=(a[i]+b[i]+f)%10;
			f=(a[i]+b[i]+f)/10;
		}
		if(ans[m_len]!=0){
			printf("%d",ans[0])
		}
		
		
	}
	
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:44: error: expected ';' before '}' token
   40 |                         printf("%d",ans[0])
      |                                            ^
      |                                            ;
   41 |                 }
      |                 ~
Language: C++

#include<iostream>
#include<stdio.h>
#include <algorithm>
#include<string.h>
#include <utility>
using namespace std;
using namespace std;
int main(){
	int m;
	string in,in2;
	int a[90],b[90],ans[90];
	int f;
	int alen,blen,mlen;
	cin>>m;
	while(m--){
		for(int i=0;i<90;i++){
			a[i]=b[i]=ans[i]=0;
		}
		cin>>in;
		cin>>in2;
		alen=in.size();
		blen=in2.size();
		for(int i=0;i<alen;i++){
			a[alen-1-i]=in[i]-'0';
		}
		for(int i=0;i<blen;i++){
			b[blen-1-i]=in[i]-'0';
		}
		mlen=max(alen,blen);
		if(mlen>80){
			cout<<"overflow"<<endl;
			continue;
		}
		f=0;
		for(int i=0;i<mlen+1;i++){
			ans[i]=(a[i]+b[i]+f)%10;
			f=(a[i]+b[i]+f)/10;
		}
		if(ans[mlen]!=0){
			if(mlen>79){
				//cout<<"overflow"<<endl;
				continue;
			//}
			//cout<<ans[mlen];
		}
		
		for(int i=0;i<mlen;i++){
			//cout<<ans[mlen-1-i];
		}cout<<endl;
		
		
	}
	return 0;
}

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

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

int main(void)
{
	char str[2][1000];
	int b, s;
	int len[2];
	int i, j;
	int n;
	int flag;
	
	scanf("%d", &n);
	
	while (n){
		for (i = 0; i < 1000; i++){
			str[0][i] = str[1][i] = 0;
		}
		s = 1;
		b = 0;
		for (i = 0; i < 2; i++){
			scanf("%s", str[i]);
			len[i] = strlen(str[i]);
		}
		
		
		else {
			if (len[0] > 80 || len[1] > 80){
				printf("overflow\n");
				break;
			}
			if (len[0] < len[1]){
				s = 0;
				b = 1;
			}
			
			for (i = len[b], j = len[s]; i >= 0; i--, j--){
				if (j >= 0){
					str[s][i] = str[s][j];
				}
				else {
					str[s][i] = '0';
				}
			}
			
			flag = 0;
			i = len[b];
			while (i >= 0){
				if (str[s][i] + str[b][i] - '0' + flag > '9'){
					flag = 1;
				}
				else {
					flag = 0;
				}
				i--;
			}
			
			if (flag){
				for (i = len[b]; i >= 0; i--){
					for (j = 0; j < 2; j++){
						str[j][i + 1] = str[j][i];
					}
				}
				str[0][0] = '0';
				str[1][0] = '0';
			}
			
			for (i = len[b]; j >= 0; i--){
				str[b][i] += (str[s][i] - '0');
				if (str[b][i] > '9'){
					str[b][i] -= 10;
					str[b][i - 1]++;
				}
			}
			str[b][len[b] + flag] = '\0';
			
			printf("%s\n", str[b]);
		}
		
		n--;
	}
	
	return (0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:17: error: 'else' without a previous 'if'
   27 |                 else {
      |                 ^~~~
Language: C++

#include<cstdio>
#include<algorithm>
using namespace std;
int main(void)
{
	int y;
	scanf("%d",&y);
	for(int z = 0;z < y;z++)
	{
		char suji1[82],suji2[82];
		char ans[82] = {0};

		for(int i = 0;i<82;i++)
		{
			suji1[i] = '0';
			suji2[i] ='0';
		}

		int overflow = 0;

		scanf("%s",suji1);
		scanf("%s",suji2);
		int suji1s = strlen(suji1);
		int suji2s = strlen(suji2);

		int anss;
		if(suji1s>suji2s)  anss = suji1s;
		else anss = suji2s;

		suji1[suji1s] = '0';
		suji2[suji2s] = '0';

		reverse(suji1,suji1+suji1s);
		reverse(suji2,suji2+suji2s);

		for(int i = 0;i < 80;i++)
		{
			ans[i] = suji1[i]+suji2[i] - '0';
			if(ans[i] >= ':')
			{
				ans[i]  = ans[i] - 10;
				suji2[i+1] = suji2[i+1]+1;
			}
		}
		
		if(ans[anss]!= '0') anss++;
		if(anss >=81) overflow = 1;
		reverse(ans,ans+anss);
		ans[anss] = 0;
		if(overflow >= 1)
		{
			printf("overflow\n");
		}
		else
		{
			printf("%s\n",ans);
		}
		
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:30: error: 'strlen' was not declared in this scope
   23 |                 int suji1s = strlen(suji1);
      |                              ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<algorithm>
  +++ |+#include <cstring>
    3 | using namespace std;
Language: C++

#include <cstdlib>
#include <iostream>
#include <string>

#define MAX_DIGITS 80

int main(int argc, const char * argv[])
{
    using namespace std;
    string num1, num2, result;
    int count;
    cin >> count;
    for (int i = 0; i < count; ++i) {
        cin >> num1 >> num2;
        if (num1.size() > MAX_DIGITS || num2.size() > MAX_DIGITS) {
            result = "overflow";
        }
        else {
            int co = 0; // carryover
            reverse(num1.begin(), num1.end());
            reverse(num2.begin(), num2.end());
            size_t digits = max(num1.size(), num2.size()) + 1;
            result.resize(digits);
            for (int j = 0; j < digits; ++j) {
                string digit1, digit2;
                digit1 = j < num1.size() ? num1.substr(j, 1) : "0";
                digit2 = j < num2.size() ? num2.substr(j, 1) : "0";
                int tmp = atoi(digit1.c_str()) + atoi(digit2.c_str()) + co;
                co = tmp/10;
                result[j] = char(48 + tmp - co*10);
            }
            if (co == 1) result = "overflow";
            reverse(result.begin(), result.end());
            if (result[0] == '0') result = result.substr(1);
        }
        cout << result << endl;
    }
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:20:13: error: 'reverse' was not declared in this scope
   20 |             reverse(num1.begin(), num1.end());
      |             ^~~~~~~
Language: C++

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

int main() {
	int k,a,b,c,d,i,j,s;
	stack<int> st[3];
	char n[2][1000];
	cin >> d;
	for (d;d>0;d--) {
	cin >> n[0] >> n[1];
	if (strlen(n[0])>80 || strlen(n[1])>80) { cout << "overflow" << endl; continue;}
	for (i=0;i<2;i++) for (j=0;n[i][j]!='\0';j++) st[i].push(n[i][j]-'0');
	k=0; c=0;
	while(!st[0].empty() || !st[1].empty()) {
		if (!st[0].empty()) {a=st[0].top(); st[0].pop();} else a=0;
		if (!st[1].empty()) {b=st[1].top(); st[1].pop();} else b=0;
		s=a+b+c; k++;
		if (s>9) { c=1; s-=10; } else c=0;
		st[2].push(s);
	}
	if ((c==1 && k==80) || k>80) { 
		cout << "overflow" << endl;
		while(!st[2].empty()) st[2].pop();
	}
	else {
		if (c==1) cout << 1;
		while(!st[2].empty()) { 
			cout << st[2].top();
			st[2].pop();
		}
		cout << endl;
	}
}
		return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: 'strlen' was not declared in this scope
   13 |         if (strlen(n[0])>80 || strlen(n[1])>80) { cout << "overflow" << endl; continue;}
      |             ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <stack>
  +++ |+#include <cstring>
    4 | using namespace std;
Language: C++

#include<algorithm>
#include<stdio.h>
#include<iostream>

using namespace std;
int main(){
	int n,l,m,c;
	char a[90],b[90];
	cin >> n;
	for(int i=0;i<n;i++){
		char s[90] = {0};
		scanf("%s%s",a,b);
		l = strlen(a);
		m = strlen(b);
		reverse(a,a+l);
		reverse(b,b+m);
		c=0;
		for(int j=0;j<max(l,m);j++){
			int o=c;
			if(j<l)o += a[j]-'0';
			if(j<m)o += b[j]-'0';
			c = o>9;
			s[j] = o%10 + '0';
		}
		l=max(l,m);
		if(c>0)s[l++]='1';
		reverse(s,s+l);
		if(l>80)cout << "overflow" << endl;
		else printf("%s\n",s);//cout << s << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:21: error: 'strlen' was not declared in this scope
   13 |                 l = strlen(a);
      |                     ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include<iostream>
  +++ |+#include <cstring>
    4 |
Language: C++

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

using namespace std;
int main(){
	int n,l,m,c;
	char a[90],b[90],s[90];
	cin >> n;
	for(int i=0;i<n;i++){
		for(int j=0;j<90;j++)s[j]=0;
		scanf("%s%s",a,b);
		l = strlen(a);
		m = strlen(b);
		reverse(a,a+l);
		reverse(b,b+m);
		c=0;
		for(int j=0;j<max(l,m);j++){
			int o=c;
			if(j<l)o += a[j]-'0';
			if(j<m)o += b[j]-'0';
			c = o>9;
			s[j] = o%10 + '0';
		}
		l=max(l,m);
		if(c>0)s[l++]='1';
		reverse(s,s+l);
		if(l>80)puts("overflow");
		else puts(s);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'cin' was not declared in this scope
   10 |         cin >> n;
      |         ^~~
a.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    4 | #include<string.h>
  +++ |+#include <iostream>
    5 |
Language: C++

n = gets.to_i
n.times do
  a,b = gets.to_i,gets.to_i
  str = if (a+b) < 10**80 then (a+b) else "overflow" end
  puts str
end

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n = gets.to_i
      | ^
Language: C++

#include <iostream>
using namespace std;

int main()
{
int x,a,b,h;
cin>>x;
for(int i=0; i<x; i++)
{
 while(true)
 {
  cin>>a>>b;
  if(a.size()>=80||b.size()>=80) break;
  else
  {
   cout<<a+b<<endl;
  }
 }
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:8: error: request for member 'size' in 'a', which is of non-class type 'int'
   13 |   if(a.size()>=80||b.size()>=80) break;
      |        ^~~~
a.cc:13:22: error: request for member 'size' in 'b', which is of non-class type 'int'
   13 |   if(a.size()>=80||b.size()>=80) break;
      |                      ^~~~
Language: C++

#include <iostream>
using namespace std;

int main()
{
int x,h;
double a,b;
cin>>x;
for(int i=0; i<x; i++)
{
 while(true)
 {
  cin>>a>>b;
  if(a.size()>=80||b.size()>=80) break;
  else
  {
   cout<<a+b<<endl;
  }
 }
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:8: error: request for member 'size' in 'a', which is of non-class type 'double'
   14 |   if(a.size()>=80||b.size()>=80) break;
      |        ^~~~
a.cc:14:22: error: request for member 'size' in 'b', which is of non-class type 'double'
   14 |   if(a.size()>=80||b.size()>=80) break;
      |                      ^~~~
Language: C++

gets;15.times{puts((a=gets.to_i+gets.to_i)>=10**80?"overfllow":a)}

Compiler output:
a.cc:1:1: error: 'gets' does not name a type
    1 | gets;15.times{puts((a=gets.to_i+gets.to_i)>=10**80?"overfllow":a)}
      | ^~~~
a.cc:1:6: error: expected unqualified-id before numeric constant
    1 | gets;15.times{puts((a=gets.to_i+gets.to_i)>=10**80?"overfllow":a)}
      |      ^~~~~~~~
Language: C++

(n=gets.to_i).times{puts((a=gets.to_i+gets.to_i)>=10**80?"overfllow":a)}

Compiler output:
a.cc:1:3: error: expected ')' before '=' token
    1 | (n=gets.to_i).times{puts((a=gets.to_i+gets.to_i)>=10**80?"overfllow":a)}
      | ~ ^
      |   )
Language: C++

#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <queue>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <complex>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <fstream>
#include <stdio.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();}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<double> VEC;
typedef vector<VEC> MAT;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef pair<int, PII> TIII;
typedef long long LL;
typedef vector<LL> VLL;
typedef vector<VLL> VVLL;
//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())
#define MT(a,b,c) MP(a, MP(b, c))
#define T1 first
#define T2 second.first
#define T3 second.second.first
#define T4 second.second.second

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define EPS 1.0e-9

inline int getnum(string s, int idx){
	if(idx >= s.size())return 0;
	else return s[idx]-'0';
}

string add(string s, string t){
	reverse(ALL(s));
	reverse(ALL(t));
	int n=max(s.length(), t.length());
	string r;
	int ku=0;
	REP(i,n){
		int tmp = getnum(s,i)+getnum(t,i)+ku;
		r.PB(tmp%10+'0');
		ku=tmp/10;
	}
	if(ku)r.PB('0'+ku);
	reverse(ALL(r));
	while(r[0]=='0')r.erase(0,1);
	if(r.size()>80)return "overflow"
	return r;
}

int main(){
	int t;
	cin >> t;
	REP(i,t){
		string s1,s2;
		cin>>s1>>s2;
		cout << add(s1,s2) << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'std::string add(std::string, std::string)':
a.cc:88:41: error: expected ';' before 'return'
   88 |         if(r.size()>80)return "overflow"
      |                                         ^
      |                                         ;
   89 |         return r;
      |         ~~~~~~
Language: C++

#include <iostream>
#include <cstring>
#include <cstdlib>
using namespace std;
const int DIGIT=9;

int main() {
  int n;
  char buf[81];
  int l, x[2], y, z;
  char buf_part[DIGIT+1];
  int a[2][9];
  int b[9];

  cin >> n;
  while (n--) {
    for (int i=0; i<2; i++) {
      cin >> buf;
      l = strlen(buf);
      x[i] = (l+DIGIT-1)/DIGIT;
      y = (l-1)%DIGIT+1;
      for (int j=0; j<9; j++) {
        a[i][j] = 0;
      }
      for (int j=0; j<x[i]; j++) {
        if (!j) {
          memcpy(buf_part, buf, y);
          buf_part[y] = '\0';
        } else {
          memcpy(buf_part, &buf[y+DIGIT*(j-1)], DIGIT);
          buf_part[DIGIT] = '\0';
        }
        a[i][x[i]-j-1] = atoi(buf_part);
      }
    }

    /*for (int i=0; i<9; i++) b[i] = 0;
    z = (x[0] > x[1]) ? x[0] : x[1];
    for (int i=0; i<z; i++) {
      b[i] = a[0][i] + a[1][i];
      if (b[i] >= 1000000000) {
        a[0][i+1]++;
        b[i] -= 1000000000;
      }
    }
    if (z<9 && a[0][z]) {
      b[z] = a[0][z]+a[1][z];
      ++z;
    }
    if (b[8] >= 100000000) {
      cout << "overflow" << endl;
    } else {
      cout << b[z-1];
      for (int i=z-2; i>=0; i--) {
        cout.fill('0');
        cout.width(DIGIT);
        cout << b[i];
      }
      cout << endl;
    }
  }*/
  return 0;
}

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

#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <iostream>
#include <math.h>
#include <stack>

using namespace std;

int main(){
    
    char d[81];
    char e[81];

    stack<char> st1;
    stack<char> st2;
    stack<int> st3;
    int n=0;
    scanf("%d",&n);

    for(int i=0; i<n; i++){
        scanf("%s",d);
        scanf("%s",e);
        
        if(strlen(d)>80||strlen(e)>80){
            printf("overflow");
        }else{
            for(int j=0; j<(strlen(d)); j++){
                st1.push(d[j]);
            }
            for(int j=0; j<(strlen(e)); j++){
                st2.push(e[j]);
            }
            int temp=0;
            char temp_char;
            while(st1.empty()==false||st2.empty()==false){
                if(st1.empty()==false&&st2.empty()==false){
                    temp_char=st1.top();
                    temp+=atoi(&temp_char);
                    temp_char=st2.top();
                    temp+=atoi(&temp_char);
                    st1.pop();
                    st2.pop();
                }else if(st1.empty()==false&&st2.empty()==true){
                    temp_char=st1.top();
                    temp+=atoi(&temp_char);
                    st1.pop();
                }else if(st1.empty()==true&&st2.empty()==false){
                    temp_char=st2.top();
                    temp+=atoi(&temp_char);
                    st2.pop();
                }
                st3.push(temp%10);
                temp=temp/10;
            }
            
            if(temp!=0){
                st3.push(temp);
            }
            
            if(st3.size()>80){
                printf("overflow");
            }else{
                while(st3.empty()==false){
                    printf("%d",st3.top());
                    st3.pop();
                }
            }
            printf("\n");
        }
    }
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:12: error: 'strlen' was not declared in this scope
   25 |         if(strlen(d)>80||strlen(e)>80){
      |            ^~~~~~
a.cc:7:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    6 | #include <stack>
  +++ |+#include <cstring>
    7 |
Language: C++

#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <iostream>
#include <math.h>
#include <stack>

using namespace std;

int main(){
    
    char d[81];
    char e[81];

    stack<char> st1;
    stack<char> st2;
    stack<int> st3;
    int n=0;
    scanf("%d",&n);

    for(int i=0; i<n; i++){
        scanf("%s",d);
        scanf("%s",e);
        
        if((int)(strlen(d))>80||(int)(strlen(e))>80){
            printf("overflow");
        }else{
            for(int j=0; j<(int)(strlen(d)); j++){
                st1.push(d[j]);
            }
            for(int j=0; j<(int)(strlen(e)); j++){
                st2.push(e[j]);
            }
            int temp=0;
            char temp_char;
            while(st1.empty()==false||st2.empty()==false){
                if(st1.empty()==false&&st2.empty()==false){
                    temp_char=st1.top();
                    temp+=atoi(&temp_char);
                    temp_char=st2.top();
                    temp+=atoi(&temp_char);
                    st1.pop();
                    st2.pop();
                }else if(st1.empty()==false&&st2.empty()==true){
                    temp_char=st1.top();
                    temp+=atoi(&temp_char);
                    st1.pop();
                }else if(st1.empty()==true&&st2.empty()==false){
                    temp_char=st2.top();
                    temp+=atoi(&temp_char);
                    st2.pop();
                }
                st3.push(temp%10);
                temp=temp/10;
            }
            
            if(temp!=0){
                st3.push(temp);
            }
            
            if(st3.size()>80){
                printf("overflow");
            }else{
                while(st3.empty()==false){
                    printf("%d",st3.top());
                    st3.pop();
                }
            }
            printf("\n");
        }
    }
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:18: error: 'strlen' was not declared in this scope
   25 |         if((int)(strlen(d))>80||(int)(strlen(e))>80){
      |                  ^~~~~~
a.cc:7:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    6 | #include <stack>
  +++ |+#include <cstring>
    7 |
Language: C++

#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <iostream>
#include <math.h>
#include <stack>

using namespace std;

int main(){
    
    char d[81];
    char e[81];

    stack<char> st1;
    stack<char> st2;
    stack<int> st3;
    int n=0;
    scanf("%d",&n);

    for(int i=0; i<n; i++){
        scanf("%s",d);
        scanf("%s",e);
        
        //if((int)(strlen(d))>80||(int)(strlen(e))>80){
            printf("overflow");
        //}else{
            for(int j=0; j<(int)(strlen(d)); j++){
                st1.push(d[j]);
            }
            for(int j=0; j<(int)(strlen(e)); j++){
                st2.push(e[j]);
            }
            int temp=0;
            char temp_char;
            while(st1.empty()==false||st2.empty()==false){
                if(st1.empty()==false&&st2.empty()==false){
                    temp_char=st1.top();
                    temp+=atoi(&temp_char);
                    temp_char=st2.top();
                    temp+=atoi(&temp_char);
                    st1.pop();
                    st2.pop();
                }else if(st1.empty()==false&&st2.empty()==true){
                    temp_char=st1.top();
                    temp+=atoi(&temp_char);
                    st1.pop();
                }else if(st1.empty()==true&&st2.empty()==false){
                    temp_char=st2.top();
                    temp+=atoi(&temp_char);
                    st2.pop();
                }
                st3.push(temp%10);
                temp=temp/10;
           // }
            
            if(temp!=0){
                st3.push(temp);
            }
            
            if(st3.size()>80){
                printf("overflow");
            }else{
                while(st3.empty()==false){
                    printf("%d",st3.top());
                    st3.pop();
                }
            }
            printf("\n");
        }
    }
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:34: error: 'strlen' was not declared in this scope
   28 |             for(int j=0; j<(int)(strlen(d)); j++){
      |                                  ^~~~~~
a.cc:7:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    6 | #include <stack>
  +++ |+#include <cstring>
    7 | 
a.cc:31:34: error: 'strlen' was not declared in this scope
   31 |             for(int j=0; j<(int)(strlen(e)); j++){
      |                                  ^~~~~~
a.cc:31:34: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

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

int main() {
  
  int n,i,j;
  cin >> n;

  for(i=0;i<n;i++){
    string str1,str2,temp;
    int kuriagari=0;
    cin >> str1 >> str2;
    
    if (str1.size()<str2.size()){
      temp = str1;
      str1 = str2;
      str2 = temp;
    }
    int goukei[str1.size()+1];
    
    for(j=0;j<str1.size()+1;j++){
      
      if (j==str1.size()){
	goukei[0] = kuriagari;
      }else if (j<str2.size()){
	goukei[str1.size()-j] = str2[str2.size()-1-j] + str1[str1.size()-1-j] + kuriagari -'0' - '0';
	if (goukei[str1.size()-j] >= 10) {
	  goukei[str1.size()-j] -= 10;
	  kuriagari = 1;
	}else{
	  kuriagari = 0;
	}
      }else{
	goukei[str1.size()-j] = str1[str1.size()-1-j] + kuriagari -'0';
	if (goukei[str1.size()-j] >= 10) {
	  goukei[str1.size()-j] -= 10;
	  kuriagari = 1;
	}else{
	  kuriagari = 0;
	}
      }
    }
    if (str.size()>81)||( (str.size()==80)&&(goukei[0]==1) ){
      cout << "overflow" <<endl;
    }else{
      if (goukei[0]!=0)
	cout << goukei[0] ;
      for(j=0;j<str1.size();j++)
	cout << goukei[j+1];
      cout <<endl;
    }
  }
      
  return 0;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:44:9: error: 'str' was not declared in this scope; did you mean 'str2'?
   44 |     if (str.size()>81)||( (str.size()==80)&&(goukei[0]==1) ){
      |         ^~~
      |         str2
a.cc:44:23: error: expected primary-expression before '||' token
   44 |     if (str.size()>81)||( (str.size()==80)&&(goukei[0]==1) ){
      |                       ^~
Language: C++

#include <stdio.h>
#include <string.h>
int main(void){
    int n,ap,bp,cp,t;
    char a[81],b[81],c[81];
    scanf("%d",&n);
    while(~scanf("%s%s",&a,&b)){
        ap=strlen(a);
        bp=strlen(b);
        cp=sizeof(c)-1;
        c[cp]='\0';
        t=0;
        while((t||ap||bp)&&cp>0){
            t+=(ap?a[--ap]-'0':0)+(bp?b[--bp]-'0':0);
            c[--cp]='0'+(t%10);
            t/=10;
        }
        if(t)puts("overflow");
        else puts("%s",&c[cp]);
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:18: error: too many arguments to function 'int puts(const char*)'
   19 |         else puts("%s",&c[cp]);
      |              ~~~~^~~~~~~~~~~~~
In file included from a.cc:1:
/usr/include/stdio.h:714:12: note: declared here
  714 | extern int puts (const char *__s);
      |            ^~~~
Language: C++

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

int main(){
  int j;
  int n;
  char s1[111];
  char tmp[111];
  char s2[111];
  char ans[111];
  int  kuri = 0;
  cin >> n;
  while(n--){
  memset(ans,0,sizeof(ans));
  memset(s1,0,sizeof(s1));
  memset(s2,0,sizeof(s2));
  memset(tmp,0,sizeof(tmp));)
  cin >> s1 >> s2;
  if(strlen(s1) < strlen(s2)){
      for(int i=0,j=strlen(s1)-1;i<=j;i++,j--) swap(s1[i],s1[j]);
      for(int i=0,j=strlen(s2)-1;i<=j;i++,j--) swap(s2[i],s2[j]);
      for(int i=0;i<strlen(s2);i++){
	if((s2[i] + (s1[i]%'0') + kuri) > '9'){
	  ans[i] = (s2[i] + (s1[i]%'0') + kuri)-10;
	  kuri = 1;
	}
	else {
	  ans[i] = (s2[i] + (s1[i]%'0') + kuri);
	  kuri = 0;
	}
	if(i == strlen(s2)-1 && kuri == 1) ans[i+1] = '1';
      }
      if(strlen(ans) > 80) cout << "overflow" << endl;
      else{
	for(int i=strlen(ans)-1;i>=0;i--) cout << ans[i];
      }
  }
  else{
    for(int i=0,j=strlen(s1)-1;i<=j;i++,j--) swap(s1[i],s1[j]);
    for(int i=0,j=strlen(s2)-1;i<=j;i++,j--) swap(s2[i],s2[j]);
    for(int i=0;i<strlen(s1);i++){
      if((s1[i] + (s2[i]%'0') + kuri) > '9'){
	ans[i] = (s1[i] + (s2[i]%'0') + kuri)-10;
	kuri = 1;
      }
      else {
	ans[i] = (s1[i] + (s2[i]%'0') + kuri);
	kuri = 0;
      }
      if(i == strlen(s1)-1 && kuri == 1) ans[i+1] = '1';
    }
    if(strlen(ans) > 80) cout << "overflow" << endl;
    else{
      for(int i=strlen(ans)-1;i>=0;i--) cout << ans[i];
    }
  }
  cout << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:29: error: expected primary-expression before ')' token
   18 |   memset(tmp,0,sizeof(tmp));)
      |                             ^
Language: C++

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

int main(){
int n,ans[100],kuri,i,j,ap,bp;
char a[1000],b[1000];
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%s%s",a,b);
if(strlen(a)>80||strlen(b)>80){
printf("overflow\n");
continue;
}
ap=strlen(a)-1;
bp=strlen(b)-1;
j=0;
kuri=0;
while(ap>=0||bp>=0){
ans[j]=kuri;
if(ap>=0)ans[j]+=a[ap];
if(bp>=0)ans[j]+=b[bp];
kuri=ans[j]/10;
ans[j]%10;
j++;
ap--;
bp--;
}
if(agari==1)ans[j]==1;
else j--;
if(j>=80){
printf("overflow\n");
continue;
}
for(;j>=0;j--){
printf("%d",ans[j]);
}
printf("\n");
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:4: error: 'agari' was not declared in this scope
   28 | if(agari==1)ans[j]==1;
      |    ^~~~~
Language: C++

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

int main() {
  int tcase;
  
  cin >> tcase;
  while(tcase--) {
    string A, B, C = "";
    cin >> A >> B;
    
    unsigned sz = max(A.size(), B.size());
    while(A.size()<sz) A = '0' + A;
    while(B.size()<sz) B = '0' + B;

    int c = 0;
    for(int i=sz-1; i>=0; i--) {
      // 確定情報
      C += ( (A[i]-'0') + (B[i]-'0') + c ) % 10 + '0';
      // 前座
      c = ( (A[i]-'0') + (B[i]-'0') + c ) / 10;
    }
    if(c>0) C += ( (A[sz-1]-'0') + (B[sz-1]-'0') + c ) % 10 + '0';
    
    reverse(C.begin(), C.end());
    cout << C << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:5: error: 'reverse' was not declared in this scope
   27 |     reverse(C.begin(), C.end());
      |     ^~~~~~~
Language: C++

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


#define MAX 1000


//99999999999999999999999999999999999999999999999999999999999999999999999999999999

using namespace std;


int main()
{
	int n = 0;
	string in[2];
	char out[MAX] = {NULL};

	cin >> n;

	for (int i = 0; i < n; i++){

		in[0].resize(0);
		in[1].resize(0);

		cin >> in[0] >> in[1];

		for (int i = 0; i < MAX; i++){
			out[i] = '\0';
		}

		int count = in[0].size() - 1;

		for (int i = 0; i < in[0].size(); i++){
			out[count--] += in[0][i];
		}

		count = in[0].size();
		int count2 = in[1].size() - 1;

		count = max(count , count2) - 1;

		for (int i = 0; i < in[1].size(); i++){
			if (out[i] != '\0'){
				out[i] -= '0';
			}
			out[i] += in[1][count2--];
			count--;
		}
		
		int i = 0;
		for (i = 0; out[i] != '\0'; i++){
			;
		}

		bool flag = false;


		for (int j = 0; j < i; j++){
			if (out[j] > '9'){
				out[j] -= 10;
				out[j + 1] += 1;
			}
		}

		if (out[i] > '\0' && out[i] < '0'){
			out[i] += '0';
		}
		
		for (i = 0; i < out[i] != '\0'; i++){
			;
		}

		for (int j = 0; j < i / 2; j++){
			char tmp = out[j];
			out[j] = out[i - j - 1];
			out[i - j - 1] = tmp;
		}

		for (i = 0; out[i]; i++){
			

Compiler output:
a.cc: In function 'int main()':
a.cc:18:30: warning: converting to non-pointer type 'char' from NULL [-Wconversion-null]
   18 |         char out[MAX] = {NULL};
      |                              ^
a.cc:52:21: error: redeclaration of 'int i'
   52 |                 int i = 0;
      |                     ^
a.cc:22:18: note: 'int i' previously declared here
   22 |         for (int i = 0; i < n; i++){
      |                  ^
a.cc:81:42: error: expected '}' at end of input
   81 |                 for (i = 0; out[i]; i++){
      |                                         ~^
a.cc:81:42: error: expected '}' at end of input
a.cc:22:36: note: to match this '{'
   22 |         for (int i = 0; i < n; i++){
      |                                    ^
a.cc:81:42: error: expected '}' at end of input
   81 |                 for (i = 0; out[i]; i++){
      |                                          ^
a.cc:15:1: note: to match this '{'
   15 | {
      | ^
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main(void){
	int n;

	cin >> n;
	for(int i=0;i<n;i++){
		int len,mlen=0;
		char val[2][81]={0},tmp[81],crr=0;

		for(int j=0;j<2;j++){
			cin >> tmp;
			len = strlen(tmp);
			mlen = mlen>len?mlen:len;
			for(int k=0;k<len;k++)
				val[j][len-1-k]=tmp[k]-0x30;
		}

		for(int j=0;j<mlen;j++){
			val[0][j]+=val[1][j]+crr;
			crr=val[0][j]/10;
			val[0][j]%=10;

			if(j==mlen-1&&crr)
				mlen++;
		}

		if(!val[0][80]){
			for(int j=0;j<mlen;j++)
				tmp[j]=val[0][mlen-1-j]+0x30;
			tmp[mlen]='\0';
		}
		else
			strcpy(tmp,"overflow");

		cout << tmp << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:31: error: 'strlen' was not declared in this scope
   16 |                         len = strlen(tmp);
      |                               ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | #include <string>
a.cc:37:25: error: 'strcpy' was not declared in this scope
   37 |                         strcpy(tmp,"overflow");
      |                         ^~~~~~
a.cc:37:25: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main(void){
	int n;

	cin >> n;
	while(n--){
		int len,big;
		string val[2];
		bool crr=false;

		for(int j=0;j<2;j++){
			cin >> val[j];
			reverse(val[j].begin(),val[j].end());
		}

		big=val[0].size()>=val[1].size()?0:1;
		val[1-big].append((len=val[big].size())-val[1-big].size(),'0');

		if(len<=80){
			for(int j=0;j<len;j++){
				val[0][j]+=val[1][j]+crr-0x60;
				crr=val[0][j]/10;
				val[0][j]%=10;
				val[0][j]+=0x30;
			}

			if(crr){
				val[0].append(1,'1');
				len++;
			}
		}

		if(len<=80)
			reverse(val[0].begin(),val[0].end());
		else
			val[0]="overflow";

		cout << val[0] << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:25: error: 'reverse' was not declared in this scope
   17 |                         reverse(val[j].begin(),val[j].end());
      |                         ^~~~~~~
a.cc:38:25: error: 'reverse' was not declared in this scope
   38 |                         reverse(val[0].begin(),val[0].end());
      |                         ^~~~~~~
Language: C++

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

int main()
{
	string s1, s2, temp;
	int sum, flag;
	int a, b;
	vector<int> v;
	int T;
	cin >> T;
	while (T--)
	{
		cin >> s1 >> s2;
		v.clear();
		sum = 0;
		flag = 0;
		reverse(s1.begin(), s1.end());
		reverse(s2.begin(), s2.end());
		if (s1.size() < s2.size())
		{
			temp = s1;
			s1 = s2;
			s2 = temp;
		}
		for (int i = 0; i < s1.size(); ++i)
		{
			if (s1[i] == '0')a = 0;
			else if (s1[i] == '1')a = 1;
			else if (s1[i] == '2')a = 2;
			else if (s1[i] == '3')a = 3;
			else if (s1[i] == '4')a = 4;
			else if (s1[i] == '5')a = 5;
			else if (s1[i] == '6')a = 6;
			else if (s1[i] == '7')a = 7;
			else if (s1[i] == '8')a = 8;
			else if (s1[i] == '9')a = 9;
			if (i >= s2.size())b = 0;
			else
			{
				if (s2[i] == '0')b = 0;
				else if (s2[i] == '1')b = 1;
				else if (s2[i] == '2')b = 2;
				else if (s2[i] == '3')b = 3;
				else if (s2[i] == '4')b = 4;
				else if (s2[i] == '5')b = 5;
				else if (s2[i] == '6')b = 6;
				else if (s2[i] == '7')b = 7;
				else if (s2[i] == '8')b = 8;
				else if (s2[i] == '9')b = 9;
			}
			sum = a + b + flag;
			if (sum > 9)
			{
				sum = sum - 10;
				flag = 1;
			}
			else
			{
				flag = 0;
			}
			v.push_back(sum);
		}
		if (flag == 1)
			v.push_back(1);
		if (v.size() > 80)
			cout << "overflow" << endl;
		else
		{
			for (int i = v.size() - 1; i >= 0; --i)
			{
				cout << v[i];
			}
			cout << endl;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:17: error: 'reverse' was not declared in this scope
   20 |                 reverse(s1.begin(), s1.end());
      |                 ^~~~~~~
Language: C++

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

int main(){
	int n;
	cin >> n;
	while( n-- > 0 ){
		string num1, num2;
		cin >> num1 >> num2;
		char sum[101];
		int degit = 0;
		for( int i = 0; i < 101; i++ ) sum[i] = '0';
		for( int i = 0; i < num1.size(); i++ ){
			sum[100-i] = num1[num1.size()-i-1];
		}
		int d;
		for( int i = 0; i < num1.size() || i < num2.size() || degit != 0; i++ ){
			int now = 3;
			/*
			if( i < num2.size() ){
				now = (int)(sum[100-i]-'0') + (int)(num2[num2.size()-i-1]-'0') + degit;
			}else{
				now = (int)(sum[100-i]-'0') + degit;
			}
			*/
			sum[100-i] = (char)(now%10)+'0';
			if( now >= 10 ) degit = 1;
			else degit = 0;
			d = i;
		}
		int d = 3;
		if( d < 80 ){
			for( int i = 100-d; i < 101; i++ ) cout << sum[i];
			cout << endl;
		}else{
			cout << "overflow" << endl;
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:21: error: redeclaration of 'int d'
   34 |                 int d = 3;
      |                     ^
a.cc:19:21: note: 'int d' previously declared here
   19 |                 int d;
      |                     ^
Language: C++

#include <cstdio>
  2 #include <iostream>
  3 #include <vector>
  4 #include <cstring>
  5 using namespace std;
  6 
  7 int main(){
  8   int n;
  9   cin >> n;
 10   while( n-- > 0 ){
 11     string num1, num2;
 12     cin >> num1 >> num2;
 13     char sum[101];
 14     int degit = 0;
 15     for( int i = 0; i < 101; i++ ) sum[i] = '0';
 16     for( int i = 0; i < num1.size(); i++ ){
 17       sum[100-i] = num1[num1.size()-i-1];
 18     }
 19     int d;
 20     for( int i = 0; i < num1.size() || i < num2.size() || degit != 0; i++ ){
 21       int now;
 22       if( i < num2.size() ){
 23         now = (int)(sum[100-i]-'0') + (int)(num2[num2.size()-i-1]-'0') + degit;
 24       }else{
 25         now = (int)(sum[100-i]-'0') + degit;
 26       }
 27       sum[100-i] = (char)(now%10)+'0';
 28       if( now >= 10 ) degit = 1;
 29       else degit = 0;
 30       d = i;
 31     }
 32     if( d < 80 ){
 33       for( int i = 100-d; i < 101; i++ ) cout << sum[i];
 34       cout << endl;
 35     }else{
 36       cout << "overflow" << endl;
 37     }
 38   }

Compiler output:
a.cc:2:5: error: stray '#' in program
    2 |   2 #include <iostream>
      |     ^
a.cc:3:5: error: stray '#' in program
    3 |   3 #include <vector>
      |     ^
a.cc:4:5: error: stray '#' in program
    4 |   4 #include <cstring>
      |     ^
a.cc:2:3: error: expected unqualified-id before numeric constant
    2 |   2 #include <iostream>
      |   ^
a.cc:6:3: error: expected unqualified-id before numeric constant
    6 |   6
      |   ^
Language: C++

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

int main(){
	int n;
	cin >> n;
	while( n-- > 0 ){
		string num1, num2;
		cin >> num1 >> num2;
		char sum[101];
		int degit = 0;
		for( int i = 0; i < 101; i++ ) sum[i] = '0';
		for( int i = 0; i < num1.size(); i++ ){
			sum[100-i] = num1[num1.size()-i-1];
		}
		int d;
		for( int i = 0; i < num1.size() || i < num2.size() || degit != 0; i++ ){
			int now;
			if( i < num2.size() ){
				now = (int)sum[100-i]-(int)('0') + (int)(num2[num2.size()-i-1]-(int)('0') + degit;
			}else{
				now = (int)sum[100-i]-(int)('0') + degit;
			}
			sum[100-i] = (char)(now%10)+'0';
			if( now >= 10 ) degit = 1;
			else degit = 0;
			d = i;
		}
		if( d < 80 ){
			for( int i = 100-d; i < 101; i++ ) cout << sum[i];
			cout << endl;
		}else{
			cout << "overflow" << endl;
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:114: error: expected ')' before ';' token
   23 |                                 now = (int)sum[100-i]-(int)('0') + (int)(num2[num2.size()-i-1]-(int)('0') + degit;
      |                                                                         ~                                        ^
      |                                                                                                                  )
Language: C++

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

/** Problem0015 : National Budget **/
int main()
{
	string a, b, s;
	int n, tmp, la, lb;
	bool up=false;
	
	cin >> n;
	for (int i=0; i<n; i++) {
		cin >> a >> b;
		s="";
		
		reverse(a.begin(), a.end());
		reverse(b.begin(), b.end());
		la=(int)a.length();
		lb=(int)b.length();
		
		if (la < lb) {
			swap(la, lb);
			swap(a, b);
		}
		
		for (int i = 0; i<la-lb; i++) b+='0';
		
		for (int i=0; i<la; i++) {
			tmp = (a[i]-'0') + (b[i] - '0') + (up?1:0);
			if (tmp>=10) {
				s += '0'+tmp%10;
				up = true;
			} else {
				s += '0'+tmp;
				up = false;
			}
		}
		
		if (up)
			s+='1';
		reverse(s.begin(), s.end());
		if (s.length()>80)
			cout << "overflow" << endl;
		else
			cout << s << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:17: error: 'reverse' was not declared in this scope
   19 |                 reverse(a.begin(), a.end());
      |                 ^~~~~~~
Language: C++

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

/** Problem0015 : National Budget **/
int main()
{
	string a, b, s;
	int n, tmp, la, lb;
	bool up=false;
	
	cin >> n;
	for (int i=0; i<n; i++) {
		cin >> a >> b;
		s="";
		
		reverse(a.begin(), a.end());
		reverse(b.begin(), b.end());
		la=(int)a.length();
		lb=(int)b.length();
		
		if (la < lb) {
			swap(la, lb);
			swap(a, b);
		}
		
		for (int i = 0; i<la-lb; i++) b+='0';
		
		for (int i=0; i<la; i++) {
			tmp = (a[i]-'0') + (b[i] - '0') + (up?1:0);
			if (tmp>=10) {
				s += '0'+tmp%10;
				up = true;
			} else {
				s += '0'+tmp;
				up = false;
			}
		}
		
		if (up)
			s+='1';
		reverse(s.begin(), s.end());
		if (s.length()>80)
			cout << "overflow" << endl;
		else
			cout << s << endl;
	}
	return 0;
}

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

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

/** Problem0015 : National Budget **/
int main()
{
	string a, b, s;
	int n, tmp, la, lb;
	bool up=false;
	
	cin >> n;
	for (int i=0; i<n; i++) {
		cin >> a >> b;
		s="";
		
		std::reverse(a.begin(), a.end());
		std::reverse(b.begin(), b.end());
		la=(int)a.length();
		lb=(int)b.length();
		
		if (la < lb) {
			swap(la, lb);
			swap(a, b);
		}
		
		for (int i = 0; i<la-lb; i++) b+='0';
		
		for (int i=0; i<la; i++) {
			tmp = (a[i]-'0') + (b[i] - '0') + (up?1:0);
			if (tmp>=10) {
				s += '0'+tmp%10;
				up = true;
			} else {
				s += '0'+tmp;
				up = false;
			}
		}
		
		if (up)
			s+='1';
		std::reverse(s.begin(), s.end());
		if (s.length()>80)
			cout << "overflow" << endl;
		else
			cout << s << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:22: error: 'reverse' is not a member of 'std'
   17 |                 std::reverse(a.begin(), a.end());
      |                      ^~~~~~~
a.cc:18:22: error: 'reverse' is not a member of 'std'
   18 |                 std::reverse(b.begin(), b.end());
      |                      ^~~~~~~
a.cc:42:22: error: 'reverse' is not a member of 'std'
   42 |                 std::reverse(s.begin(), s.end());
      |                      ^~~~~~~
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main () {
    int n;
    string a, b;
    
    cin >> n;
    for(int i=0;i<n;i++){
        int x[81]={0}, y[81]={0}, z[81]={0};
        
        cin >> a;
        cin >> b;
        
        reverse(a.begin(), a.end());
        reverse(b.begin(), b.end());
        
        for(int j=0;j<a.size();j++){
            x[j]=a[j]-'0';
        }
        for(int j=0;j<b.size();j++){
            y[j]=b[j]-'0';
        }
        
        for(int j=0;j<80;j++){
            z[j]+=x[j]+y[j];
            if(z[j]>=10){
                z[j+1]=1;
                z[j]-=10;
            }
        }
        
        if(z[80]>0){
            cout << "overflow" <<endl;
        }else{
            bool flag = 0;
            for(int j=79;j>=0;j--){
                if(z[j]==0 && flag==0){
                    continue;
                }else{
                    flag=1;
                }
                cout<<z[j];
            }
            if(flag==0){
                cout<<0;
            }
            cout<<endl;
            
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: 'reverse' was not declared in this scope
   17 |         reverse(a.begin(), a.end());
      |         ^~~~~~~
Language: Java

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

public class Main {

    private static final String REGIX_COMMA = ",";
    private static final int MAX_ANGLE = 180;
    private static final String EOF = "0,0";

    public static void main(String[] args) {
        try {
            BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
            String input = null;

            double x = 0;
            double y = 0;
            int angle = 90;

            while ((input = in.readLine()) != null && !EOF.equals(input)) {

                String[] data = input.split(REGIX_COMMA);
                int length = Integer.valueOf(data[0]);

                x += length * Math.cos(Math.toRadians(Integer.valueOf(angle)));
                y += length * Math.sin(Math.toRadians(Integer.valueOf(angle)));
                angle -= Integer.valueOf(data[1]);
            }

            System.out.println((int)x);
            System.out.println((int)y);
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            try {
                in.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}

Compiler output:
Main.java:36: error: cannot find symbol
                in.close();
                ^
  symbol:   variable in
  location: class Main
1 error
Language: Java

import java.util.Scanner;
import java.math.BigDecimal;
 
class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
double x=0;
double y=0;
double rad=Math.PI/2;
while(sc.hasNext()){
String[] s=sc.next().split(",");
int dis=Integer.parseInt(s[0]);
x+=dis*Math.cos(rad);
y+=dis*Math.sin(rad);
int deg=Integer.parseInt(s[1]);
rad-=Math.toRadians(deg);
}
BigDecimal a=new BigDecimal(x);
BigDecimal b=new BigDecimal(y);
x=x.setScale(0,ROUND_DOWN);
y=y.setScale(0,ROUND_DOWN);
System.out.println(x);
System.out.println(y);
}
}

Compiler output:
Main.java:20: error: cannot find symbol
x=x.setScale(0,ROUND_DOWN);
               ^
  symbol:   variable ROUND_DOWN
  location: class Main
Main.java:20: error: double cannot be dereferenced
x=x.setScale(0,ROUND_DOWN);
   ^
Main.java:21: error: cannot find symbol
y=y.setScale(0,ROUND_DOWN);
               ^
  symbol:   variable ROUND_DOWN
  location: class Main
Main.java:21: error: double cannot be dereferenced
y=y.setScale(0,ROUND_DOWN);
   ^
4 errors
Language: Java

import java.util.Scanner;
import java.math.BigDecimal;
 
class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
double x=0;
double y=0;
double rad=Math.PI/2;
while(sc.hasNext()){
String[] s=sc.next().split(",");
int dis=Integer.parseInt(s[0]);
x+=dis*Math.cos(rad);
y+=dis*Math.sin(rad);
int deg=Integer.parseInt(s[1]);
rad-=Math.toRadians(deg);
}
BigDecimal a=new BigDecimal(x);
BigDecimal b=new BigDecimal(y);
x=x.setScale(0,BigDecimal.ROUND_DOWN);
y=y.setScale(0,BigDecimal.ROUND_DOWN);
System.out.println(x);
System.out.println(y);
}
}

Compiler output:
Main.java:20: error: double cannot be dereferenced
x=x.setScale(0,BigDecimal.ROUND_DOWN);
   ^
Main.java:21: error: double cannot be dereferenced
y=y.setScale(0,BigDecimal.ROUND_DOWN);
   ^
Note: Main.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2 errors
Language: Java

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


public class gettrezya {
	public static void main(String[] aegs){
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int a = 0,c=0;
		String t = "";
		double counta =0,countb = 0;
		double rad = 90.0;
		double PI = Math.PI;
		
		while(true){
		
			try {
				t = br.readLine();
			} catch (IOException e) {
				// TODO 自動生成された catch ブロック
				e.printStackTrace();
			}
			
			
			String[] tt = t.split(",",0);
			a = Integer.parseInt(tt[0]);
			c = Integer.parseInt(tt[1]);
			if(a == 0 && c == 0){
				break;
			}
			
			
			System.out.println(rad);
			
			counta +=  (a * Math.sin(rad*PI/180d));
			countb +=  (a * Math.cos(rad*PI/180d));
			rad = rad - c;
			
		}
		System.out.println((int)countb);
		System.out.println((int)counta);
		
	}


}

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

import java.util.Scanner;
 
class Main {
 	private static final Scanner scan = new Scanner(System.in)
							.useDelimiter("[ \t\n,]");

    public static void main(String[] args){

    double x = 0;
    double y = 0;
    int ang = 90;
    for(;;){
        int d = scan.nextInt();
        int a = scan.nextInt();
        if(d == 0 && a == 0)  break;
        x += d * Math.cos(Math.toRadians((double) ang);
        y += d * Math.sin(Math.toRadians((double) ang);
        ang -= a;
    }
    System.out.println((int)(x));
        System.out.println((int)(y));
     
    }
}

Compiler output:
Main.java:16: error: ')' or ',' expected
        x += d * Math.cos(Math.toRadians((double) ang);
                                                      ^
Main.java:17: error: ')' or ',' expected
        y += d * Math.sin(Math.toRadians((double) ang);
                                                      ^
2 errors