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

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

int main(){
	int A, B, ans;
	cin >> A >> B;
	ans = max(A+B, A-B, A*B);
	cout << ans << 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:7:11:   required from here
    7 |         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 <bits/stdc++.h> 
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
#define _GLIBCXX_DEBUG
typedef long long ll;
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:10:26: error: 'a\U0000ff0ab' was not declared in this scope
   10 |   cout<<max(max(a+b,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;
    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:16:   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>
using namespace std;
 
int main(){
  int a,b;
  cin >> a >> b;
  cout << max({a+b,a-b,a*b}) <<endl;
}

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}) <<endl;
      |           ~~~^~~~~~~~~~~~~~~
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>
#include <fstream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <bitset>
#include <algorithm>
#include <complex>
#include <array>
#include <iomanip>
using namespace std;

#define REP(i,n) for(int i=0; i<n; ++i)
#define FOR(i,a,b) for(int i=a; i<=b; ++i)
#define FORR(i,a,b) for (int i=a; i>=b; --i)
#define ALL(c) (c).begin(), (c).end()

typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<double> VD;
typedef vector<VI> VVI;
typedef vector<VL> VVL;
typedef vector<VD> VVD;
typedef pair<int,int> P;
typedef pair<ll,ll> PL;
using Graph=vector<vector<int>>;
using edge= struct{int to;ll cost;};


template<class t,class u> void chmax(t&a,u b){if(a<b)a=b;}
template<class t,class u> void chmin(t&a,u b){if(b<a)a=b;}

int main(){
  int a,b;
  cin>>a>>b;
  VI A(3);
  A(0)=a+b;
  A(1)=a-b;
  A(2)=a*b;
  sort(a.begin(),a.end());
  cout<<A[0]<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:44:4: error: no match for call to '(VI {aka std::vector<int>}) (int)'
   44 |   A(0)=a+b;
      |   ~^~~
a.cc:45:4: error: no match for call to '(VI {aka std::vector<int>}) (int)'
   45 |   A(1)=a-b;
      |   ~^~~
a.cc:46:4: error: no match for call to '(VI {aka std::vector<int>}) (int)'
   46 |   A(2)=a*b;
      |   ~^~~
a.cc:47:10: error: request for member 'begin' in 'a', which is of non-class type 'int'
   47 |   sort(a.begin(),a.end());
      |          ^~~~~
a.cc:47:20: error: request for member 'end' in 'a', which is of non-class type 'int'
   47 |   sort(a.begin(),a.end());
      |                    ^~~
Language: C

#include <stdio.h>
#include <windows.h>
int main(void) {

    int a, b;
    int ans1, ans2, ans3, ans4, ans;

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

    ans1 = a + b;
    ans2 = a - b;
    ans3 = a * b;

    ans4 = max(ans1, ans2);
    ans = max(ans4, ans3);

    printf("%d", ans);

    return 0;
}

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

#include <stdio.h>
#include <windows.h>
int main(void){
  
  int a, b;
  int ans1, ans2, ans3, ans;
  
  scanf("%d %d", &a, &b);
  
  ans1 = a + b;
  ans2 = a - b;
  ans3 = a * b;
  
  ans = max(ans1, ans2, ans3);
  
  printf("%d", ans);
  
  return 0;
}

Compiler output:
main.c:2:10: fatal error: windows.h: No such file or directory
    2 | #include <windows.h>
      |          ^~~~~~~~~~~
compilation terminated.
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)<<'\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:6:14:   required from here
    6 |   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<stdio.h>
int main(){
  int a,b;
  scanf("%d%d",&a,&b);
  if (a+b > a-b){
    if(a+b > a*b){
    printf("%d",a+b);
    }
    else printf("%d",a*b);
  }
  else if(a-b > a*b)printf("%d",a-b);
  else if(a-b < a*b)printf("%d",a*b)
}

Compiler output:
main.c: In function 'main':
main.c:12:37: error: expected ';' before '}' token
   12 |   else if(a-b < a*b)printf("%d",a*b)
      |                                     ^
      |                                     ;
   13 | }
      | ~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:4:16: error: expected identifier before '&' token
    4 |   scanf("%d%d".&a,&b);
      |                ^
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <math.h>
#include <bitset>
#include <vector>
#include <queue>
#include <map>
#include <set>

#define i64 int64_t
#define ff(ii,nn,mm) for(int ii=nn;ii<mm;ii++)
#define sort(vvv) sort(vvv.begin(),vvv.end())
#define rvs(vvv) reverse(vvv.begin(),vvv.end())
int inf = 1000000007;

using namespace std;

int main() {
	int a, b;
	cin >> a >> b;
	int x = a + b;
	int y = a - b;
	int z = a * b;
	cout << max(x, y, z) << 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:25:13:   required from here
   25 |         cout << max(x, y, z) << 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;
  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: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 <bits/stdc++.h>
using namespace std;
int maximam(int a;int b;int c){
  if(a>=b&&a>=c) return a;
  else if(b>=a&&b>=c) return b;
  else return c;
}
int main(){
  int A,B;
  cin>>A>>B;
  int x=maximam(A+B,A-B,A*B);
  cout<<x<<endl;
}
  
  

Compiler output:
a.cc:3:18: error: expected ')' before ';' token
    3 | int maximam(int a;int b;int c){
      |            ~     ^
      |                  )
a.cc:3:30: error: expected initializer before ')' token
    3 | int maximam(int a;int b;int c){
      |                              ^
a.cc: In function 'int main()':
a.cc:11:16: error: too many arguments to function 'int maximam(int)'
   11 |   int x=maximam(A+B,A-B,A*B);
      |         ~~~~~~~^~~~~~~~~~~~~
a.cc:3:5: note: declared here
    3 | int maximam(int a;int b;int c){
      |     ^~~~~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:22: error: expected ';' before ':' token
   10 |   cout << ans << endl:
      |                      ^
      |                      ;
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: expected identifier before '<<' token
   10 |   cout << and << endl:
      |               ^~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: expected ',' or ';' before 'int'
    7 |     int h = a-b
      |     ^~~
a.cc:10:8: error: 'k' was not declared in this scope
   10 |     if(k>=s)
      |        ^
a.cc:10:11: error: 's' was not declared in this scope
   10 |     if(k>=s)
      |           ^
Language: C

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


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

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


Compiler output:
main.c: In function 'main':
main.c:5:17: error: expected ';' before 'c'
    5 |   scanf("%d",&B)
      |                 ^
      |                 ;
    6 | 
    7 |   c=A+B;
      |   ~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:6:3: error: 'd' undeclared (first use in this function)
    6 |   d=A-B;
      |   ^
main.c:6:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:3: error: 'e' undeclared (first use in this function)
    7 |   e=A*B;
      |   ^
Language: C++


#include <iostream>
using namespace std;

int main()
{
  int A, B;
  cin >> A >> B;
  const auto plus = A + B;
  const auto minus = A - B;
  const auto times = A*B;
  cout << (plus < minus : (minus < times ? times : minus) : (plus < times ? times : plus));
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:24: error: expected ')' before ':' token
   12 |   cout << (plus < minus : (minus < times ? times : minus) : (plus < times ? times : plus));
      |           ~            ^~
      |                        )
Language: C++


#include <iostream>

int main()
{
  int A, B;
  cin >> A >> B;
  const auto plus = A + B;
  const auto minus = A - B;
  const auto times = A*B;
  cout << (plus < minus : (minus < times ? times : minus) : (plus < times ? times : plus));
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin >> A >> B;
      |   ^~~
      |   std::cin
In file included from a.cc:2:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:11:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |   cout << (plus < minus : (minus < times ? times : minus) : (plus < times ? times : plus));
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:11:24: error: expected ')' before ':' token
   11 |   cout << (plus < minus : (minus < times ? times : minus) : (plus < times ? times : plus));
      |           ~            ^~
      |                        )
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: 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:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 |         cout<<max(A+B,max(A-B,A*B));
      |         ^~~~
      |         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:23: error: 'max' was not declared in this scope; did you mean 'std::max'?
    5 |         cout<<max(A+B,max(A-B,A*B));
      |                       ^~~
      |                       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:15: error: 'max' was not declared in this scope; did you mean 'std::max'?
    5 |         cout<<max(A+B,max(A-B,A*B));
      |               ^~~
      |               std::max
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: 'std::max' declared here
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
Language: C++

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

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

int main() {
  if(a*b > a+b){
    cout << a*b << endl;
  }
  else if (a-b > a+b){
    cout << a+b << endl;
  } 
  else{
    cout << a-b << endl;
  }
}

Compiler output:
a.cc:6:1: error: 'cin' does not name a type
    6 | cin >> a >> b;
      | ^~~
Language: C++

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

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

int main() {
  if(a*b > a+b){
    cout << a*b << endl;
  }
  else if (a-b > a+b){
    cout << a+b << endl;
  } 
  else{
    cout << a-b << endl;
  }
}

Compiler output:
a.cc:5:1: error: 'cin' does not name a type
    5 | cin >> a >> b;
      | ^~~
Language: C++

#include <bits/stdc++.h>

using namespace std;
int a,b;
cin >> a;
cin >> b;

int main() {
  if(a*b > a+b){
    cout << a*b << endl;
  }
  else if (a-b > a+ b){
    cout << a+b << endl;
  } 
  else{
    cout << a-b << endl;
  }
}

Compiler output:
a.cc:5:1: error: 'cin' does not name a type
    5 | cin >> a;
      | ^~~
a.cc:6:1: error: 'cin' does not name a type
    6 | cin >> 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') << endl;
    return 0;
}


Compiler output:
a.cc:9:17: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    9 |     cout << max('A + B', 'A - B', 'A * B') << endl;
      |                 ^~~~~~~
a.cc:9:26: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    9 |     cout << max('A + B', 'A - B', 'A * B') << endl;
      |                          ^~~~~~~
a.cc:9:35: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    9 |     cout << max('A + B', 'A - B', 'A * B') << endl;
      |                                   ^~~~~~~
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 <bits/stdc++.h>
using namespace std;

int main()
{
    int A,B;
    cin >> A >> B;

    cout << max(A,B,A + B, A - B, A * B) << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: no matching function for call to 'max(int&, int&, int, int, int)'
    9 |     cout << max(A,B,A + B, A - B, A * B) << endl;
      |             ~~~^~~~~~~~~~~~~~~~~~~~~~~~~
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: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, 5 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, 5 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 5 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   candidate expects 2 arguments, 5 provided
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: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>
#include <algorighm>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  int arr[] = { a + b, a - b, a * b, };
  cout << *max_element(arr, arr + 3) << endl;
  return 0;
}

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

#include <iostream>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  int arr[] = { a + b, a - b, a * b, };
  cout << *max_element(arr, arr + 3) << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: 'max_element' was not declared in this scope
    7 |   cout << *max_element(arr, arr + 3) << endl;
      |            ^~~~~~~~~~~
Language: C++

#include<stdio.h>
int main()
{
	int d,e,i;
	scanf("%d%d",&d,&e);
	int a=d+e;
	int b=d-e;
	int d=d*e;
	if(a<b){i=a; a=b; b=i;}
	if(b<c){i=b; b=c; c=i;}
	if(a<b){i=a; a=b; b=i;}
	printf("%d\n",a);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: redeclaration of 'int d'
    8 |         int d=d*e;
      |             ^
a.cc:4:13: note: 'int d' previously declared here
    4 |         int d,e,i;
      |             ^
a.cc:10:14: error: 'c' was not declared in this scope
   10 |         if(b<c){i=b; b=c; c=i;}
      |              ^
Language: C++

#include<stdio.h>
int main()
{
	int d,e;
	scanf("%d%d",&d,&e);
	int a=d+e;
	int b=d-e;
	int d=d*e;
	if(a<b){i=a; a=b; b=i;}
	if(b<c){i=b; b=c; c=i;}
	if(a<b){i=a; a=b; b=i;}
	printf("%d\n",a);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: redeclaration of 'int d'
    8 |         int d=d*e;
      |             ^
a.cc:4:13: note: 'int d' previously declared here
    4 |         int d,e;
      |             ^
a.cc:9:17: error: 'i' was not declared in this scope
    9 |         if(a<b){i=a; a=b; b=i;}
      |                 ^
a.cc:10:14: error: 'c' was not declared in this scope
   10 |         if(b<c){i=b; b=c; c=i;}
      |              ^
a.cc:10:17: error: 'i' was not declared in this scope
   10 |         if(b<c){i=b; b=c; c=i;}
      |                 ^
a.cc:11:17: error: 'i' was not declared in this scope
   11 |         if(a<b){i=a; a=b; b=i;}
      |                 ^
Language: C++

#include<stdio.h>
int main()
{
	int d,e;
	scanf("%d%d",&e,&f);
	int a=d+e;
	int b=d-e;
	int d=d*e;
	if(a<b){i=a; a=b; b=i;}
	if(b<c){i=b; b=c; c=i;}
	if(a<b){i=a; a=b; b=i;}
	printf("%d\n",a);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:26: error: 'f' was not declared in this scope
    5 |         scanf("%d%d",&e,&f);
      |                          ^
a.cc:8:13: error: redeclaration of 'int d'
    8 |         int d=d*e;
      |             ^
a.cc:4:13: note: 'int d' previously declared here
    4 |         int d,e;
      |             ^
a.cc:9:17: error: 'i' was not declared in this scope
    9 |         if(a<b){i=a; a=b; b=i;}
      |                 ^
a.cc:10:14: error: 'c' was not declared in this scope
   10 |         if(b<c){i=b; b=c; c=i;}
      |              ^
a.cc:10:17: error: 'i' was not declared in this scope
   10 |         if(b<c){i=b; b=c; c=i;}
      |                 ^
a.cc:11:17: error: 'i' was not declared in this scope
   11 |         if(a<b){i=a; a=b; b=i;}
      |                 ^
Language: C++

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

int main(){
  int a, b;
  vector<int> result(3);
  cin >> a >> b;
  result[0] = a+b;
  result[1] = a-b;
  result[2] = a*b;
  cout << *max_element(result.begin(), result.end()) << endl;
}

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

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using vi = vector<int>;
using vvi = vector<vi>;
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:2:
/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:10:14:   required from here
   10 |   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 <iostream>

using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    8 |   int ans = 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,b;
  cin >> a >> b;
  cout << max({a+b,a-b,a*b}) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    8 |   cout << max({a+b,a-b,a*b}) << endl;
      |           ~~~^~~~~~~~~~~~~~~
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++

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

                              Online C++ Compiler.
               Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.

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

#include <iostream>

using namespace std;

int main()
{
   
  int a,b,c,d,f;

  cin>>a,b;
 c=a+b;
 d=a-b;
 f=a*b;
 if(c>=d&&c>=f)
 {
     cout<<c;
 }
 else if(d>=c&&d>=f)
 {
     cout<<d;
 }
 else
 |{
     cout<<f;
 }
 
  
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:2: error: expected primary-expression before '|' token
   31 |  |{
      |  ^
a.cc:31:3: error: expected primary-expression before '{' token
   31 |  |{
      |   ^
Language: C++

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

                              Online C++ Compiler.
               Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.

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

#include <iostream>

using namespace std;

int main()
{
   
  int a,b,c,d,f;

  cin>>a,b;
 c=a+b;
 d=a-b;
 f=a*b;
 iF(c>=d&&c>=f)
 {
     cout<<c
 }
 else if(d>=c&&d>=f)
 {
     cout<<d;
 }
 else
 |{
     cout<<f;
 }
 
  
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:2: error: 'iF' was not declared in this scope
   22 |  iF(c>=d&&c>=f)
      |  ^~
a.cc:26:2: error: 'else' without a previous 'if'
   26 |  else if(d>=c&&d>=f)
      |  ^~~~
a.cc:31:2: error: expected primary-expression before '|' token
   31 |  |{
      |  ^
a.cc:31:3: error: expected primary-expression before '{' token
   31 |  |{
      |   ^
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <math.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/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:13:16:   required from here
   13 |     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() {
	cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0);
	int a,b; cin >> a >> b;
	cout << max({a+b,a-b,a*b}) << endl;
	

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

#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
int main()
{
  int A,B;
  cin >> A,B,C;
  int sum,sa,mul;
  sum = A+B;
  sa = A-B;
  mul = A*B;
  if(sum >= sa && sum >= mul) cout << sum << endl;
  else if(sa >= mul) cout << sa << endl;
  else cout << mul << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: 'C' was not declared in this scope
   12 |   cin >> A,B,C;
      |              ^
Language: C++

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

int main(){
  int a,b,c,d,e;
  cin >> a >> b;
  c = a + b;
  d = a * b;
  e = a - b;
  cout << max(c,d,e) << 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:10:14:   required from here
   10 |   cout << max(c,d,e) << 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 <stdio.h>
 
int main(void){
 
  int i;
  int a, b, x[3];
  int max, min;
 
  
  scanf("%d", &a);
  scanf("%d", &b);
  
  x[1] = a+b;
  x[2] = a-b;
  x[3] = a*b;
 
  max = min = a[0];
  for(i=1;i<3;++i){
    if( max < a[i] )
      max = a[i];
    if( min > a[i] )
      min = a[i];
  }
 
  /* 最高点と最低点の表示 */
  printf("%d", max);
  printf("%d", min);
 
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:16: error: subscripted value is neither array nor pointer nor vector
   17 |   max = min = a[0];
      |                ^
main.c:19:16: error: subscripted value is neither array nor pointer nor vector
   19 |     if( max < a[i] )
      |                ^
main.c:20:14: error: subscripted value is neither array nor pointer nor vector
   20 |       max = a[i];
      |              ^
main.c:21:16: error: subscripted value is neither array nor pointer nor vector
   21 |     if( min > a[i] )
      |                ^
main.c:22:14: error: subscripted value is neither array nor pointer nor vector
   22 |       min = a[i];
      |              ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:6:8: warning: missing terminating " character
    6 |  scanf("%d,&a,);
      |        ^
main.c:6:8: error: missing terminating " character
    6 |  scanf("%d,&a,);
      |        ^~~~~~~~~
main.c:7:8: warning: missing terminating " character
    7 |  scanf("%d,&a,);
      |        ^
main.c:7:8: error: missing terminating " character
    7 |  scanf("%d,&a,);
      |        ^~~~~~~~~
main.c:9:12: error: expected ')' before ';' token
    9 |   x = a + b;
      |            ^
      |            )
main.c:7:7: note: to match this '('
    7 |  scanf("%d,&a,);
      |       ^
main.c:9:5: error: passing argument 1 of 'scanf' makes pointer from integer without a cast [-Wint-conversion]
    9 |   x = a + b;
      |   ~~^~~~~~~
      |     |
      |     int
In file included from main.c:1:
/usr/include/stdio.h:428:42: note: expected 'const char *' but argument is of type 'int'
  428 | extern int scanf (const char *__restrict __format, ...) __wur;
      |                   ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:23:12: error: expected ')' before '}' token
   23 |   return 0;
      |            ^
      |            )
   24 | }
      | ~           
main.c:6:7: note: to match this '('
    6 |  scanf("%d,&a,);
      |       ^
main.c:7:2: error: passing argument 1 of 'scanf' makes pointer from integer without a cast [-Wint-conversion]
    7 |  scanf("%d,&a,);
      |  ^~~~~~~~~~~~~~~
      |  |
      |  int
    8 | 
      |   
    9 |   x = a + b;
      |   ~~~~~~~~~~
   10 |   y = a - b;
      |   ~~~~~~~~~~
   11 |   z = a * b;
      |   ~~~~~~~~~~
   12 | 
      |   
   13 |   if(x>y)
      |   ~~~~~~~
   14 |    if(x>z)
      |    ~~~~~~~
   15 |      printf("%d", x);
      |      ~~~~~~~~~~~~~~~~
   16 |   if(y>x)
      |   ~~~~~~~
   17 |    if(y>z)
      |    ~~~~~~~
   18 |      printf("%d", y);
      |      ~~~~~~~~~~~~~~~~
   19 |   if(z>x)
      |   ~~~~~~~
   20 |    if(z>y)
      |    ~~~~~~~
   21 |      printf("%d", z);
      |      ~~~~~~~~~~~~~~~~
   22 | 
      |   
   23 |   return 0;
      |   ~~~~~~~~~
   24 | }
      | ~ 
/usr/include/stdio.h:428:42: note: expected 'const char *' but argument is of type 'int'
  428 | extern int scanf (const char *__restrict __format, ...) __wur;
      |                   ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:23:12: error: expected ';' before '}' token
   23 |   return 0;
      |            ^
      |            ;
   24 | }
      | ~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:21:12: error: lvalue required as left operand of assignment
   21 |   if(x=y&&x=z)
      |            ^
Language: C++

#include <iostream>

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:26: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    8 |     std::cout << std::max({A + B, A - B, A * B}) << std::endl;
      |                  ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
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,b;
   cin >> a >> b;
   int ans = a+b;
   ans = max(ans, a-b);
   ans = max(ans, a*b)
   cout << ans << endl;
   return 0;
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:10:23: error: expected ';' before 'cout'
   10 |    ans = max(ans, a*b)
      |                       ^
      |                       ;
   11 |    cout << ans << endl;
      |    ~~~~
Language: C++

#include<iostream>

 using namespace std;

 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:8:13: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    8 |  cout << max({a + b, a - b, a * b}) << endl;
      |          ~~~^~~~~~~~~~~~~~~~~~~~~~~
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,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:10:12: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
   10 | cout << max({a+b,a-b,a+b}) << endl;
      |         ~~~^~~~~~~~~~~~~~~
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,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:11:12: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
   11 | cout << max({a+b,a-b,a+b}) << endl;
      |         ~~~^~~~~~~~~~~~~~~
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.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:8:6: error: expected initializer before '.' token
    8 | int a.b;
      |      ^
a.cc:9:8: error: 'a' was not declared in this scope
    9 | cin >> a >> b;
      |        ^
a.cc:9:13: error: 'b' was not declared in this scope
    9 | cin >> a >> b;
      |             ^
a.cc:11:12: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
   11 | cout << max({a+b,a-b,a+b}) << endl;
      |         ~~~^~~~~~~~~~~~~~~
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.b;
cin >> a >> b;

d = (a+b);
e = (a-b);
f = (a*b);
cout << d,e,f << endl;

return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:6: error: expected initializer before '.' token
    8 | int a.b;
      |      ^
a.cc:9:8: error: 'a' was not declared in this scope
    9 | cin >> a >> b;
      |        ^
a.cc:9:13: error: 'b' was not declared in this scope
    9 | cin >> a >> b;
      |             ^
a.cc:11:1: error: 'd' was not declared in this scope
   11 | d = (a+b);
      | ^
a.cc:12:1: error: 'e' was not declared in this scope
   12 | e = (a-b);
      | ^
a.cc:13:1: error: 'f' was not declared in this scope
   13 | f = (a*b);
      | ^
Language: C++

#include <bits/stdc++.h>

using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define sz(x) int(x.size())

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:12:16:   required from here
   12 |     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.*;
class Main
{
	public static void main(String args[])
	{
		Scanner sc=new Scanner(System.in);
		int a=sc.nextInt();
		int b=sc.nextInt();
		
		int plus=a+b;
		int minus=a-b;
		int z=a*b;
		
		int max=Math.max(Math.max(plus,minus),z)
			
		System.out.println(max);
	}
}

Compiler output:
Main.java:14: error: ';' expected
		int max=Math.max(Math.max(plus,minus),z)
		                                        ^
1 error