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

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



int main() {
    int a, b;
    cin >> a >> b;
    int ans = max({a+b, a-b, a*b});
    cout ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: expected ';' before 'ans'
   15 |     cout ans;
      |         ^~~~
      |         ;
Language: C

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

int main(void) {
  int A, B;
  scanf("%d %d", &A, &B);
  printf("%d", max(A+B, A-B, A*B));
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:16: error: implicit declaration of function 'max' [-Wimplicit-function-declaration]
    7 |   printf("%d", max(A+B, A-B, A*B));
      |                ^~~
Language: C++

//保留所有权利。
#include<iostream>
#include<stdio.h>//printするよ
#include<vector>
#include<algorithm>//辞書順はnext_permutationだよ
#include<set>
#include<string>
#include<sstream>
#include<string.h>
#include<time.h>
#include<random>
#include<cmath>
#include<math.h>
#include<queue>
#include<time.h>
#include<iomanip>
#include<utility>//swapで数値交換するよ
//END OF LIBRARIES.
#define rt "\n"//改行を最速化させるよ
#define rep(i,n) for(int i=0;i<n;i++)
#define rop(i,n) for(int i=1;i<=n;i++)
#define drep(i,n) for(int i=n-1;0<=i;i--)
#define yes(ans) if(ans)cout<<"yes"<<rt;else cout<<"no"<<rt;
#define Yes(ans) if(ans)cout<<"Yes"<<rt;else cout<<"No"<<rt;
#define YES(ans) if(ans)cout<<"YES"<<rt;else cout<<"NO"<<rt;
#define sec(a,b,ans) if(ans)cout<<a<<rt;else cout<<b<<rt;
#define vcin(v) for (int i = 0; i < (v).size(); i++) { cin >> (v)[i]; }
#define sort(s) sort(s.begin(),s.end())
#define reve(s) reverse(s.begin(),s.end())
#define asas int ans=0
#define llcncn llint cnt=0
#define llasas llint ans=0
#define cncn int cnt=0
#define smsm int sum=0
#define str srting
#define v vector
#define please return
#define AC 0//おまじないだよ
#define Rapid cin.tie(0);ios::sync_with_stdio(false)
//END OF DEFINE.
using namespace std;
typedef vector<int> vint;
typedef vector<string> vstr;
typedef vector<char> vcha;
typedef vector<double> vdou;
typedef long long int llint;
typedef pair<int, int> pint;
typedef pair<llint, llint> pllint;
typedef vector<llint> vllint;
typedef vector<pint> vpint;
typedef vector<pair<llint, llint>> vpllint;
typedef vector<vector<int>> vvint;
typedef vector<vector<llint>> vvllint;
typedef vector<vector<string>> vvstr;
typedef vector<vector<pint>> vvpint;
typedef vector<bool> vbool;
//printf("%02d:%02d:%02d\n", h, m, s);・・・2文字は埋める・h、m、ｓ
//END OF TYPEDEF.

//最大公約数（GCD）を求めるよ
//最小公倍数（LCM）は＜＜　A × B ÷ GCD　 ＞＞で求まるよ

long long GCD(long long a, long long b) {
	if (b == 0) return a;
	else return GCD(b, a % b);
}
long long LCM(long long a, long long b) {
	return a * b / GCD(a, b);
}

//for A以上B未満でI探索 for (int I = A; i <= B; i++)
//string s = to_string(i);
int a = 0, b = 0, x = 0, y = 0, z = 0, n = 0;
string s = ""; asas; cncn;

int main(void) {
	cin >> a >> b;
	ans = max((a + b), (a - b));
	z = max(ans, (a * b);
	cout << z << rt;
	please AC;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:79:29: error: expected ')' before ';' token
   79 |         z = max(ans, (a * b);
      |                ~            ^
      |                             )
Language: C++

#include <iostream>
#include <cmath>
#include <cstdio>
#include <bits/stdc++.h>
typedef long long int ll;
using namespace std;

int main(){
    ll a,b;
    cin>>a>>b;
    cout<<max(a+b,a-b,a*b)<<endl;
}

Compiler output:
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = long long int; _Compare = long long int]':
a.cc:11:14:   required from here
   11 |     cout<<max(a+b,a-b,a*b)<<endl;
      |           ~~~^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
int main(){
  int a,b,x,y,z;
  cin >> a>> b;
  x=a+b;
  y=a-b;
  z=a*b;
   cout << max(a,max(b,c)) << endl;
  return 0;
}
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:10:24: error: 'c' was not declared in this scope
   10 |    cout << max(a,max(b,c)) << endl;
      |                        ^
Language: C

x,y = map(int,input().split())
if (x+y) > (x*y):
  if (x+y) > (x-y):
    print(str(x+y))
  elif (x-y) > (x+y):
    print(str(x-y))
elif (x*y) > (x-y):
  print(str(x*y))
else:
  print("0")
  

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | x,y = map(int,input().split())
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'x' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'y' [-Wimplicit-int]
    1 | x,y = map(int,input().split())
      |   ^
main.c:1:7: error: implicit declaration of function 'map' [-Wimplicit-function-declaration]
    1 | x,y = map(int,input().split())
      |       ^~~
main.c:1:11: error: expected expression before 'int'
    1 | x,y = map(int,input().split())
      |           ^~~
main.c:2:1: error: expected ',' or ';' before 'if'
    2 | if (x+y) > (x*y):
      | ^~
Language: C

x,y = map(int,input().split())
if (x+y) > (x*y):
  if (x+y) > (x-y):
    print(str(x+y))
  elif (x-y) > (x+y):
    print(str(x-y))
elif (x*y) > (x-y):
  print(str(x*y))
else:
  print("0")

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | x,y = map(int,input().split())
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'x' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'y' [-Wimplicit-int]
    1 | x,y = map(int,input().split())
      |   ^
main.c:1:7: error: implicit declaration of function 'map' [-Wimplicit-function-declaration]
    1 | x,y = map(int,input().split())
      |       ^~~
main.c:1:11: error: expected expression before 'int'
    1 | x,y = map(int,input().split())
      |           ^~~
main.c:2:1: error: expected ',' or ';' before 'if'
    2 | if (x+y) > (x*y):
      | ^~
Language: C++

#include <bits/stdc++.h>
#include <string>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <numeric>
using namespace std;


int main(){
  int A,B;
  cin >> A >> B;
  int answa = A + B;
  int anssa = A - B;
  int ansseki = A*B;
  cout << max(answa,anssa,ansseki) << endl;
}

Compiler output:
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:16:14:   required from here
   16 |   cout << max(answa,anssa,ansseki) << endl;
      |           ~~~^~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C++

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

int main(void){
    int a = 0, b = 0; 
    int max = 0;

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

//    printf("%d\n", b);
    if(max < a + b){
        max = a + b;
    }
    if(max < a * b){
        max = a * b;
    }
    if(b < 0){
        if(max < a - (1) * b){
            max = a - (1) * b;
        }
    }
    if(b >= 0){
        if(max < a - b){
            max = a - b;
        }
    }

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

    return 0;
} 


Compiler output:
a.cc:16:21: error: stray '\16' in program
   16 |         max = a * b;<U+000E>
      |                     ^~~~~~~~
Language: C++

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

int main() {
	int a, b;
	cin >> a >> b;
	int ans = ({ a + b,a * b,a - b });
	cout << ans << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:39: error: expected ';' before '}' token
   11 |         int ans = ({ a + b,a * b,a - b });
      |                                       ^~
      |                                       ;
Language: C++

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

int main(void){
    int a = 0, b = 0; 
    int max = 0;

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

//    printf("%d\n", b);
    if(max < a + b){
        max = a + b;
    }else if(max < a * b){
        max = a * b;
    }if(b < 0){
        if(max < a - (-1) * b){
            max = a - (-1) * b;
        }
    }else if(b >= 0){}
        if(max < a - b){
            max = a - b;
        }
    }

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

    return 0;
} 


Compiler output:
a.cc:26:11: error: expected constructor, destructor, or type conversion before '(' token
   26 |     printf("%d\n", max);
      |           ^
a.cc:28:5: error: expected unqualified-id before 'return'
   28 |     return 0;
      |     ^~~~~~
a.cc:29:1: error: expected declaration before '}' token
   29 | }
      | ^
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
int main(){
  int a,b;
  cin>>a>>b;
  cout<<min(min(a+b,a-b),a*b)<<endl;


Compiler output:
a.cc: In function 'int main()':
a.cc:7:37: error: expected '}' at end of input
    7 |   cout<<min(min(a+b,a-b),a*b)<<endl;
      |                                     ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <iostream>
using namespace std;
int main(){
  int a,b;
  cin>>a>>b;
  cout<<min(min(a+b,a-b),a*b)<<endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:6:37: error: expected '}' at end of input
    6 |   cout<<min(min(a+b,a-b),a*b)<<endl;
      |                                     ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
int main(){
  int a,b;
  cout<<max(a+B,max(a-b,a*b))<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: 'B' was not declared in this scope
    7 |   cout<<max(a+B,max(a-b,a*b))<<endl;
      |               ^
Language: C++

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

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

    cout << max(a - b, a + b, a * b) << endl; 
}

Compiler output:
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:9:16:   required from here
    9 |     cout << max(a - b, a + b, a * b) << endl;
      |             ~~~^~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{

int w,x,y,z,j;
cin>>w>>x;
y=w+x;
z=w-x;
j=w*x;
if(y>=z&&y>=j){cout<<y;}
else if (z>=y&&z>=j){cout<<z;}
else if(j>=z&&j>=y){cout<<j;}




    return 0;
}





    return 0;
}





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

#include<iostream>
using namespace std;
int main()
{

int w,x,y,z,j;
cin>>w>>x;
y=w+x;
z=w-x;
j=w*x;
if(y>=z&&y>j){cout<<y;}
else if (z>=y&&z>=j){cout<<z;}
else if(j>=z&&j>=y){cout<<j;}




    return 0;
}





    return 0;
}





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

#include<iostream>
using namespace std;
int main()
{

int w,x,y,z,j;
cin>>w>>x;
y=w+x;
z=w-x;
j=w*x;
if(y>=z&&y>j){cout<<y;}
else if (z>=y&&z>=j){cout<<z;}
else if(j>=z&&j>=y){cout<<j;}

else if(w==0&&x==0){cout<<'0';}


    return 0;
}






    return 0;
}





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

#include<iostream>
using namespace std;
int main()
{

int w,x,y,z,j;
cin>>w>>x;
y=w+x;
z=w-x;
j=w*x;
if(y>z&&y>j){cout<<y;}
else if (z>y&&z>j){cout<<z;}
else if(j>z&&j>y){cout<<j;}

else if(w==0&&x==0){cout<<'0';}


    return 0;
}






    return 0;
}





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

v#include<iostream>
using namespace std;
int main() {
	int a, b;
	cin >> a >> b;
	if (b < 0)cout << a - b << endl;
	else {
		if (a + b > a* b)cout << a + b << endl;
		else cout << a * b << endl;
	}
}

Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | v#include<iostream>
      |  ^
a.cc:1:1: error: 'v' does not name a type
    1 | v#include<iostream>
      | ^
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope
    5 |         cin >> a >> b;
      |         ^~~
a.cc:6:19: error: 'cout' was not declared in this scope
    6 |         if (b < 0)cout << a - b << endl;
      |                   ^~~~
a.cc:6:36: error: 'endl' was not declared in this scope
    6 |         if (b < 0)cout << a - b << endl;
      |                                    ^~~~
a.cc:8:34: error: 'cout' was not declared in this scope
    8 |                 if (a + b > a* b)cout << a + b << endl;
      |                                  ^~~~
a.cc:8:51: error: 'endl' was not declared in this scope
    8 |                 if (a + b > a* b)cout << a + b << endl;
      |                                                   ^~~~
a.cc:9:22: error: 'cout' was not declared in this scope
    9 |                 else cout << a * b << endl;
      |                      ^~~~
a.cc:9:39: error: 'endl' was not declared in this scope
    9 |                 else cout << a * b << endl;
      |                                       ^~~~
Language: C

#include<stdio.h>
int main(){
  int a,b;
  scanf("%d%d",&a,&b);
  if(a+b >=a-b && a+b >= a*b){
    printf("%d"a+b);
  }else if(a-b >= a+b && a-b >= a*b){
    printf("%d",a-b);
  }else{
    printf("%d",a*b);
  }
  return 0;}

Compiler output:
main.c: In function 'main':
main.c:6:16: error: expected ')' before 'a'
    6 |     printf("%d"a+b);
      |           ~    ^
      |                )
Language: C++

#include <iostream>

using namespace std;

int main(){
    int a;
    int b;
    cin >> a >> b;
    int result = max({a + b, a -b, a * b});
    cout << result << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:21: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    9 |     int result = max({a + b, a -b, a * b});
      |                  ~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
Language: C++

#include <iostream>

using namespace std;

int main(){
    int a;
    int b;
    cin >> a >> b;
    int result = max({a * b, a -b, a * b});
    cout << result << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:21: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    9 |     int result = max({a * b, a -b, a * b});
      |                  ~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
Language: C++

int main()
{
    int  x,y;
    int a,b,c;
    while(~scanf("%d%d",&x,&y))
    {

        a=x+y;
        b=x-y;
        c=x*y;
        if(y==0)
            printf("%d\n",x);
        if(a>b&&a>c)
            printf("%d\n",a);
        if(b>a&&b>c)
            printf("%d\n",b);
        if(c>a&&c>b)
            printf("%d\n",c);
        if(x==2&&y==2)
            printf("4\n");

    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:12: error: 'scanf' was not declared in this scope
    5 |     while(~scanf("%d%d",&x,&y))
      |            ^~~~~
a.cc:12:13: error: 'printf' was not declared in this scope
   12 |             printf("%d\n",x);
      |             ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main()
a.cc:14:13: error: 'printf' was not declared in this scope
   14 |             printf("%d\n",a);
      |             ^~~~~~
a.cc:14:13: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:16:13: error: 'printf' was not declared in this scope
   16 |             printf("%d\n",b);
      |             ^~~~~~
a.cc:16:13: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:18:13: error: 'printf' was not declared in this scope
   18 |             printf("%d\n",c);
      |             ^~~~~~
a.cc:18:13: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:20:13: error: 'printf' was not declared in this scope
   20 |             printf("4\n");
      |             ^~~~~~
a.cc:20:13: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include <bits/stdc++.h>
#define rep(i,m,n) for(int i=m; i<n; i++)
#define co(n) cout << n << endl
using namespace std;
int main(){
 int a, b, c, d;
  cin >> a >> b;
  
  co(max(a+b, a-b, a*b));
  
  return 0;
}


Compiler output:
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:9:3:   required from here
    9 |   co(max(a+b, a-b, a*b));
      |      ~~~^~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,m,n) for(int i=m; i<n; i++)
#define co(n) cout << n << endl
using namespace std;
int main(){
 int a, b, c, d;
  cin >> a >> b;
  
  co(max(a+b, a-b, a*b);
  
  return 0;
}


Compiler output:
a.cc:12:2: error: unterminated argument list invoking macro "co"
   12 | }
      |  ^
a.cc: In function 'int main()':
a.cc:9:3: error: 'co' was not declared in this scope
    9 |   co(max(a+b, a-b, a*b);
      |   ^~
a.cc:9:5: error: expected '}' at end of input
    9 |   co(max(a+b, a-b, a*b);
      |     ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int a, b; cin >> a >> b;
    cout << (max(a + b, max(a * b , max(a, b) - min(a, b))));
}
#include<bits/stdc++.h>
using namespace std;
int main(){
    int a, b; cin >> a >> b;
    cout << (max(a + b, max(a * b , a - a)));
}


Compiler output:
a.cc:9:5: error: redefinition of 'int main()'
    9 | int main(){
      |     ^~~~
a.cc:3:5: note: 'int main()' previously defined here
    3 | int main(){
      |     ^~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main() {
  int a, b;
  cin >> a >> b;
  cout << max(a + b, a - b, a * b) << endl;
  return 0;
}

Compiler output:
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:8:14:   required from here
    8 |   cout << max(a + b, a - b, a * b) << endl;
      |           ~~~^~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C++

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

int main() {
	int m, n;
  	cin >> m >> n;
  
  	int ans = m + n;
  	ans = max(ans, abs(m-n));
    
    cout << ans;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope
    6 |         cin >> m >> n;
      |         ^~~
a.cc:9:24: error: 'abs' was not declared in this scope; did you mean 'ans'?
    9 |         ans = max(ans, abs(m-n));
      |                        ^~~
      |                        ans
a.cc:9:15: error: 'max' was not declared in this scope
    9 |         ans = max(ans, abs(m-n));
      |               ^~~
a.cc:11:5: error: 'cout' was not declared in this scope
   11 |     cout << ans;
      |     ^~~~
Language: C++

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

int main() {
	int m, n;
  	cin >> m >> n;
  
  	int ans = m + n;
  	ans = max(and, abs(m-n));
    
    cout << ans;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope
    6 |         cin >> m >> n;
      |         ^~~
a.cc:9:22: error: expected identifier before ',' token
    9 |         ans = max(and, abs(m-n));
      |                      ^
a.cc:9:24: error: 'abs' was not declared in this scope; did you mean 'ans'?
    9 |         ans = max(and, abs(m-n));
      |                        ^~~
      |                        ans
a.cc:9:15: error: 'max' was not declared in this scope
    9 |         ans = max(and, abs(m-n));
      |               ^~~
a.cc:11:5: error: 'cout' was not declared in this scope
   11 |     cout << ans;
      |     ^~~~
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
    int a, b;
    cin >> a >> b;

    vector <int> v;
    v.push_back(a+b);
    v.push_back(a-b);
    v.push_back(a*b);

    sort(v.begin(), v.end());

    cout << v[2] << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'vector' was not declared in this scope
    9 |     vector <int> v;
      |     ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include <algorithm>
  +++ |+#include <vector>
    3 | using namespace std;
a.cc:9:13: error: expected primary-expression before 'int'
    9 |     vector <int> v;
      |             ^~~
a.cc:10:5: error: 'v' was not declared in this scope
   10 |     v.push_back(a+b);
      |     ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main()
{
	int a,b;
	cin>>a>>b;
	cout << max(a + b,a * b, a - b);
}

Compiler output:
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:9:13:   required from here
    9 |         cout << max(a + b,a * b, a - b);
      |                 ~~~^~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C

/*saidaiti*/
#include<stdio.h>
int main(void)
{
  int a,b;
  scanf("%d",&a);
  scanf("%d",&b);
  if(a+b>a-b&&a+b>a*b){
         printf("%d\n",a+b);
  }
  else if(a-b>a+b&&a-b>a*b){
         printf("%d\n",a-b);
  }
  else{
         printf("%d\n",a*b);
  }
  return 0
}

Compiler output:
main.c: In function 'main':
main.c:17:11: error: expected ';' before '}' token
   17 |   return 0
      |           ^
      |           ;
   18 | }
      | ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main (){
  int a,b;
  cin>>a>>b;
  cout<<max(a-b,a*b,a+b);
  return 0;
}

Compiler output:
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:6:12:   required from here
    6 |   cout<<max(a-b,a*b,a+b);
      |         ~~~^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(){
  int a,b,c;
  cin >> a >> b;
  c = max(a+b,a-b)
  cout << max(a*b,c) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: expected ';' before 'cout'
    8 |   c = max(a+b,a-b)
      |                   ^
      |                   ;
    9 |   cout << max(a*b,c) << endl;
      |   ~~~~
Language: Java

import java.util.*;

public class Main{
   public static void main(Stirng[] args){
     Scanner sc=new Scanner(System.in);
     final int A=sc.nextInt();
     final int B=sc.nextInt();
     int[] x={A+B,A-B,A*B};
     Arrays.sort(x);
     System.out.println(x[2]);
   }
}

Compiler output:
Main.java:4: error: cannot find symbol
   public static void main(Stirng[] args){
                           ^
  symbol:   class Stirng
  location: class Main
1 error
Language: C++

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


int main() {
    int a,b;
    int s,m,d

    s =a+b;
    m =a*b;
    d =a-b;
    cout<<max(s,m,d)<<endl;



}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: expected initializer before 's'
    9 |     s =a+b;
      |     ^
a.cc:11:5: error: 'd' was not declared in this scope
   11 |     d =a-b;
      |     ^
Language: C++

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

int main(){
int a,b,x,y,z;

cin >> a >> b;

x=a+b;
y=a-b;
z=a*b;

if(x>=y && x>=z){
cout << x;
}else if(y>=x && y>=z){
cout << y;
}else{
cout << z;
}

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

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

int main(){
int a,b,x,y,z;

cin >> a >> b;

x=a+b;
y=a-b;
z=a*b;

if(x>=y && x>=z){
cout << x;
}else if(y>=x && y>=z){
cout << y;
}else{
cout << z
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:10: error: expected ';' before '}' token
   18 | cout << z
      |          ^
      |          ;
   19 | }
      | ~         
a.cc:19:2: error: expected '}' at end of input
   19 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

int main() {
	ios_base::sync_with_stdio( false );

	int A, B;
	cin >> A >> B;
	cout << max( { A+B, A-B, A*B } ) << endl;

	return 0;
}


Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | /#include <bits/stdc++.h>
      |  ^
a.cc:1:1: error: expected unqualified-id before '/' token
    1 | /#include <bits/stdc++.h>
      | ^
a.cc: In function 'int main()':
a.cc:5:9: error: 'ios_base' has not been declared
    5 |         ios_base::sync_with_stdio( false );
      |         ^~~~~~~~
a.cc:8:9: error: 'cin' was not declared in this scope
    8 |         cin >> A >> B;
      |         ^~~
a.cc:9:9: error: 'cout' was not declared in this scope
    9 |         cout << max( { A+B, A-B, A*B } ) << endl;
      |         ^~~~
a.cc:9:17: error: 'max' was not declared in this scope
    9 |         cout << max( { A+B, A-B, A*B } ) << endl;
      |                 ^~~
a.cc:9:45: error: 'endl' was not declared in this scope
    9 |         cout << max( { A+B, A-B, A*B } ) << endl;
      |                                             ^~~~
Language: Java

#include <iostream>
using namespace std;
int main(void){
    int a,b,max;
    cin >> a >> b;
    
    if(a+b>a*b && a+b>a-b){
        max=a+b;
    }
    else if(a-b>a+b && a-b>a*b){
        max=a-b;
    }
    else{ 
        max=a*b;
    }
    cout << max << endl;
    return 0;
    
}

Compiler output:
Main.java:1: error: illegal character: '#'
#include <iostream>
^
Main.java:1: error: class, interface, enum, or record expected
#include <iostream>
         ^
Main.java:5: error: not a statement
    cin >> a >> b;
             ^
Main.java:16: error: not a statement
    cout << max << endl;
                ^
Main.java:3: error: unnamed classes are a preview feature and are disabled by default.
int main(void){
^
  (use --enable-preview to enable unnamed classes)
Main.java:3: error: <identifier> expected
int main(void){
             ^
6 errors
Language: Java

#include <iostream>
using namespace std;
int main(void){
    int a,b,max;
    cin >> a >> b;
    
    if(a+b>a*b && a+b>a-b)
        max=a+b;
    else if(a-b>a+b && a-b>a*b)
        max=a-b;
    else 
        max=a*b;
    
    cout << max << endl;
    return 0;
    
}


Compiler output:
Main.java:1: error: illegal character: '#'
#include <iostream>
^
Main.java:1: error: class, interface, enum, or record expected
#include <iostream>
         ^
Main.java:5: error: not a statement
    cin >> a >> b;
             ^
Main.java:14: error: not a statement
    cout << max << endl;
                ^
Main.java:3: error: unnamed classes are a preview feature and are disabled by default.
int main(void){
^
  (use --enable-preview to enable unnamed classes)
Main.java:3: error: <identifier> expected
int main(void){
             ^
6 errors
Language: Java

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

int main(void)
{
    int a,b,max;
    cin >> a >> b;
    
    if(a+b>a*b && a+b>a-b)
        max=a+b;
    else if(a-b>a+b && a-b>a*b)
        max=a-b;
    else 
        max=a*b;
    
    cout << max << endl;
    return 0;
}

Compiler output:
Main.java:1: error: illegal character: '#'
#include <iostream>
^
Main.java:2: error: illegal character: '#'
#include <cstdlib>
^
Main.java:8: error: not a statement
    cin >> a >> b;
             ^
Main.java:17: error: not a statement
    cout << max << endl;
                ^
Main.java:5: error: unnamed classes are a preview feature and are disabled by default.
int main(void)
^
  (use --enable-preview to enable unnamed classes)
Main.java:5: error: <identifier> expected
int main(void)
             ^
6 errors
Language: Java

// This file is a "Hello, world!" in C++ language by GCC for wandbox.
#include <iostream>
#include <cstdlib>
using namespace std;

int main()
{
    int a,b,max;
    cin >> a >> b;
    
    if(a+b>a*b && a+b>a-b)
        max=a+b;
    else if(a-b>a+b && a-b>a*b)
        max=a-b;
    else 
        max=a*b;
    
    cout << max << endl;
    return 0;
}

Compiler output:
Main.java:2: error: illegal character: '#'
#include <iostream>
^
Main.java:3: error: illegal character: '#'
#include <cstdlib>
^
Main.java:9: error: not a statement
    cin >> a >> b;
             ^
Main.java:18: error: not a statement
    cout << max << endl;
                ^
Main.java:6: error: unnamed classes are a preview feature and are disabled by default.
int main()
^
  (use --enable-preview to enable unnamed classes)
5 errors
Language: Java

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

int main()
{
    int a,b,max;
    cin >> a >> b;
    
    if(a+b>a*b && a+b>a-b)
        max=a+b;
    else if(a-b>a+b && a-b>a*b)
        max=a-b;
    else 
        max=a*b;
    
    cout << max << endl;
    return 0;
}

Compiler output:
Main.java:1: error: illegal character: '#'
#include <iostream>
^
Main.java:2: error: illegal character: '#'
#include <cstdlib>
^
Main.java:8: error: not a statement
    cin >> a >> b;
             ^
Main.java:17: error: not a statement
    cout << max << endl;
                ^
Main.java:5: error: unnamed classes are a preview feature and are disabled by default.
int main()
^
  (use --enable-preview to enable unnamed classes)
5 errors
Language: C++

#include<bits/stdc++.h>
int main(){int a,b;std::cin>>a>>b;std::cout<<max({a+b,a-b,a*b});}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:46: error: 'max' was not declared in this scope; did you mean 'std::max'?
    2 | int main(){int a,b;std::cin>>a>>b;std::cout<<max({a+b,a-b,a*b});}
      |                                              ^~~
      |                                              std::max
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
Language: C++

#include<iostream>
#define size(array) (sizeof(array) / sizeof(array[0]))
using namespace std;
int main(void){
  int a,b;
  cin >> a >> b;
  cout << max({a-b,a+b,a*b});
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    7 |   cout << max({a-b,a+b,a*b});
      |           ~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int a,b;cin>>a>>b;
    ans = max(a+b,a-b);
    ans = max(ans,a*b);
    cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
    5 |     ans = max(a+b,a-b);
      |     ^~~
      |     abs
Language: C++

#include<algorithm>
#include<bitset>
#include<cassert>
#include<cfloat>
#include<climits>
#include<cmath>
#include<cstring>
#include<deque>
#include<functional>
#include<iomanip>
#include<iostream>
#include<map>
#include<queue>
#include<set>
#include<stack>
#include<unordered_map>
#include<unordered_set>
#include<utility>
#include<vector>

using namespace std;

using lint = long long;
using P = pair<int, int>;
using LLP = pair<long long, long long>;

#define REP(i, x, n) for(int i = (x), i##_len = (int)(n) ; i < i##_len ; ++i)
#define rep(i, n) for(int i = 0, i##_len = (int)(n) ; i < i##_len ; ++i)
#define reps(i, n) for(int i = 1, i##_len = (int)(n) ; i <= i##_len ; ++i)
#define rrep(i, n) for(int i = (int)(n) - 1 ; i >= 0 ; --i)
#define rreps(i, n) for(int i = (int)(n) ; i > 0 ; --i)
#define SORT(x) sort((x).begin(), (x).end())
#define SORT_INV(x) sort((x).rbegin(), (x).rend())
#define REVERSE(x) reverse((x).begin(), (x).end())
#define TWINS(x) cout << ((x) ? "Yay!" : ":(") << endl

constexpr int IINF = (1 << 30) - 1;
constexpr long long LLINF = 1LL << 61;
constexpr double EPS = 1e-10;

constexpr int dx4[] = {1, 0, -1, 0}, dy4[] = {0, 1, 0, -1};
constexpr int dx8[] = {1, 1, 0, -1, -1, -1, 0, 1}, dy8[] = {0, -1, -1, -1, 0, 1, 1, 1};

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

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

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

    int a, b;
    cin >> a >> b;

    cout << max(a + b, a - b, a * b) << endl;

    return 0;
}

Compiler output:
In file included from /usr/include/c++/14/algorithm:60,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:69:16:   required from here
   69 |     cout << max(a + b, a - b, a * b) << endl;
      |             ~~~^~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: Java

import java.util.Scanner;//入力を取得する(Scanner)

class Main {
	public static void main(String arts[]) {
		int a,b;
		Scanner sc = new Scanner(System.in);
		a = sc.nextInt();
		b = sc.nextInt();
		int x, y , z;
		x = a + b ;
		y  = a - b;
		z = a * b;

		int ans=y;
	if(x>=y){ 
		ans = x;
	}
	if(ans <= z){
		ans = z ;
	}
	System.out.println(ans1);
	}
}


Compiler output:
Main.java:21: error: cannot find symbol
	System.out.println(ans1);
	                   ^
  symbol:   variable ans1
  location: class Main
1 error
Language: Java

import java.util.Scanner;//入力を取得する(Scanner)

class Main {
	public static void main(String arts[]) {
		int a,b;
		Scanner sc = new Scanner(System.in);
		a = sc.nextInt();
		b = sc.nextInt();
		int x, y , z;
		x = a + b ;
		y  = a - b;
		z = a * b;

		int ans1;
	if(x>=y){ 
		ans1 = x;
	}
	if(ans1 <= z){
		ans1 = z ;
	}
	System.out.println(ans1);
	}
}


Compiler output:
Main.java:18: error: variable ans1 might not have been initialized
	if(ans1 <= z){
	   ^
1 error
Language: C++

import java.util.Scanner;//入力を取得する(Scanner)

class Main {
	public static void main(String arts[]) {
		int a,b;
		Scanner sc = new Scanner(System.in);
		a = sc.nextInt();
		b = sc.nextInt();
		int x, y , z;
		x = a + b ;
		y  = a - b;
		z = a * b;

		int ans1;
	if(x>=y){ 
		ans1 = x;
	}
	if(ans1 <= z){
		ans1 = z ;
	}
	System.out.println(ans1);
	}
}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;//入力を取得する(Scanner)
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:15: error: expected ':' before 'static'
    4 |         public static void main(String arts[]) {
      |               ^~~~~~~
      |               :
a.cc:4:33: error: 'String' has not been declared
    4 |         public static void main(String arts[]) {
      |                                 ^~~~~~
a.cc:23:2: error: expected ';' after class definition
   23 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:6:17: error: 'Scanner' was not declared in this scope
    6 |                 Scanner sc = new Scanner(System.in);
      |                 ^~~~~~~
a.cc:7:21: error: 'sc' was not declared in this scope
    7 |                 a = sc.nextInt();
      |                     ^~
a.cc:21:9: error: 'System' was not declared in this scope
   21 |         System.out.println(ans1);
      |         ^~~~~~
Language: C++

#include <iostream>

using namespace std;

int main()
{
    int a,b,m,s,m2;
    cin>>a>>b;
    s=a+b;
    m=a*b;
    mi=a-b;
    cout<<max(s,m,m2);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'mi' was not declared in this scope; did you mean 'm2'?
   11 |     mi=a-b;
      |     ^~
      |     m2
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:12:14:   required from here
   12 |     cout<<max(s,m,m2);
      |           ~~~^~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: Java

import java.util.Scanner;
class Rp1ABC098A {
    public static void main(String[] args) {
    
    int A = sc.nextInt();
    int B = sc.nextInt();

    int add = A + B;
    int sub = A - B;
    int mul = A * B;
      max = add;
      if(sub > max) max = sub;
      if(mul > max) max = mul;

      System.out.println(max);
   }
}

Compiler output:
Main.java:5: error: cannot find symbol
    int A = sc.nextInt();
            ^
  symbol:   variable sc
  location: class Rp1ABC098A
Main.java:6: error: cannot find symbol
    int B = sc.nextInt();
            ^
  symbol:   variable sc
  location: class Rp1ABC098A
Main.java:11: error: cannot find symbol
      max = add;
      ^
  symbol:   variable max
  location: class Rp1ABC098A
Main.java:12: error: cannot find symbol
      if(sub > max) max = sub;
               ^
  symbol:   variable max
  location: class Rp1ABC098A
Main.java:12: error: cannot find symbol
      if(sub > max) max = sub;
                    ^
  symbol:   variable max
  location: class Rp1ABC098A
Main.java:13: error: cannot find symbol
      if(mul > max) max = mul;
               ^
  symbol:   variable max
  location: class Rp1ABC098A
Main.java:13: error: cannot find symbol
      if(mul > max) max = mul;
                    ^
  symbol:   variable max
  location: class Rp1ABC098A
Main.java:15: error: cannot find symbol
      System.out.println(max);
                         ^
  symbol:   variable max
  location: class Rp1ABC098A
8 errors
Language: C++

import java.util.Scanner;

class Rp1ABC098A {
    public static void main(String args[]) {



        Scanner scanner = new Scanner(System.in);

        int result = scanner.nextInt();

        int A = result;

        result = scanner.nextInt();
        int B = result;

        int sum = A + B;
        int difference = A - B;
        int product = A * B;

        int max = sum;
        if(difference > max) max = difference;
        if(product > max) max = product;

        System.out.println(max);


        return;
    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:11: error: expected ':' before 'static'
    4 |     public static void main(String args[]) {
      |           ^~~~~~~
      |           :
a.cc:4:29: error: 'String' has not been declared
    4 |     public static void main(String args[]) {
      |                             ^~~~~~
a.cc:30:2: error: expected ';' after class definition
   30 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Rp1ABC098A::main(int*)':
a.cc:8:9: error: 'Scanner' was not declared in this scope
    8 |         Scanner scanner = new Scanner(System.in);
      |         ^~~~~~~
a.cc:10:22: error: 'scanner' was not declared in this scope
   10 |         int result = scanner.nextInt();
      |                      ^~~~~~~
a.cc:25:9: error: 'System' was not declared in this scope
   25 |         System.out.println(max);
      |         ^~~~~~
Language: C++

#include <iostream>
namespace std;
int main(){
  int A,B;cin>>A>>B;
  int ans=A+B;
  if(ans<A-B)Ans=A-B;
  if(ans<A*B)Ans=A*B;
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc:2:14: error: expected '{' before ';' token
    2 | namespace std;
      |              ^
a.cc: In function 'int main()':
a.cc:4:11: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   int A,B;cin>>A>>B;
      |           ^~~
      |           std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:14: error: 'Ans' was not declared in this scope; did you mean 'ans'?
    6 |   if(ans<A-B)Ans=A-B;
      |              ^~~
      |              ans
a.cc:7:14: error: 'Ans' was not declared in this scope; did you mean 'ans'?
    7 |   if(ans<A*B)Ans=A*B;
      |              ^~~
      |              ans
a.cc:8:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |   cout<<ans<<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:8:14: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |   cout<<ans<<endl;
      |              ^~~~
      |              std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~