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

#define _USE_MATH_DEFINES
#include<iostream>
#include <math.h>
#include <algorithm>
#include <vector>
#include <string>

using namespace std;

int main()
{
	int n;
	char *ch;
	cin >> n;
	ch = new char[n];

	for (int i = 0; i < n; i++){
		cin >> ch[i];
	}

	//対は消していって、その左右端は覚えておいた上で余りと対になる()を埋めていく

	char pre = '(';
	int numl = 0;
	int numr = 0;
	int nummax;
	string str = "";
	//for (int i = 0; i < n; i++){
	//	if (ch[i] == '('&& pre == ')'){
	//		nummax = max(numl, numr);
	//		for (int ii = 0; ii < nummax; ii++){
	//			str = str + "(";
	//		}
	//		for (int ii = 0; ii < nummax; ii++){
	//			str = str + ")";
	//		}
	//		numl = 1;
	//		numr = 0;
	//		if (i == n - 1){
	//			str = str + "()";
	//			break;
	//		}
	//	}
	//	else if (ch[i] == '('){
	//		numl++;
	//	}
	//	else if (ch[i] == ')'){
	//		numr++;
	//	}


	//	if (i == n - 1){
	//		nummax = max(numl, numr);
	//		for (int ii = 0; ii < nummax; ii++){
	//			str = str + "(";
	//		}
	//		for (int ii = 0; ii < nummax; ii++){
	//			str = str + ")";
	//		}
	//	}
	//	pre = ch[i];
	//}

	int numl = 0;
	int addl = 0;
	int addr = 0;
	int countl = 0;
	for (int i = 0; i < n; i++){
		if (ch[i] == '('){
			numl++;
			countl++;
		}
		if (ch[i] == ')'){
			if (!(numl > 0)){
				addl++;
			}
			numl--;
		}
	}

	int addr = n - countl - addl;
	for (int i = 0; i < addl; i++){
		str = str + '(';
	}

	for (int i = 0; i < n; i++){
		str = str + ch[i];
	}

	for (int i = 0; i < addr; i++){
		str = str + ')';
	}

	cout << str;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:64:13: error: redeclaration of 'int numl'
   64 |         int numl = 0;
      |             ^~~~
a.cc:24:13: note: 'int numl' previously declared here
   24 |         int numl = 0;
      |             ^~~~
a.cc:81:13: error: redeclaration of 'int addr'
   81 |         int addr = n - countl - addl;
      |             ^~~~
a.cc:66:13: note: 'int addr' previously declared here
   66 |         int addr = 0;
      |             ^~~~
Language: C++

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

using namespace std;

#define int long long

int main() {
  int n;
  string s;
  cin >> n >> s;
  n = s.length();
  int a[n];
  for (int i = 0; i < n; i++) {
    a[i] = 0;
    if (s[i] == '(') {
      a[i] = 1;
    } else if (s[i] == ')') {
      a[i] = -1;
    }
  }

  int tmp = 0;
  int lb = 0;
  int rb = 0;
  for (int i = 0; i < n - 1; i++) {
    tmp += a[i];
    if (a[i] == -1 && a[i+1] == 1) {  // )(が登場したらリセット
      if (tmp < 0) {//)が多い
        lb -= tmp;
      } else if (tmp >= 0) {//(が多い
        rb += tmp;
      }
      tmp = 0;
    }
  }
  tmp += a[n-1];
  if (tmp < 0) {
    lb -= tmp;
  } else if (tmp >= 0) {
    rb += tmp;
  }

  for (int i = 0; i < lb; i++) {
    cout << "(";
  }
  cout << s;
  for (int i = 0; i < rb; i++) {
    cout << ")";
  }
  cout << endl;

  return 0;
}

Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C

#include <stdio.h>

int main()
{
	int n, i, a, b, k;
	char s[100], a[200];
	scanf("%d", &n);
	scanf("%s", s);

	a = b = 0;
	for (i = 0; i < n; i++){
		if (s[i] == '(')
			a++;
		else
			b++;
	}
	if (a > b){
		k = a - b;
		for (i = 0; i < n; i++){
			a[i] = s[i]
		}
		for (i = 0; i < k; i++){
			a[i + n] = ')';
		}
	}

	if (b > a){
		k = b - a;
		for (i = 0; i < k; i++){
			a[i] = '(';
		}
		for (i = 0; i < n; i++){
			a[i + k] = s[i];
		}
	}

	return 0;

}

Compiler output:
main.c: In function 'main':
main.c:6:22: error: conflicting types for 'a'; have 'char[200]'
    6 |         char s[100], a[200];
      |                      ^
main.c:5:19: note: previous declaration of 'a' with type 'int'
    5 |         int n, i, a, b, k;
      |                   ^
main.c:20:36: error: expected ';' before '}' token
   20 |                         a[i] = s[i]
      |                                    ^
      |                                    ;
   21 |                 }
      |                 ~
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		String str = sc.next();
		char[] S = new char[N];
		for(int i=0;i<N;i++){
			S[i] = str.charAt(i);
		}
		int[] depth = new int[N];
		int deptA = 0;
		int deptB = 0;
		for(int i=0; i<N;i++){
			if(S[i]=='('){
				deptA++;
				depth[i] = deptA;
			}else{
				if(i>0 && S[i-1]=='('){
					depth[i-1]--;
					depth[i] = depth[i-1];
					deptA--;
				}else{
					deptB--;
					depth[i] = deptB;
				}
			}
		}
		for(int i=0;i<-deptB;i++){
			System.out.print("(");
		}
		System.out.print(str);
		for(int i=0;i<deptA;i++){
			System.out.print(")");
		}
	}

Compiler output:
Main.java:37: error: reached end of file while parsing
	}
	 ^
1 error
Language: C++

#include<cstdio>
#include<cstring>
#include<iostream>
using namespace std;
const int inf=1<<29;
const int maxn=110;
char str[maxn];
int n,dp[maxn][maxn];
pair<int,int> pre[maxn][maxn];
bool check(int i,int j)
{
    if((str[i]=='('&&str[j]==')')||(str[i]=='['&&str[j]==']'))
        return true;
    return false;
}
void DFS(int l,int r)
{
    if(l>r)
        return;
    if(l==r)
    {
        if(str[l]=='['||str[l]==']')
            printf("[]");
        if(str[l]=='('||str[l]==')')
            printf("()");
        return ;
    }
    if(check(l,r)&&dp[l][r]==dp[l+1][r-1])
    {
        printf("%c",str[l]);
        DFS(l+1,r-1);
        printf("%c",str[r]);
        return;
    }
    int sl=pre[l][r].first;
    int sr=pre[l][r].second;
    DFS(sl,sr);
    DFS(sr+1,r);
}
int main()
{
    int a;
    cin >> a;
    getchar();
        memset(pre,-1,sizeof(pre));
        gets(str);
        n=strlen(str);
        for(int i=0;i<n;i++)
            dp[i][i]=1;
        for(int j=1;j<n;j++)
            for(int i=0;i+j<n;i++)
            {
                dp[i][i+j]=inf;
                if(check(i,i+j))
                {
                    dp[i][i+j]=dp[i+1][i+j-1];
                    pre[i][i+j]=make_pair(i+1,i+j-1);
                }
                for(int k=0;k<=j;k++)
                    if(dp[i][i+j]>dp[i][i+k]+dp[i+k+1][i+j])
                    {
                        dp[i][i+j]=dp[i][i+k]+dp[i+k+1][i+j];
                        pre[i][i+j]=make_pair(i,i+k);
                    }
            }
        DFS(0,n-1);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:46:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   46 |         gets(str);
      |         ^~~~
      |         getw
Language: C++

#include<string>
#include<conio.h>
using namespace std;

int n;
string s,moto;

int main(){
	cin>>n;
	cin>>s;
	
	for(int i=0;i<n;i++){
		//moto[i]=s[i];
		if(i!=0&&s[i-1]=='('&&s[i]==')') {
			s[i-1]='1';
			s[i]='2';
	}
	}
	for(int i=0;i<n;i++){
		if(s[i]==')'){
			s.insert(s.begin(),'(');
		}
		else if(s[i]=='('){
			s.push_back(')');
		}
	}
	for(int i=0;i<s.length()-1;i++){
		if(s[i]=='1') s[i]='(';
		else if(s[i]=='2') s[i]=')';
	}
	cout<<s<<endl;
	getch();
	return 0;
}

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

#include"bits/stdc++.h"
#include<conio.h>
using namespace std;
int n;
string st;
int b,a;
int main(){
	cin>>n>>st;
	int right=0,left=0;
	for(int i=0;i<st.length();i++){
		if(st[i]=='('){
			left++;
		}
		else if(st[i]==')'){
			right++;
			if(right>left)a++;
		}
	}
	right=0;left=0;
	for(int i=st.length()-1;i>=0;i--){
		if(st[i]=='('){
			left++;
			if(right<left)b++;
		}
		else if(st[i]==')'){
			right++;
		}
	}
	for(int i=0;i<a;i++)cout<<"(";
	cout<<st;
	for(int i=0;i<b;i++)cout<<")";
	cout<<endl;
	getch();
	return 0;
}

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


#include <iostream>
#include <vector>
#include <string>
#include <queue>
#include <iomanip>
#include <stack>
#include <bitset>
#include <map>

using namespace std;
typedef long long ll;
const ll INF = 1LL << 50;

int solve();

void replace(string& target, string& from, string&to) {
	int pos(target.find(from));
	while (pos != string::npos) {
		target.replace(pos, from.length(), to);
		pos = target.find(from);
	}
}

int main(void) {
	while (solve()) {}
	return 0;
}

int solve() {

	int N;
	cin >> N;
	string s, orig, ans;
	cin >> s;
	orig = s;

	while (orig.find("()") != string::npos) {
		replace(orig, std::string("()"), string(""));
	}

	int r = 0, l = 0;

	for (int i = 0; i < orig.length(); i++) {
		if (orig[i] == ')')
			r++;
		else
			l++;
	}

	for (int i = 0; i < r; i++)
		ans += "(";
	ans += s;
	for (int i = 0; i < l; i++)
		ans += ")";


	cout << ans << endl;
	


	return 0;
}

Compiler output:
a.cc: In function 'int solve()':
a.cc:39:36: error: cannot bind non-const lvalue reference of type 'std::string&' {aka 'std::__cxx11::basic_string<char>&'} to an rvalue of type 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   39 |                 replace(orig, std::string("()"), string(""));
      |                                    ^~~~~~~~~~~~
a.cc:17:38: note:   initializing argument 2 of 'void replace(std::string&, std::string&, std::string&)'
   17 | void replace(string& target, string& from, string&to) {
      |                              ~~~~~~~~^~~~
Language: C++


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

int main( int argc, char *argv[] )
{
int i;
int N;
char S[ 200 ];
char C;
int iL;
int iR;

	ios::sync_with_stdio( false );
	cin.tie( 0 );

	cin >> N;
	cin >> S;


	a = 0;
	b = 0;
	iL = 0;
	iR = 0;
	for( i = 0; i < N; i++ )
	{
		C = S[ i ];
		if( C == ')' )
		{
			if( iL > 0 )
				iL--;
			else
				iR++;
		}
		else
		{
			iL++;
		}
	}

	for( i = 0; i < iR; i++ ) cout << "(";

	cout << S;
	for( i = 0; i < iL; i++ ) cout << ")";

	cout << endl;

	return 0;
}




Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:21:9: error: 'a' was not declared in this scope
   21 |         a = 0;
      |         ^
a.cc:22:9: error: 'b' was not declared in this scope
   22 |         b = 0;
      |         ^
Language: C++

#include <iostream>
#include <cstdio>
#include <map>
#include <cstring>
#define INF 210
#define NMAX 105
using namespace std;
int dp[NMAX][NMAX];
int K[NMAX][NMAX];
map<char,char> M;
int i,j,k,N;
char C[NMAX];
void afisare(int i,int j)
{
    if(i>j)
        return ;
    if(i==j)
    {
        if(C[i]=='('||C[i]==')')
            cout<<"()";
        else
            cout<<"[]";
    }
    else
    {
         if(K[i][j]==0&&M[C[i]]==C[j])
        {
            cout<<C[i];
            afisare(i+1,j-1);
            cout<<C[j];
        }
        else
        {
            afisare(i,K[i][j]);
            afisare(1+K[i][j],j);
        }
    }
}
int main()
{
    scanf("%d\n",&N);
    gets(C+1);
    M['(']=')';
    for(i=N;i>=1;i--)
    {
        for(j=i;j<=N;j++)
        {
            if(i==j)
                dp[i][j]=1;
            else
            {
                dp[i][j]=INF;
                if(M[C[i]]==C[j])
                    dp[i][j]=dp[i+1][j-1];
                for(k=i;k<j;k++)
                    if(dp[i][j]>dp[i][k]+dp[k+1][j])
                    {
                        K[i][j]=k;
                        dp[i][j]=dp[i][k]+dp[k+1][j];
                    }
            }
        }
    }

    afisare(1,N);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:42:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
   42 |     gets(C+1);
      |     ^~~~
      |     getw
Language: C++

#include<bits/stdc++.h>
 
#define Vsort(a) sort(a.begin(), a.end())
#define Vreverse(a) reverse(a.begin(), a.end())
#define Srep(n) for(int i = 0; i < (n); i++)
#define Lrep(i,a,n) for(int i = (a); i < (n); i++)
#define Brep(n) for(int bit = 0; bit < (1<<n); bit++)
#define rep2nd(n,m) Srep(n) Lrep(j,0,m)
#define vi vector<int>
#define vi64 vector<int64_t>
#define vvi vector<vector<int>>
#define vvi64 vector<vector<int64_t>>
 
using namespace std;

int main(){
  int a,b;
  cin >> a >> b;
  cout << (a + b < 10 ? a + b : "error") << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:23: error: operands to '?:' have different types 'int' and 'const char*'
   19 |   cout << (a + b < 10 ? a + b : "error") << endl;
      |            ~~~~~~~~~~~^~~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
 
#define Vsort(a) sort(a.begin(), a.end())
#define Vreverse(a) reverse(a.begin(), a.end())
#define Srep(n) for(int i = 0; i < (n); i++)
#define Lrep(i,a,n) for(int i = (a); i < (n); i++)
#define Brep(n) for(int bit = 0; bit < (1<<n); bit++)
#define rep2nd(n,m) Srep(n) Lrep(j,0,m)
#define vi vector<int>
#define vi64 vector<int64_t>
#define vvi vector<vector<int>>
#define vvi64 vector<vector<int64_t>>
 
using namespace std;

int main(){
  int a,b:
  cin >> a >> b;
  cout << (a + b < 10 ? a + b : "error") << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:10: error: found ':' in nested-name-specifier, expected '::'
   17 |   int a,b:
      |          ^
      |          ::
a.cc:17:9: error: 'b' has not been declared
   17 |   int a,b:
      |         ^
a.cc:18:7: error: qualified-id in declaration before '>>' token
   18 |   cin >> a >> b;
      |       ^~
a.cc:19:16: error: 'b' was not declared in this scope
   19 |   cout << (a + b < 10 ? a + b : "error") << endl;
      |                ^
Language: C++

#include<bits/stdc++.h>
#include<atcoder/all>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
using namespace atcoder;
using ll = long long;
using p = pair<int,int>;
const long long INF = 1ll << 60;


int main() {
  int A, B;
  cin >> A >> B;
  if (A+B >=10) cout << "error" << endl;
  else cout << A+B << endl;
  
	return 0;
}



Compiler output:
a.cc:2:9: fatal error: atcoder/all: No such file or directory
    2 | #include<atcoder/all>
      |         ^~~~~~~~~~~~~
compilation terminated.
Language: Java

import java.util.Scanner;

public class A063 {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner stdIn = new Scanner(System.in);
		int A = stdIn.nextInt();
		int B = stdIn.nextInt();

		if(A+B >= 10)
		{
			System.out.println("error");
		}
		else
		{
			System.out.println(A+B);
		}
	}

}


Compiler output:
Main.java:3: error: class A063 is public, should be declared in a file named A063.java
public class A063 {
       ^
1 error
Language: C++

#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include<iostream>
#include<cstdint>
#include<cstddef>
using namespace std;
using i32 = int_fast32_t;
using i64 = int_fast64_t;
using usize = uint_fast64_t;
#define rep(i, n) for (usize i = 0; i < (usize)(n); i++)
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
using P = pair<i64,i64>;

int main(){
ios::sync_with_stdio(false);
std::cin.tie(nullptr);
i32 a,b;
cin >> a >> b;
if(a + b >= 10)cout << "error" << endl;
elsecout << a + b << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:1: error: 'elsecout' was not declared in this scope
   22 | elsecout << a + b << endl;
      | ^~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
#define ll long long
 
signed main()
{
  int a,b; cin >> a >> b;
  cout << ((a+b>=10)?"error":a+b) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:21: error: operands to '?:' have different types 'const char*' and 'int'
    9 |   cout << ((a+b>=10)?"error":a+b) << endl;
      |            ~~~~~~~~~^~~~~~~~~~~~
Language: C++

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

#define ll long long

signed main()
{
  int a,b; cin >> a >> b;
  cout << ((a+b>=10)?"error":a+b << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:34: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    9 |   cout << ((a+b>=10)?"error":a+b << endl;
      |                              ~~~~^~~~~~~
a.cc:9:41: error: expected ')' before ';' token
    9 |   cout << ((a+b>=10)?"error":a+b << endl;
      |           ~                             ^
      |                                         )
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
#include <string>
using namespace std;
int main() {
	int a, b;
	cin >> a >> b;
	if (a + b >= 10)
		cout << "error" << "\n";
	else
		cout << a + b << "\n"
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:38: error: expected ';' before '}' token
   12 |                 cout << a + b << "\n"
      |                                      ^
      |                                      ;
   13 | }
      | ~
Language: C++

#include<iostream>
using namespace std;
int main(){
  int a,b;
  cin>>a>>b;
  
  cout<<((a+b<10)? a+b:"error");
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: operands to '?:' have different types 'int' and 'const char*'
    7 |   cout<<((a+b<10)? a+b:"error");
      |          ~~~~~~~~^~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

#define ll long long
#define pb push_back
#define vi vector<int>
#define bn(n) (n).begin(), (n).end()
#define FOR(n) for(int i = 0; i < (int)n; i++)


void solve() {
    int a, b;
    cin >> a >> b;
    cout << (a + b > 10 ? "error" : a + b);
}

int main () {
    ios::sync_with_stdio(0);
    cin.tie(0);

    int t = 1, i = 1;
    //cin >> t;
    while(t--) {
        //cout << "Case #" << i << ": ";
        solve();
        //i++;
    }
    return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:15:25: error: operands to '?:' have different types 'const char*' and 'int'
   15 |     cout << (a + b > 10 ? "error" : a + b);
      |              ~~~~~~~~~~~^~~~~~~~~~~~~~~~~
Language: C

#include<stdio.h>

int main()
{
    int A,B,C;
    scanf("%d %d",&a,&b);
    if(1<=A && A<=9 && 1<=B && B<=9)
    {
       C=A+B;
       if(C<=9) printf("%d",C);
       else printf("error");
    }

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:20: error: 'a' undeclared (first use in this function)
    6 |     scanf("%d %d",&a,&b);
      |                    ^
main.c:6:20: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:23: error: 'b' undeclared (first use in this function)
    6 |     scanf("%d %d",&a,&b);
      |                       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a, b;
  cin >>a >>b;
  
  if (a + b < 10)
    cout << a + b;
  else
    cout "error";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: expected ';' before string constant
   11 |     cout "error";
      |         ^~~~~~~~
      |         ;
Language: C++

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

int main() {
  int a , b ;
  cin >> a >> b ;
  cout << (a+b < 10 ? a+b : "error") << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:21: error: operands to '?:' have different types 'int' and 'const char*'
    8 |   cout << (a+b < 10 ? a+b : "error") << endl;
      |            ~~~~~~~~~^~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i, from, to) for (int i = from; i < (to); ++i)
#define mp(x,y) make_pair(x,y)
#define all(x) (x).begin(),(x).end()
#define pb push_back
using ll = long long;
using vin=vector<int>;
using vll=vector<ll>;
using vst=vector<string>;
using P = pair<int, int>;
const int inf=1e9+7;
const ll INF=1e18;
template <typename T> void chmin(T &a, T b) { a = min(a, b); }
template <typename T> void chmax(T &a, T b) { a = max(a, b); }
template<class T> inline void Yes(T condition){ if(condition) cout << "Yes" << endl; else cout << "No" << endl; }
template<class T> inline void YES(T condition){ if(condition) cout << "YES" << endl; else cout << "NO" << endl; }
const int dx[4] = { 1, 0, -1, 0 };
const int dy[4] = { 0, 1, 0, -1 };


int main(){cout<<fixed<<setprecision(10);
           int a,b;
		   cin>>a>>b;
           cout<<(a+b<10 ? a+b:"error")<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:26: error: operands to '?:' have different types 'int' and 'const char*'
   26 |            cout<<(a+b<10 ? a+b:"error")<<endl;
      |                   ~~~~~~~^~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i, from, to) for (int i = from; i < (to); ++i)
#define mp(x,y) make_pair(x,y)
#define all(x) (x).begin(),(x).end()
#define pb push_back
using ll = long long;
using vin=vector<int>;
using vll=vector<ll>;
using vst=vector<string>;
using P = pair<int, int>;
const int inf=1e9+7;
const ll INF=1e18;
template <typename T> void chmin(T &a, T b) { a = min(a, b); }
template <typename T> void chmax(T &a, T b) { a = max(a, b); }
template<class T> inline void Yes(T condition){ if(condition) cout << "Yes" << endl; else cout << "No" << endl; }
template<class T> inline void YES(T condition){ if(condition) cout << "YES" << endl; else cout << "NO" << endl; }
const int dx[4] = { 1, 0, -1, 0 };
const int dy[4] = { 0, 1, 0, -1 };


int main(){cout<<fixed<<setprecision(10);
           int a,b;
		   cin>>a>>b;
           cout<<(a+b<10 ?a+b:"error")<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:26: error: operands to '?:' have different types 'int' and 'const char*'
   26 |            cout<<(a+b<10 ?a+b:"error")<<endl;
      |                   ~~~~~~~^~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i, from, to) for (int i = from; i < (to); ++i)
#define mp(x,y) make_pair(x,y)
#define all(x) (x).begin(),(x).end()
#define pb push_back
using ll = long long;
using vin=vector<int>;
using vll=vector<ll>;
using vst=vector<string>;
using P = pair<int, int>;
const int inf=1e9+7;
const ll INF=1e18;
template <typename T> void chmin(T &a, T b) { a = min(a, b); }
template <typename T> void chmax(T &a, T b) { a = max(a, b); }
template<class T> inline void Yes(T condition){ if(condition) cout << "Yes" << endl; else cout << "No" << endl; }
template<class T> inline void YES(T condition){ if(condition) cout << "YES" << endl; else cout << "NO" << endl; }
const int dx[4] = { 1, 0, -1, 0 };
const int dy[4] = { 0, 1, 0, -1 };


int main(){cout<<fixed<<setprecision(10);
           int a,b;
		   cin>>a>>b;
           cout<<(a+b<10?a+b:"error")<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:25: error: operands to '?:' have different types 'int' and 'const char*'
   26 |            cout<<(a+b<10?a+b:"error")<<endl;
      |                   ~~~~~~^~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>

using namespace std;

#define debug(n) cerr << #n << ':' << n << endl;
#define dline    cerr << __LINE__ << endl;

using ll = long long;
using ull = unsigned long long;
template<class T, class U> using P = pair<T,U>;
template<class T> using Heap = priority_queue<T>;
template<class T> using heaP = priority_queue<T,vector<T>,greater<T>>;
template<class T,class U> using umap = unordered_map<T,U>;
template<class T> using uset = unordered_set<T>;

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

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

template<class T, size_t N, class U>
void Fill(T (&a)[N], const U&v){
    fill((U*)a,(U*)(a+N),v);
}

template<class T>
istream& operator >> (istream&is, vector<T>&v){
  for(auto&e:v)is >> e;
  return is;
}

int main(){
  int a,b; cin >> a >> b;
  cout << (a+b >= 10 ? "error" : a+b) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:41:22: error: operands to '?:' have different types 'const char*' and 'int'
   41 |   cout << (a+b >= 10 ? "error" : a+b) << endl;
      |            ~~~~~~~~~~^~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
 
using namespace std;
 
typedef long long ll;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef pair<ll,ll> P;
typedef string str;
typedef vector<P> vp;
typedef vector<string> vs;
typedef vector<bool> vb;

const ll mod=1e9+7;
const ll inf=1e16;

#define rep(i,m,n) for(ll i=m;i<n;i++)
#define repr(i,m,n) for(ll i=m-1;i>=n;i--)
#define fi first
#define se second
#define chmax(x,y) x=max(x,y)
#define chmin(x,y) x=min(x,y)
#define eb(x) emplace_back(x)
#define pb(x) pop_back(x)
#define all(x) x.begin(),x.end()
#define allr(x) x.rbegin(),x.rend()
#define sum(x) accumulate(all(x),0)
#define pc(x) __builtin_popcount(x)
#define gll greater<ll>()

void solve(){
  ll a,b;
  cin >>a >> b;
  a+=b;
  cout << (a>=10?"error":a) << endl;
}

int main(){
   cin.tie(nullptr);
  ios::sync_with_stdio(false);
  solve();
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:35:17: error: operands to '?:' have different types 'const char*' and 'll' {aka 'long long int'}
   35 |   cout << (a>=10?"error":a) << endl;
      |            ~~~~~^~~~~~~~~~
Language: C++

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

int func(int A){
  int A,B;
  cin >> A >> B;
  if(A+B>=10){
    cout << "error" << endl;
  }
  else{
    cout << A+B << endl;
  }
}

Compiler output:
a.cc: In function 'int func(int)':
a.cc:5:7: error: declaration of 'int A' shadows a parameter
    5 |   int A,B;
      |       ^
a.cc:4:14: note: 'int A' previously declared here
    4 | int func(int A){
      |          ~~~~^
a.cc:13:1: warning: no return statement in function returning non-void [-Wreturn-type]
   13 | }
      | ^
Language: C++

#include<bits/stdc++.h>
#define ll                  long long
#define dl                 long double
#define pb                push_back
#define F                  first
#define S                  second
#define endl              "\n"
#define rep(i,a,b)       for(i=a;i<b;i++)
#define all(v)             v.begin(),v.end()
#define allr(v)            v.rbegin(),v.rend()
#define mod              1000000007LL
#define CIN(V,s,n)      for(int i=s;i<n;i++){cin >> V[i];}
#define COUT(V,s,n)   {for(int i=s;i<n;i++){cout <<  V[i] << " "  ;} cout << endl;}
#define fast               ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define CLEAR(V);      for(ll i=0;i<V.size();i++) V[i] = 0;
#define N                  101LL
#define tmod             998244353LL
using namespace std;

bool sBs(const pair<int,int> &a,const pair<int,int> &b)
{   return (a.second < b.second);   }

ll Powb(ll b,ll n,ll m);
ll BS(vector<pair< ll ,ll > > &PS,ll s,ll e,ll ser);
ll MI(ll a, ll m);
ll P[N+1];
void Sieve(int n=N);

void AA(flag)
{
    if(flag) cout << "YES";
}
int main()
{
fast;
ll q=1,t;
//cin >> q; t = q;
while(q--)
{
    ll i,j,n,m,k,l=0,r=0,a=1,b=0,c=0,d=0,e,g=1,p,u,v,w,x,y,flag=1;
    //n=m=k=i=j=l=r=a=b=c=d=u=v=w=p=x=y=0;
    cin >> a >> b;
    if(a+b >= 10) cout << "error";
    else cout << (a+b);

}
    return 0;
}

//*****************************************************************************************************************************************

ll Powb(ll b,ll n,ll m)
{
    if(n==0) return 1LL;
    if(n==1) return b;
    ll temp = Powb(b,n/2,m);
    if(n%2==0){return (temp*temp)%m;}
    else{return (b*((temp*temp)%m))%m;}
}

ll BS(vector<pair<ll,ll> > &PS,ll s,ll e,ll ser)
{
    if(s>e)
        return s;
    ll mid = (s+e)/2;
    if(PS[mid].F==ser)
    {
        return mid;
    }
    else if(PS[mid].F > ser)
    {
        return BS(PS,s,mid-1,ser);
    }
    else
        return BS(PS,mid+1,e,ser);
}
ll MI(ll a, ll m)
{
    ll m0 = m;
    ll y = 0, x = 1;
    if (m == 1)
      return 0;
    while (a > 1)
    {
        ll q = a / m;
        ll t = m;
        m = a % m, a = t;
        t = y;
        y = x - q * y;
        x = t;
    }
    if (x < 0)
       x += m0;
    return x;
}

void Sieve(int n)
{
    //memset(P,true,sizeof(P));
    //P[0] = false;
    //P[1]= false;
    for(int i=1;i<=n;i++) P[i] = i;
    for(ll i=2;i*i<=n;i++)
    {
        if(P[i]==i)
        {
            for(ll j=i*i;j<=n;j+=i)
            {
                if(P[j]==j)
                    P[j]=i;
            }
        }
    }

}



Compiler output:
a.cc:29:6: error: variable or field 'AA' declared void
   29 | void AA(flag)
      |      ^~
a.cc:29:9: error: 'flag' was not declared in this scope
   29 | void AA(flag)
      |         ^~~~
Language: C++

#include<stdio.h>
#include<iostream>
#include<vector>
#include<math.h>
#include<queue>
#include<map>
#include<algorithm>
#include<string.h>
#include<functional>
#include<limits.h>
#include<stdlib.h>
#include<string>
#include<unordered_map>
using namespace std;
 
#define intmax INT_MAX
#define lmax LONG_MAX
#define uintmax UINT_MAX
#define ulmax ULONG_MAX
#define llmax LLONG_MAX
#define ll long long
#define rep(i,a,N) for((i)=(a);(i)<(N);(i)++)
#define rrp(i,N,a) for((i)=(N)-1;(i)>=(a);(i)--)
#define llfor ll i,j,k
#define sc(a) cin>>a
#define pr(a) cout<<a<<endl
#define pY puts("YES")
#define pN puts("NO")
#define py puts("Yes")
#define pn puts("No")
#define pnn printf("\n")
#define sort(a) sort(a.begin(),a.end())
#define push(a,b) (a).push_back(b)
#define llvec vector<vector<ll>>
#define charvec vector<vector<char>>
#define sizeoof(a,b) (a,vector<ll>(b))
#define llpvec vector<pair<ll,ll>>
/*繰り上げ除算*/ll cei(ll x,ll y){ll ans=x/y;if(x%y!=0)ans++;return ans;}
/*最大公約数*/ll gcd(ll x,ll y){return y?gcd(y,x%y):x;}
/*最小公倍数*/ll lcm(ll x,ll y){return x/gcd(x,y)*y;}
/*n乗*/ll llpow(ll x,ll n){ll i,ans=1;rep(i,0,n)ans*=x;return ans;}
/*階乗*/ll fact(ll x){ll i,ans=1;rep(i,0,x)ans*=(x-i);return ans;}
/*nCr*/ll ncr(ll n,ll r){return fact(n)/fact(r)/fact(n-r);}
/*nPr*/ll npr(ll n,ll r){return fact(n)/fact(n-r);}
/*primejudge*/bool prime(ll a){if(a<=1)return false;ll i;for(i=2;i*i<=a;i++){if(a%i==0)return false;}return true;}
ll ans=0;llfor;///////////////////////////////////////////////////////////
int main(){
  int A,B;
  cin>>A>>B;
  if(A+B<10) cout<<A+B;
  else cout<<"error";
  cout<<S;
return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:52:9: error: 'S' was not declared in this scope
   52 |   cout<<S;
      |         ^
Language: C++

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

int main() {
  int n, m;
  cin >> n >> m;
  cout << (n+m>9 ? "error" : n+m);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: operands to '?:' have different types 'const char*' and 'int'
   10 |   cout << (n+m>9 ? "error" : n+m);
      |            ~~~~~~^~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
using LL = long long;
#define REP(i, n) for (LL i = 0; i < (LL)(n); i++)
#define FOR(i, m, n) for (LL i = m; i < n; i++)
#define SORT(x) sort(x.begin(), x.end())
#define REVE(x) reverse(x.begin(), x.end())
#define ALL(x) (x).begin(), (x).end()
#define SUM(x) accumulate(x.begin(), x.end(),0)
#define vLL(v,n) vector<LL> v(n); REP(i,n)cin>>v[i];
#define vstr(v,n) vector<string> v(n); REP(i,n)REP(i,n)cin>>v[i];
#define mina(a,b) a=min(a,b);
LL INF = 1e9 + 1;
LL MOD = 1e9+7;
  LL a,b,c,d,e,n,m,l,r,ans=1000;
string s,S,t;
int main() {
ios_base::sync_with_stdio(false);
  cin >>s;
  REP(i,s.size()){
      REP(j,s.size()){
          (i!=j){
              if(s[i]==s[j]){
                  cout << "no"<<endl;
                  return 0;
              }
          }
      }
  }
  cout << "yes"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:17: error: expected ';' before '{' token
   22 |           (i!=j){
      |                 ^
      |                 ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
using LL = long long;
#define REP(i, n) for (LL i = 0; i < (LL)(n); i++)
#define FOR(i, m, n) for (LL i = m; i < n; i++)
#define SORT(x) sort(x.begin(), x.end())
#define REVE(x) reverse(x.begin(), x.end())
#define ALL(x) (x).begin(), (x).end()
#define SUM(x) accumulate(x.begin(), x.end(),0)
#define vLL(v,n) vector<LL> v(n); REP(i,n)cin>>v[i];
#define vstr(v,n) vector<string> v(n); REP(i,n)REP(i,n)cin>>v[i];
#define mina(a,b) a=min(a,b);
LL INF = 1e9 + 1;
LL MOD = 1e9+7;
  LL a,b,c,d,e,n,m,l,r,ans=1000;
string s,S,t;
int main() {
ios_base::sync_with_stdio(false);
  cin >>s;
  REP(i,s.size){
      REP(j,s.size()){
          if(i!=j){
              if(s[i]==s[j]){
                  cout << "no"<<endl;
                  return 0;
              }
          }
      }
  }
  cout << "yes"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:11: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   20 |   REP(i,s.size){
      |           ^
a.cc:4:43: note: in definition of macro 'REP'
    4 | #define REP(i, n) for (LL i = 0; i < (LL)(n); i++)
      |                                           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
 string n;
  cin >> n;
  int k=n.size();
  vector<char> vec(k+1);
  for(int i=0;i<k;i++)
    vec[i+1]=n[i];
  bool A=true;
  int s=1;
  count++;
  while(s <= k){
    for(int i=0;i<k;i++){
      if(vec[s] == n[i] &&count >2){
      count++;}
    else if(vec[s] == n[i] && count >=2){
      A=false;
      break;
    }
      else continue;
    }
     s++;
  }
    if(A)cout << "yes" <<endl;
    else cout << "no" <<endl;
 
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:13:8: error: no post-increment operator for type
   13 |   count++;
      |        ^~
a.cc:16:33: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator>'
   16 |       if(vec[s] == n[i] &&count >2){
      |                           ~~~~~~^~
a.cc:17:12: error: no post-increment operator for type
   17 |       count++;}
      |            ^~
a.cc:18:37: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator>='
   18 |     else if(vec[s] == n[i] && count >=2){
      |                               ~~~~~~^~~
Language: C++

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

int main(){
  int a,b;
  cin >> a >> b;
  if(a+b<=9){
    cout << a+b << endl;
  }
  else{
    cout << "error" << endl;
  }
}

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

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
#define MOD 1000000007ULL;
#define rep(i,n) for(int i=0;i<n;i++)

int main() {
	ll N,M;
  	cin>>N>>M;
  	
  	if(N+M>=10) cout<<"error"<<endl;
  	else cout<<A+B<<endl;
  	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:20: error: 'A' was not declared in this scope
   16 |         else cout<<A+B<<endl;
      |                    ^
a.cc:16:22: error: 'B' was not declared in this scope
   16 |         else cout<<A+B<<endl;
      |                      ^
Language: C

#include<stdio.h>

int main()
{
 int a,b;

 scnaf("%d %d",&a,&b);

 if(a+b>=10)printf("error");
 else printf("%d",a+b);

 return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:2: error: implicit declaration of function 'scnaf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    7 |  scnaf("%d %d",&a,&b);
      |  ^~~~~
      |  scanf
Language: C

#include <stdio.h>
int A, B;
int main() {
  
  scanf("%d %d",&A,&B);
int c= A+B;
   if(A+B<10);
    printf("%d",c);
   else
    printf("error");





  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:4: error: 'else' without a previous 'if'
    9 |    else
      |    ^~~~
Language: C

#include <stdio.h>
int A, B;
int main() {
  
  scanf("%d %d",&A,&B);
int c= A+B;
   if(A+B<10);
    printf("%d,c");
   else
    printf("error");





  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:4: error: 'else' without a previous 'if'
    9 |    else
      |    ^~~~
Language: C

#include <stdio.h>
int A, B;
int main() {
  
  scanf("%d %d",&A,&B);
int c= A+B;
   if(A+B>=10);
    printf("error");
   else
    printf("%d,c");





  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:4: error: 'else' without a previous 'if'
    9 |    else
      |    ^~~~
Language: C++

main(a,b){scanf("%d%d",&a,&b);a+b>9?puts("error"):printf("%d",a+b);}

Compiler output:
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
    1 | main(a,b){scanf("%d%d",&a,&b);a+b>9?puts("error"):printf("%d",a+b);}
      |     ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i=0;i<(n);i++)
using namespace std;
using ll = long long;
using P = pair<int,int>;
 
 
int main() {
    int a,b;
    cin >> a >> b;
    oif(a+b>=10)cout << "error" << endl;
    else cout << a+b << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'oif' was not declared in this scope
   11 |     oif(a+b>=10)cout << "error" << endl;
      |     ^~~
a.cc:12:5: error: 'else' without a previous 'if'
   12 |     else cout << a+b << endl;
      |     ^~~~
Language: C++

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

typedef long long ll;
typedef pair<int,int> pii;

long long MOD = 1000000000 + 7;
long long MAX = 1000000000000000000;

int main(){
  cout << setprecision(10);
  int A,B;
  cin >> A >> B;
  cout << (A+B >= 10 ? "error" : A+B) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:22: error: operands to '?:' have different types 'const char*' and 'int'
   14 |   cout << (A+B >= 10 ? "error" : A+B) << endl;
      |            ~~~~~~~~~~^~~~~~~~~~~~~~~
Language: C++

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

int main() {
  int a,b;cin>>a>>b;
  if(a+b>=10) cout << "error" << endl;
  else cout << A+B << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: 'A' was not declared in this scope
    9 |   else cout << A+B << endl;
      |                ^
a.cc:9:18: error: 'B' was not declared in this scope
    9 |   else cout << A+B << endl;
      |                  ^
Language: C++

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

int main() {
  int A. B;
  cin >> A >> B;
  
  if (A+B <= 9) {  
    cout << A+B << endl;
  }
  else {
    cout << "error" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: expected initializer before '.' token
    5 |   int A. B;
      |        ^
a.cc:6:10: error: 'A' was not declared in this scope
    6 |   cin >> A >> B;
      |          ^
a.cc:6:15: error: 'B' was not declared in this scope
    6 |   cin >> A >> B;
      |               ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n); for(int i = 0;i < (n);i++)
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
long double pi = acos(-1);
const int INF = 1001001001;


// 最小公倍数を求める
int euqlid (int a, int b){
  int temp;
  temp = a % b;
  if(temp == 0)return b;
  return euqlid(b,temp);
}
ll conbination(ll a,ll b){
  ll u = 1;
  ll d = 1;
  while(b != 0){
    u *= a;
    d *= b;
    a--;
    b--;
  }
  return u / d;
}
int strtoint(char s){
  return (int(s-'0'));
}
int fact(int n){
  if(n == 1)return 1;
  return n * fact(n-1);
  }


int main(){
  int a,b;
  cin >> a >> b;
  cout << (a+b <= 10?a+b:"error") << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:40:21: error: operands to '?:' have different types 'int' and 'const char*'
   40 |   cout << (a+b <= 10?a+b:"error") << endl;
      |            ~~~~~~~~~^~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n); for(int i = 0;i < (n);i++)
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
long double pi = acos(-1);
const int INF = 1001001001;


// 最小公倍数を求める
int euqlid (int a, int b){
  int temp;
  temp = a % b;
  if(temp == 0)return b;
  return euqlid(b,temp);
}
ll conbination(ll a,ll b){
  ll u = 1;
  ll d = 1;
  while(b != 0){
    u *= a;
    d *= b;
    a--;
    b--;
  }
  return u / d;
}
int strtoint(char s){
  return (int(s-'0'));
}
int fact(int n){
  if(n == 1)return 1;
  return n * fact(n-1);
  }


int main(){
  int a,b;
  cin >> a >>　b;
  cout << (a+b <= 10?a+b:"error") << endl;
}


Compiler output:
a.cc:39:14: error: extended character 　 is not valid in an identifier
   39 |   cin >> a >>　b;
      |              ^
a.cc: In function 'int main()':
a.cc:39:14: error: '\U00003000b' was not declared in this scope
   39 |   cin >> a >>　b;
      |              ^~~
a.cc:40:21: error: operands to '?:' have different types 'int' and 'const char*'
   40 |   cout << (a+b <= 10?a+b:"error") << endl;
      |            ~~~~~~~~~^~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
template <typename T> using vec = vector<T>;

int main()
{
    int a,b;
    cin >> a >> b;

    cout << ((a+b>=10) ? a+b : "error") << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:24: error: operands to '?:' have different types 'int' and 'const char*'
   10 |     cout << ((a+b>=10) ? a+b : "error") << endl;
      |              ~~~~~~~~~~^~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int A,B;
main(){cin>>A>>B;string sum=to_string(A+B);puts(A+B>9?"error":sum);}


Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){cin>>A>>B;string sum=to_string(A+B);puts(A+B>9?"error":sum);}
      | ^~~~
a.cc: In function 'int main()':
a.cc:4:54: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
    4 | main(){cin>>A>>B;string sum=to_string(A+B);puts(A+B>9?"error":sum);}
      |                                                 ~~~~~^~~~~~~~~~~~
      |                                                      |
      |                                                      std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/stdio.h:714:30: note:   initializing argument 1 of 'int puts(const char*)'
  714 | extern int puts (const char *__s);
      |                  ~~~~~~~~~~~~^~~
Language: C++

#include <bits/stdc++.h>
int A,B;
string sum=to_string(A+B);
main(){
  cin >> A>>B;cout<<(A+B>10?"error":sum)<endl;}


Compiler output:
a.cc:3:1: error: 'string' does not name a type; did you mean 'stdin'?
    3 | string sum=to_string(A+B);
      | ^~~~~~
      | stdin
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin >> A>>B;cout<<(A+B>10?"error":sum)<endl;}
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:5:15: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 |   cin >> A>>B;cout<<(A+B>10?"error":sum)<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:5:37: error: 'sum' was not declared in this scope
    5 |   cin >> A>>B;cout<<(A+B>10?"error":sum)<endl;}
      |                                     ^~~
a.cc:5:42: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    5 |   cin >> A>>B;cout<<(A+B>10?"error":sum)<endl;}
      |                                          ^~~~
      |                                          std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
int A,B;
string s=std::to_string(A+B);
main(){
  std::cin >> A>>B;std::cout << (A+B>10 ? "error":s);}


Compiler output:
a.cc:3:1: error: 'string' does not name a type; did you mean 'stdin'?
    3 | string s=std::to_string(A+B);
      | ^~~~~~
      | stdin
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:5:51: error: 's' was not declared in this scope
    5 |   std::cin >> A>>B;std::cout << (A+B>10 ? "error":s);}
      |                                                   ^
Language: C++

#include <bits/stdc++.h>
int A,B;
main(){std::cin >> A>>B;std::cout << (A+B>10 ? "error":A+B);}


Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main(){std::cin >> A>>B;std::cout << (A+B>10 ? "error":A+B);}
      | ^~~~
a.cc: In function 'int main()':
a.cc:3:46: error: operands to '?:' have different types 'const char*' and 'int'
    3 | main(){std::cin >> A>>B;std::cout << (A+B>10 ? "error":A+B);}
      |                                       ~~~~~~~^~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
int A,B;
main(){
  std::cin >> A>>B;
  std::cout << (A+B>10 ? "error":A+B);
}

Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:5:24: error: operands to '?:' have different types 'const char*' and 'int'
    5 |   std::cout << (A+B>10 ? "error":A+B);
      |                 ~~~~~~~^~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
int A,B;
main(){
  int A,B;
  std::cin >> A>>B;
  std::cout << (A+B>10 ? "error":A+B) << endl;
}

Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:6:24: error: operands to '?:' have different types 'const char*' and 'int'
    6 |   std::cout << (A+B>10 ? "error":A+B) << endl;
      |                 ~~~~~~~^~~~~~~~~~~~~
a.cc:6:42: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |   std::cout << (A+B>10 ? "error":A+B) << endl;
      |                                          ^~~~
      |                                          std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
                 from a.cc:1:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

int main(){
  int A,B;cin >> A>>B;cout << (A+B>10 ? "error":A+B) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:39: error: operands to '?:' have different types 'const char*' and 'int'
    5 |   int A,B;cin >> A>>B;cout << (A+B>10 ? "error":A+B) << endl;
      |                                ~~~~~~~^~~~~~~~~~~~~
Language: C++

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

int main(){
  int A,B;
  cin >> A>>B;
  cout << (A+B>10 ? "error":A+B) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: operands to '?:' have different types 'const char*' and 'int'
    7 |   cout << (A+B>10 ? "error":A+B) << endl;
      |            ~~~~~~~^~~~~~~~~~~~~
Language: C++

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

int main(){
  int A,B;
  cin >> A>>B;
  cout << (A+B>10?"error":A+B) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: operands to '?:' have different types 'const char*' and 'int'
    7 |   cout << (A+B>10?"error":A+B) << endl;
      |            ~~~~~~^~~~~~~~~~~~