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

#include<bits/stdc++.h>
int main()
{
    int a,b,s,d,m;
    cin>>a>>b;
    s=a+b;
    d=a-b;
    m=a*b;
    if(s>d&&s>m)
    cout<<s;
    else if(s>d&&s<m)
    cout<<m;
    else if(s<d&&s<m&&d<m)
    cout<<m;
    else
        cout<<d;

    }


Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |     cin>>a>>b;
      |     ^~~
      |     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:10:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |     cout<<s;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:12:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |     cout<<m;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:14:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |     cout<<m;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:16:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |         cout<<d;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <iostream>
#include <vector>

using namespace std;

int a;
int b;

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

    std::vector<int> vec(3);
    vec[0] = a + b;
    vec[1] = a - b;
    vec[2] = a * b;

    int max = *std::max_element(vec.begin(), vec.end());

    cout << max << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:21: error: 'max_element' is not a member of 'std'; did you mean 'tuple_element'?
   17 |     int max = *std::max_element(vec.begin(), vec.end());
      |                     ^~~~~~~~~~~
      |                     tuple_element
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:20: error: 'max' cannot be used as a function
    7 |   int max = max(max(A + B,A * B),A-B)
      |                 ~~~^~~~~~~~~~~~~
a.cc:7:16: error: 'max' cannot be used as a function
    7 |   int max = max(max(A + B,A * B),A-B)
      |             ~~~^~~~~~~~~~~~~~~~~~~~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:4:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 | 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:5:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 | cout<<max(a+b,a-b,a*b)<<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:7: error: 'max' was not declared in this scope; did you mean 'std::max'?
    5 | cout<<max(a+b,a-b,a*b)<<endl;
      |       ^~~
      |       std::max
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: 'std::max' declared here
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
a.cc:5:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    5 | cout<<max(a+b,a-b,a*b)<<endl;
      |                         ^~~~
      |                         std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

int main() {
	int A, B;
	cin >> A >> B;
	int c = A + B;
	int d = A - B;
	int e = A * B;

	int f = max({ c, d, e });

	cout << f << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:15:27: error: expected '}' at end of input
   15 |         cout << f << endl;
      |                           ^
a.cc:6:12: note: to match this '{'
    6 | int main() {
      |            ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'max\U0000ff08max\U0000ff08\U0000ff08A' was not declared in this scope
    7 |   cout<<max（max（（A-B）,（A+B））,A*B）<<endl;
      |         ^~~~~~~~~~~~~
a.cc:7:23: error: 'B\U0000ff09' was not declared in this scope
    7 |   cout<<max（max（（A-B）,（A+B））,A*B）<<endl;
      |                       ^~~
a.cc:7:27: error: '\U0000ff08A' was not declared in this scope
    7 |   cout<<max（max（（A-B）,（A+B））,A*B）<<endl;
      |                           ^~~
a.cc:7:31: error: 'B\U0000ff09\U0000ff09' was not declared in this scope
    7 |   cout<<max（max（（A-B）,（A+B））,A*B）<<endl;
      |                               ^~~~~
Language: C++

#include<iostream>
#include<algorithm>
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/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:7:12:   required from here
    7 |   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 <cmath>
using namespace std;
int main()
{
	int a,b;
	cin >> a >> b;
	int n1,n2,n3;
	n1=a+b;
	n2=a-b;
	n3=a*b;
	int max1;
	if(n1>n2)
		max1=n1;
	else
		max1=n2;
	if(n3>max1)
		max1=n3;
	cout << max1 << endl;
	return 0;
}

Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

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

int main(){
  int a, b;
  vector<int> hoge;
  cin >> a >> b;
  hoge.push_back(a*b);
  hoge.push_back(a+b);
  hoge.push_back(a-b);
  int c = *max_element(hoge.begin(), hoge.end());
  cout << c << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:12: error: 'max_element' was not declared in this scope
   12 |   int c = *max_element(hoge.begin(), hoge.end());
      |            ^~~~~~~~~~~
Language: C++

using System;
class ProgramA
    {
        static void Main(string[] args)
        {
            
            string[] input = Console.ReadLine().Split(' ');
            int a = int.Parse(input[0]);
            int b = int.Parse(input[1]);
            

            int plus = a+b;
            int minus = a-b;
            int mul = a*b;
            if(plus >= minus)
            {
                if(plus >= mul)
                    Console.WriteLine(plus);
                else
                    Console.WriteLine(mul);
            }    
            else
            {
                if(minus >= mul)
                    Console.WriteLine(minus);
                else
                    Console.WriteLine(mul);
            } 
    
        }
    }

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:4:26: error: 'string' has not been declared
    4 |         static void Main(string[] args)
      |                          ^~~~~~
a.cc:4:35: error: expected ',' or '...' before 'args'
    4 |         static void Main(string[] args)
      |                                   ^~~~
a.cc:31:6: error: expected ';' after class definition
   31 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void ProgramA::Main(int*)':
a.cc:7:13: error: 'string' was not declared in this scope
    7 |             string[] input = Console.ReadLine().Split(' ');
      |             ^~~~~~
a.cc:7:20: error: expected primary-expression before ']' token
    7 |             string[] input = Console.ReadLine().Split(' ');
      |                    ^
a.cc:8:21: error: expected primary-expression before 'int'
    8 |             int a = int.Parse(input[0]);
      |                     ^~~
a.cc:9:21: error: expected primary-expression before 'int'
    9 |             int b = int.Parse(input[1]);
      |                     ^~~
a.cc:18:21: error: 'Console' was not declared in this scope
   18 |                     Console.WriteLine(plus);
      |                     ^~~~~~~
a.cc:20:21: error: 'Console' was not declared in this scope
   20 |                     Console.WriteLine(mul);
      |                     ^~~~~~~
a.cc:25:21: error: 'Console' was not declared in this scope
   25 |                     Console.WriteLine(minus);
      |                     ^~~~~~~
a.cc:27:21: error: 'Console' was not declared in this scope
   27 |                     Console.WriteLine(mul);
      |                     ^~~~~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: invalid type argument of unary '*' (have 'int')
    9 |         x=*max_element(c,d);
      |           ^~~~~~~~~~~~~~~~~
a.cc:10:13: error: invalid type argument of unary '*' (have 'int')
   10 |         max=*max_element(x,e);
      |             ^~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:71,
                 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/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::__ops::_Iter_less_iter::operator()(_Iterator1, _Iterator2) const [with _Iterator1 = int; _Iterator2 = int]':
/usr/include/c++/14/bits/stl_algo.h:5626:12:   required from 'constexpr _ForwardIterator std::__max_element(_ForwardIterator, _ForwardIterator, _Compare) [with _ForwardIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
 5626 |         if (__comp(__result, __first))
      |             ~~~~~~^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:5650:43:   required from 'constexpr _FIter std::max_element(_FIter, _FIter) [with _FIter = int]'
 5650 |       return _GLIBCXX_STD_A::__max_element(__first, __last,
      |                                           ^
a.cc:9:16:   required from here
    9 |         x=*max_element(c,d);
      |            ~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/predefined_ops.h:45:16: error: invalid type argument of unary '*' (have 'int')
   45 |       { return *__it1 < *__it2; }
      |                ^~~~~~
/usr/include/c++/14/bits/predefined_ops.h:45:25: error: invalid type argument of unary '*' (have 'int')
   45 |       { return *__it1 < *__it2; }
      |                         ^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
     
     
//#define SPEED ios::sync_with_stdio(false); cin.tie(0); cout.tie(0)
#define ll long long
#define sd(x) scanf("%d",&x)
#define sld(x) scanf("%lld",&x)
#define pld(x) printf("%lld\n",x)
#define pd(x) printf("%d\n",x)

#define pqueue priority_queue<int,vector<int>,greater<int >> 
     
     
int main(){

	int a , b;

	int max ;

	sd(a); sd(b); sd(c);

	max = a+b;

	if(max < a- b)max = a-b;

	if(max < a * b) max = max = a*b;

	pd(max);
           
     
     
        
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:26: error: 'c' was not declared in this scope
   21 |         sd(a); sd(b); sd(c);
      |                          ^
a.cc:7:27: note: in definition of macro 'sd'
    7 | #define sd(x) scanf("%d",&x)
      |                           ^
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
#include<math.h>

using namespace std;

int main(void) {
	int A, B;
	int C;
	cin >> A >> B;
	C=max(A + B, A - B, A * B);
	cout << C;
}

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 = int; _Compare = int]':
a.cc:12:7:   required from here
   12 |         C=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: Java

import java.util.Scanner;
public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   int A = sc.nextInt();
   int B = sc.nextInt();
   int w = A+B;
   int s = A-B;
   int seki = A*B;
   
   int M1 = max(w,s);
   int M = max(M1,seki);

   System.out.println(M);
 }
}

Compiler output:
Main.java:11: error: cannot find symbol
   int M1 = max(w,s);
            ^
  symbol:   method max(int,int)
  location: class Main
Main.java:12: error: cannot find symbol
   int M = max(M1,seki);
           ^
  symbol:   method max(int,int)
  location: class Main
2 errors
Language: C++

import sys

input = sys.stdin.readline


def main():
    a, b = [int(i) for i in input().split()]
    print(max([a + b, a - b, a * b]))


if __name__ == "__main__":
    main()


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import sys
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include <iostream>
#include <vector>

using namespace std;

int a;
int b;

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

    vector<int> vec(3);
    vec[0] = a + b;
    vec[1] = a - b;
    vec[2] = a * b;

    int max = *std::max_element(vec.begin(), vec.end());

    cout << max << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:21: error: 'max_element' is not a member of 'std'; did you mean 'tuple_element'?
   17 |     int max = *std::max_element(vec.begin(), vec.end());
      |                     ^~~~~~~~~~~
      |                     tuple_element
Language: C++

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

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

}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: redeclaration of 'int ans'
    8 |   int ans = max(max(a+b, a-b), a*b);
      |       ^~~
a.cc:7:7: note: 'int ans' previously declared here
    7 |   int ans = 0;
      |       ^~~
Language: C++

#include <iostream>
#include <algorithm>
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/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: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<iostream>
#include<stdio.h>
#include<algorithm>

using namespace std;

int main{}{
  int a,b;
  cin >> a >> b;
 
  int res = max((a - b), max((a + b), (a * b)));
  return 0;
}

Compiler output:
a.cc:7:5: error: cannot declare '::main' to be a global variable
    7 | int main{}{
      |     ^~~~
a.cc:7:11: error: expected ',' or ';' before '{' token
    7 | int main{}{
      |           ^
Language: C++

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

int main(){
  int a, b;
  vector<int> hoge;
  cin >> a >> b;
  hoge.push_back(a*b);
  hoge.push_back(a+b);
  hoge.push_back(a-b);
  int c = *std::max_element(hoge.begin(), hoge.end());
  cout << c << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: 'max_element' is not a member of 'std'; did you mean 'tuple_element'?
   12 |   int c = *std::max_element(hoge.begin(), hoge.end());
      |                 ^~~~~~~~~~~
      |                 tuple_element
Language: C++

#include <iostream >

using namespace std;

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


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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin >> a >> b;
      |     ^~~
a.cc:4:13: error: 'max' was not declared in this scope
    4 |     f = max(max(a+b,a-b),a*b);
      |             ^~~
a.cc:4:9: error: 'max' was not declared in this scope
    4 |     f = max(max(a+b,a-b),a*b);
      |         ^~~
a.cc:5:5: error: 'cout' was not declared in this scope
    5 |     cout << f << endl;
      |     ^~~~
a.cc:5:18: error: 'endl' was not declared in this scope
    5 |     cout << f << endl;
      |                  ^~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:4:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 | 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:5:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 | cout<<max(a+b,a-b,a*b)<<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:7: error: 'max' was not declared in this scope; did you mean 'std::max'?
    5 | cout<<max(a+b,a-b,a*b)<<endl
      |       ^~~
      |       std::max
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: 'std::max' declared here
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
a.cc:5:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    5 | cout<<max(a+b,a-b,a*b)<<endl
      |                         ^~~~
      |                         std::endl
/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;
#define F first
#define S second
#define R cin>>
#define Z class
#define ll long long
#define ln cout<<'\n'
#define in(a) insert(a)
#define pb(a) push_back(a)
#define pd(a) printf("%.10f\n",a)
#define mem(a) memset(a,0,sizeof(a))
#define all(c) (c).begin(),(c).end()
#define iter(c) __typeof((c).begin())
#define rrep(i,n) for(ll i=(ll)(n)-1;i>=0;i--)
#define REP(i,m,n) for(ll i=(ll)(m);i<(ll)(n);i++)
#define rep(i,n) REP(i,0,n)
#define tr(it,c) for(iter(c) it=(c).begin();it!=(c).end();it++)
template<Z A>void pr(A a){cout<<a;ln;}
template<Z A,Z B>void pr(A a,B b){cout<<a<<' ';pr(b);}
template<Z A,Z B,Z C>void pr(A a,B b,C c){cout<<a<<' ';pr(b,c);}
template<Z A,Z B,Z C,Z D>void pr(A a,B b,C c,D d){cout<<a<<' ';pr(b,c,d);}
template<Z A>void PR(A a,ll n){rep(i,n){if(i)cout<<' ';cout<<a[i];}ln;}
ll check(ll n,ll m,ll x,ll y){return x>=0&&x<n&&y>=0&&y<m;}
const ll MAX=1e9+7,MAXL=1LL<<61,dx[4]={-1,0,1,0},dy[4]={0,1,0,-1};
typedef pair<ll,ll> P;

void Main() {
  ll x,y;
  cin >> x >> y;
  pr(max({x+y,x-y,x*y});
}

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


Compiler output:
a.cc: In function 'void Main()':
a.cc:31:24: error: expected ')' before ';' token
   31 |   pr(max({x+y,x-y,x*y});
      |     ~                  ^
      |                        )
Language: Java

import java.util.*;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
if(B<0){
if(A-B>A*B){
System.out.println(A-B);
}else{
System.out.println(A*B);
}
}else{
if(A+B>A*B){
System.out.println(A+B)
}else{
System.out.println(A*B)
}
}
}}

Compiler output:
Main.java:15: error: ';' expected
System.out.println(A+B)
                       ^
Main.java:17: error: ';' expected
System.out.println(A*B)
                       ^
2 errors
Language: C++

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

using namespace std;

int main()
{
	int a,b,c;
	cin >> a >> b;
	vector<int> d;
	d.push_back(a + b);
	d.push_back(a - b);
	d.push_back( a * b );
	cout << max(d[0],d[1],d[2]);

	return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:18:18: error: expected '}' at end of input
   18 |         return 0;
      |                  ^
a.cc:9:1: note: to match this '{'
    9 | {
      | ^
In file included from /usr/include/c++/14/vector:62,
                 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:13:   required from here
   16 |         cout << max(d[0],d[1],d[2]);
      |                 ~~~^~~~~~~~~~~~~~~~
/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;
  cin>>a>>b;
  int t=(a+b);
  int v=(a-b);
  int w=(a*b)
  int z=max(t,v,w);
  cout<<z;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: expected ',' or ';' before 'int'
   11 |   int z=max(t,v,w);
      |   ^~~
a.cc:12:9: error: 'z' was not declared in this scope
   12 |   cout<<z;
      |         ^
Language: C++

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

Compiler output:
a.cc:7:3: error: extended character 　 is not valid in an identifier
    7 |   　ans = std::max(ans, A-B);
      |   ^
a.cc:8:3: error: extended character 　 is not valid in an identifier
    8 |   　std::cout << ans << std::endl;
      |   ^
a.cc: In function 'int main()':
a.cc:7:3: error: '\U00003000ans' was not declared in this scope
    7 |   　ans = std::max(ans, A-B);
      |   ^~~~~
a.cc:8:3: error: '\U00003000std' has not been declared
    8 |   　std::cout << ans << std::endl;
      |   ^~~~~
Language: Java

import java.io.*;
import java.util.*;
public class Main
{
	public static void main(String args[])
	{
		Scanner x=new Scanner(System.in);
    	int a=x.nextInt();
		int b=x.nextInt();
		int c=a+b;
		int d=a-b;
		int e=a*b;
		if(c>=d && c>=e)
		{
			System.out.println(c);
			break;
		}
		if(d>=c && d>=e)
		{
			System.out.println(d);
			break;
		}
		if(e>=d && e>=c)
		{
			System.out.println(e);
			break;
		}
	}
}

Compiler output:
Main.java:16: error: break outside switch or loop
			break;
			^
Main.java:21: error: break outside switch or loop
			break;
			^
Main.java:26: error: break outside switch or loop
			break;
			^
3 errors
Language: C++

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

int main() {
  int A,B;
  cin＞＞A＞＞B;
  cout＜＜max（max（（A-B）,（A＋B））,A*B）＜＜endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin\U0000ff1e\U0000ff1eA\U0000ff1e\U0000ff1eB' was not declared in this scope
    6 |   cin＞＞A＞＞B;
      |   ^~~~~~~~~~~~~
a.cc:7:3: error: 'cout\U0000ff1c\U0000ff1cmax\U0000ff08max\U0000ff08\U0000ff08A' was not declared in this scope
    7 |   cout＜＜max（max（（A-B）,（A＋B））,A*B）＜＜endl;
      |   ^~~~~~~~~~~~~~~~~~~~~
a.cc:7:25: error: 'B\U0000ff09' was not declared in this scope
    7 |   cout＜＜max（max（（A-B）,（A＋B））,A*B）＜＜endl;
      |                         ^~~
a.cc:7:29: error: '\U0000ff08A\U0000ff0bB\U0000ff09\U0000ff09' was not declared in this scope
    7 |   cout＜＜max（max（（A-B）,（A＋B））,A*B）＜＜endl;
      |                             ^~~~~~~~~~
a.cc:7:42: error: 'B\U0000ff09\U0000ff1c\U0000ff1cendl' was not declared in this scope
    7 |   cout＜＜max（max（（A-B）,（A＋B））,A*B）＜＜endl;
      |                                          ^~~~~~~~~~~
Language: C++

#include <iostream>
using namespace std;
int main() {
    int a,b,c;
    cin>>a>>b;
    c=max(a+b,a-b);
    cout<<__max(c,a*b);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: '__max' was not declared in this scope
    7 |     cout<<__max(c,a*b);
      |           ^~~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<stdio.h>
#include<stdlib.h>
#include<string>
#include<vector>
#include<math.h>
#include<stack>
#include<queue>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
const long long mod = 1e9 + 7;

int main(){
  int  a, b;
  cin >> a >> b;
  int  c = a + b;
  int  d = a * b;
  int  e = a - b;
  int f = max(c, d, e);
  cout << f << 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 = int; _Compare = int]':
a.cc:20:14:   required from here
   20 |   int f = max(c, d, e);
      |           ~~~^~~~~~~~~
/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;
	cin>>a>>b;
	int ac[3]=0;
	ac[0]=a-b;
	ac[1]=a+b;
	ac[2]=a*b;
	sort(ac,ac+n);
	cout<<ac[2];
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: array must be initialized with a brace-enclosed initializer
    7 |         int ac[3]=0;
      |                   ^
a.cc:11:20: error: 'n' was not declared in this scope
   11 |         sort(ac,ac+n);
      |                    ^
Language: C++

#include <iostream>

using namespace std;

int main (){
  int A, B;
  
  cin >> A >> B;
  
  if((A+B < A-B)&&(A*B < A-B)) cout << A-B << endl;
  else((A-B < A*B)&&(A+B < A*B)) cout << A*B << endl;
  else cout << A+B << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:33: error: expected ';' before 'cout'
   11 |   else((A-B < A*B)&&(A+B < A*B)) cout << A*B << endl;
      |                                 ^~~~~
      |                                 ;
a.cc:12:3: error: 'else' without a previous 'if'
   12 |   else cout << A+B << endl;
      |   ^~~~
Language: C++

#include <algorithm>
#include <bits/stdc++.h>
#include <cstdlib>  
#include <cmath>
using namespace std;
int max(int x, int y){
  return (x>y ? x : y);
}

int main(){
    int a,b;
    cin >> a >> b;
    vector<int>x(n);
    int ans = max(a+b,a-b);
    ans = max(ans,a*b);
    return ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:18: error: 'n' was not declared in this scope
   13 |     vector<int>x(n);
      |                  ^
Language: C

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

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

Compiler output:
main.c:1:9: 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;
int main(){
	int a,b,c,d,e,max;
	cin>>a>>b;
	c=a+b;
	d=a-b;
	e=a*b;
	max=(c>d?c:d);
	max=(max>e?max:e);
	cout<<max<<endl;
}  

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

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

  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin >> a >> b;
      |     ^~~
a.cc:7:13: error: 'max' was not declared in this scope
    7 |     f = max(max(c,d),e);
      |             ^~~
a.cc:7:9: error: 'max' was not declared in this scope
    7 |     f = max(max(c,d),e);
      |         ^~~
a.cc:8:5: error: 'cout' was not declared in this scope
    8 |     cout << f << endl;
      |     ^~~~
a.cc:8:18: error: 'endl' was not declared in this scope
    8 |     cout << f << endl;
      |                  ^~~~
Language: C

#include<stdio.h>

int max(int a,int,b){
  if(a>=b)return a;
  return b;
}
int main(){
  int a,b;
  scanf("%d %d",&a,&b);
  int keep = max(a+b,a-b);
  printf("%d",max(keep,a*b));
  return 0;
}

Compiler output:
main.c:3:19: error: unknown type name 'b'
    3 | int max(int a,int,b){
      |                   ^
main.c: In function 'main':
main.c:10:14: error: implicit declaration of function 'max' [-Wimplicit-function-declaration]
   10 |   int keep = max(a+b,a-b);
      |              ^~~
Language: C++

#include <iostream>

int main()
{
 	int A=0,B=0,ans=0;
  	
    std::cin >> A >> B;
  
  	ans = std::max(A+B,A*B);
  　ans = std::max(ans, A-B);
  　std::cout << ans << std::endl;
}

Compiler output:
a.cc:10:3: error: extended character 　 is not valid in an identifier
   10 |   　ans = std::max(ans, A-B);
      |   ^
a.cc:11:3: error: extended character 　 is not valid in an identifier
   11 |   　std::cout << ans << std::endl;
      |   ^
a.cc: In function 'int main()':
a.cc:10:3: error: '\U00003000ans' was not declared in this scope
   10 |   　ans = std::max(ans, A-B);
      |   ^~~~~
a.cc:11:3: error: '\U00003000std' has not been declared
   11 |   　std::cout << ans << std::endl;
      |   ^~~~~
Language: C

main = do
  [a,b] <- map (read :: String -> Int) . words <$> getLine
  print $ maximum [a+b, a-b, a*b]

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | main = do
      | ^~~~
main.c:1:1: error: type defaults to 'int' in declaration of 'main' [-Wimplicit-int]
main.c:1:8: error: expected expression before 'do'
    1 | main = do
      |        ^~
Language: C++

#include <iostream>

using namespace std;

int main (){
  int A, B;
  
  cin >> A >> B;
  
  if(A+B < A-B)&&(A*B < A-B) cout << A-B << endl;
  else(A-B < A*B)&&(A+B < A*B) cout << A*B << endl;
  else cout << A+B << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: expected identifier before '(' token
   10 |   if(A+B < A-B)&&(A*B < A-B) cout << A-B << endl;
      |                  ^
a.cc:11:31: error: expected ';' before 'cout'
   11 |   else(A-B < A*B)&&(A+B < A*B) cout << A*B << endl;
      |                               ^~~~~
      |                               ;
a.cc:12:3: error: 'else' without a previous 'if'
   12 |   else cout << A+B << endl;
      |   ^~~~
Language: C

#include <bits/stdc++.h>
using namespace std;
int main()
{
	int a,b;
	cin >> a >> b;
	int n1,n2,n3;
	n1=a+b;
	n2=a-b;
	n3=a*b;
	int max1;
	if(n1>n2)
		max1=n1;
	else
		max1=n2;
	if(n3>max1)
		max1=n3;
	cout << max1 << endl;
	return 0;
}

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

import java.util.Scanner;

public class A {
	
	static Scanner scan = new Scanner(System.in);
	
	public static void main(String[] args) {
		int a = scan.nextInt();
		int b = scan.nextInt();
		
		int n1 = a-b;
		int n2 = a+b;
		int n3 = a*b;
		
		int m = Math.max(n1, n2);
		m = Math.max(m, n3);
		
		System.out.println(m);
	}

}


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

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

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

}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: redeclaration of 'int ans'
    8 |   int ans = max(a+b,a-b,a*b);
      |       ^~~
a.cc:7:7: note: 'int ans' previously declared here
    7 |   int ans = 0;
      |       ^~~
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:16:   required from here
    8 |   int ans = 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<iostream>
#include<vector>
#include<math.h>
#include<string>
#include<algorithm>

typedef long long ll;
typedef unsigned short int unsi;
typedef unsigned int uni;
typedef unsigned long int unli;

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/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:17:13:   required from here
   17 |         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++.h>
using namespace std;


int main()
{
	int a,b;
	cin >> a >> b;
	int maxn = a+b;
	if(a-b>maxn)maxn = a-b;
	if(a*b>maxn)maxn = a*b;
	printf("%d\n",maxn);
	return 0;
} 

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

#include <bits/stdc++.h>
#include <cmath>
#include <numeric>
using namespace std;
using ll=long long;
#define rep(i,a,b) for(int i=(a); i<(b); ++i) // a ≦ i < b 
#define Rrep(i,a,b) for(int i=(a);i>=(b);--i) // reverse repeat. a から b まで減少．
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend() //逆イテレータ
#define RANGE(a,b,c) (a).begin()+b,(a).begin()+c // コンテナ a の 要素 b から c へのイテレータ
// typedef
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef vector<PII> VP;

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

cout << max(a+b, a-b, a*b) << "\n";

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:22:12:   required from here
   22 | cout << max(a+b, a-b, a*b) << "\n";
      |         ~~~^~~~~~~~~~~~~~~
/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;
	cin>>a>>b;
	int a[3]=0;
	a[0]=a-b;
	a[1]=a+b;
	a[2]=a*b;
	sort(a,a+n);
	cout<<a[2];
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: conflicting declaration 'int a [3]'
    7 |         int a[3]=0;
      |             ^
a.cc:5:13: note: previous declaration as 'int a'
    5 |         int a,b;
      |             ^
a.cc:8:10: error: invalid types 'int[int]' for array subscript
    8 |         a[0]=a-b;
      |          ^
a.cc:9:10: error: invalid types 'int[int]' for array subscript
    9 |         a[1]=a+b;
      |          ^
a.cc:10:10: error: invalid types 'int[int]' for array subscript
   10 |         a[2]=a*b;
      |          ^
a.cc:11:18: error: 'n' was not declared in this scope
   11 |         sort(a,a+n);
      |                  ^
a.cc:12:16: error: invalid types 'int[int]' for array subscript
   12 |         cout<<a[2];
      |                ^
Language: C++

use std::io::*;
use std::str::FromStr;

fn parse_line<T: FromStr>() -> T {
    let mut s = String::new();
    stdin().read_line(&mut s).ok();
    s.trim().parse().ok().unwrap()
}

fn parse_pair<T: FromStr, U: FromStr>() -> (T, U) {
    let line = parse_line::<String>();
    let mut iter = line.split_whitespace();
    (
        iter.next().unwrap().parse().ok().unwrap(),
        iter.next().unwrap().parse().ok().unwrap(),
    )
}

fn println<T: ToString>(s: T) {
    println!("{}", s.to_string());
}

// ------------------------------------------------------------------------

use std::cmp::max;

fn main() {
    let (a, b) = parse_pair::<isize, isize>();

     println(max(a * b, max(a + b, a - b)));
}


Compiler output:
a.cc:1:1: error: 'use' does not name a type
    1 | use std::io::*;
      | ^~~
a.cc:2:1: error: 'use' does not name a type
    2 | use std::str::FromStr;
      | ^~~
a.cc:4:1: error: 'fn' does not name a type
    4 | fn parse_line<T: FromStr>() -> T {
      | ^~
a.cc:10:1: error: 'fn' does not name a type
   10 | fn parse_pair<T: FromStr, U: FromStr>() -> (T, U) {
      | ^~
a.cc:19:1: error: 'fn' does not name a type
   19 | fn println<T: ToString>(s: T) {
      | ^~
a.cc:25:1: error: 'use' does not name a type
   25 | use std::cmp::max;
      | ^~~
a.cc:27:1: error: 'fn' does not name a type
   27 | fn main() {
      | ^~
Language: C++

#include <iostream>

int main (){
  int A, B;
  
  cin >> A >> B;
  
  if(A+B < A-B)&&(A*B < A-B) cout << A-B << endl;
  else(A-B < A*B)&&(A+B < A*B) cout << A*B << endl;
  else cout << A+B << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   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:8:18: error: expected identifier before '(' token
    8 |   if(A+B < A-B)&&(A*B < A-B) cout << A-B << endl;
      |                  ^
a.cc:9:31: error: expected ';' before 'cout'
    9 |   else(A-B < A*B)&&(A+B < A*B) cout << A*B << endl;
      |                               ^~~~~
      |                               ;
a.cc:10:3: error: 'else' without a previous 'if'
   10 |   else cout << A+B << endl;
      |   ^~~~
a.cc:10:8: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |   else cout << A+B << 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:10:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |   else cout << A+B << endl;
      |                       ^~~~
      |                       std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{  int a,b,c,d,e,max;
	cin>>a>>b;
	c=a+b;
	d=a-b;
	e=a*b;
	max=*max_element(c,d,e);
	cout<<max;
}	


Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: invalid type argument of unary '*' (have 'int')
   10 |         max=*max_element(c,d,e);
      |             ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:71,
                 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/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::__ops::_Iter_comp_iter<_Compare>::operator()(_Iterator1, _Iterator2) [with _Iterator1 = int; _Iterator2 = int; _Compare = int]':
/usr/include/c++/14/bits/stl_algo.h:5626:12:   required from 'constexpr _ForwardIterator std::__max_element(_ForwardIterator, _ForwardIterator, _Compare) [with _ForwardIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int>]'
 5626 |         if (__comp(__result, __first))
      |             ~~~~~~^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:5677:43:   required from 'constexpr _FIter std::max_element(_FIter, _FIter, _Compare) [with _FIter = int; _Compare = int]'
 5677 |       return _GLIBCXX_STD_A::__max_element(__first, __last,
      |                                           ^
a.cc:10:18:   required from here
   10 |         max=*max_element(c,d,e);
      |              ~~~~~~~~~~~^~~~~~~
/usr/include/c++/14/bits/predefined_ops.h:158:31: error: invalid type argument of unary '*' (have 'int')
  158 |         { return bool(_M_comp(*__it1, *__it2)); }
      |                               ^~~~~~
/usr/include/c++/14/bits/predefined_ops.h:158:39: error: invalid type argument of unary '*' (have 'int')
  158 |         { return bool(_M_comp(*__it1, *__it2)); }
      |                                       ^~~~~~
/usr/include/c++/14/bits/predefined_ops.h:158:30: error: expression cannot be used as a function
  158 |         { return bool(_M_comp(*__it1, *__it2)); }
      |                       ~~~~~~~^~~~~~~~~~~~~~~~
Language: C

#include<bits/stdc++.h>
using namespace std;
int main(){
	int a,b;
	scanf("%d%d",&a,&b);
	int aa=a+b;
	int bb=a-b;
	int cc=a*b;
	int maxn=max(aa,bb);
	maxn=max(maxn,cc);
	printf("%d",maxn);
	return 0;
}

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

#include <bits/stdc++.h>
#include <cmath>
#include <numeric>
using namespace std;
using ll=long long;
#define rep(i,a,b) for(int i=(a); i<(b); ++i) // a ≦ i < b 
#define Rrep(i,a,b) for(int i=(a);i>=(b);--i) // reverse repeat. a から b まで減少．
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend() //逆イテレータ
#define RANGE(a,b,c) (a).begin()+b,(a).begin()+c // コンテナ a の 要素 b から c へのイテレータ
// typedef
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef vector<PII> VP;

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

cout << max((a+b, a-b, a*b) << "\n";

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:29: error: invalid operands of types 'int' and 'const char [2]' to binary 'operator<<'
   22 | cout << max((a+b, a-b, a*b) << "\n";
      |             ~~~~~~~~~~~~~~~ ^~ ~~~~
      |                      |         |
      |                      int       const char [2]
Language: C++

import java.io.PrintWriter
import java.lang.Math

val pw = PrintWriter(System.out)
fun main(args : Array<String>) {
    func()
    pw.flush()
}

fun func() {
    val paras = listOfInt()
    val res = Math.max(paras[0]+paras[1], Math.max(paras[0]-paras[1],paras[0]*paras[1]))
      println(res)
}

// 入力取得
fun next() = readLine()!!
fun nextInt() = next().toInt()
fun nextLong() = next().toLong()
fun nextDouble() = next().toDouble()
fun listOfString() = next().split(" ")
fun listOfInt() =listOfString().map { it.toInt() }
fun listOfLong() =listOfString().map { it.toLong() }
fun listOfDouble() =listOfString().map { it.toDouble() }

fun println(value : Any) {
    pw.println(value)
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.PrintWriter
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:10:1: error: 'fun' does not name a type
   10 | fun func() {
      | ^~~
a.cc:17:1: error: 'fun' does not name a type
   17 | fun next() = readLine()!!
      | ^~~
a.cc:23:1: error: 'fun' does not name a type
   23 | fun listOfLong() =listOfString().map { it.toLong() }
      | ^~~
a.cc:24:1: error: 'fun' does not name a type
   24 | fun listOfDouble() =listOfString().map { it.toDouble() }
      | ^~~
a.cc:26:1: error: 'fun' does not name a type
   26 | fun println(value : Any) {
      | ^~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:32: error: expected ';' before ')' token
    7 |   cout << max(a-b,max(a+b,a*b))) << endl;
      |                                ^
      |                                ;