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

#include <iostream>
using namespace std;

int main(void){
    int A, B;
    scanf("%d %d", &A, &B);
    
    // implements & output
    printf("%d\n", max(A*B, A-B, A+B));
}

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:9:23:   required from here
    9 |     printf("%d\n", 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 <string>
#include <vector>
using namespace std;

int a,b;

int main(){

    cin >> a >> b;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:16: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
   12 |     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<bits/stdc++.h>
using namespace std;
int main(){
  int x,y;]
    cin>>x>>y;
  cout<<max({x+y,x-y,x*y})<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:11: error: expected primary-expression before ']' token
    4 |   int x,y;]
      |           ^
Language: C++

#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <queue>
#include <string>
#include <set>
#include <map>
#define REP(i,n) for(ll i = 0; i < (ll)n; i++)
#define INF 1000000000000000
using namespace std;
typedef long long ll;
typedef double db;
typedef string str;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:20:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
   20 |   ans = max(a+b,max(a-b,a*b)) << endl;
      |   ^~~
      |   abs
a.cc:20:31: error: invalid operands of types 'const long long int' and '<unresolved overloaded function type>' to binary 'operator<<'
   20 |   ans = max(a+b,max(a-b,a*b)) << endl;
      |         ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
Language: C++

#include <iostream>
using namespace std;
int a, s;
  
 main()
{
  int j = 0;
  j = max({a + s, a - s, a * s});
  cin >> a >> s ;
  cout << j << endl;

}


Compiler output:
a.cc:5:2: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    5 |  main()
      |  ^~~~
a.cc: In function 'int main()':
a.cc:8:10: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    8 |   j = max({a + s, a - s, a * s});
      |       ~~~^~~~~~~~~~~~~~~~~~~~~~~
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 a, s;
  
 main()
{
  cin >> a >> s ;
  cout << max({a + s, a - s, a * s}) << endl;

}


Compiler output:
a.cc:5:2: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    5 |  main()
      |  ^~~~
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 + s, a - s, a * s}) << 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>

int main() {
    int A, 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:7:26: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    7 |     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 "bits/stdc++.h"

#define REP(i,n) for(ll i=0;i<ll(n);++i)
#define RREP(i,n) for(ll i=ll(n)-1;i>=0;--i)
#define FOR(i,m,n) for(ll i=m;i<ll(n);++i)
#define RFOR(i,m,n) for(ll i=ll(n)-1;i>=ll(m);--i)
#define ALL(v) (v).begin(),(v).end()
#define UNIQUE(v) v.erase(unique(ALL(v)),v.end());
#define INF 1000000001ll
#define MOD 1000000007ll
#define EPS 1e-9

const int dx[8] = { 1,1,0,-1,-1,-1,0,1 };
const int dy[8] = { 0,1,1,1,0,-1,-1,-1 };


using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vi> vvi;
typedef vector<vl> vvl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	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:31:44: error: expected ';' before ')' token
   31 |         cout << max(a + b, max(a - b, a*b))) << endl;
      |                                            ^
      |                                            ;
Language: C++

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

int main(){
    int a,b,ans=0,tmp[3]={};
    scanf("%d %d",&a,&b);
    
   tmp[0]=a+b;
   tmp[1]=a-b;
   tmp[2]=a*b;
   
    ans=tmp[i];
   for(int i=0;i<2;i++){
       if(tmp[i]<tmp[i+1])
       ans=tmp[i+1];
   }
   printf("%d\n",ans);
}
 

Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: 'i' was not declared in this scope
   12 |     ans=tmp[i];
      |             ^
Language: C++

#include <iostream>

using namespace std;

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(NULL);
    
    int A, B;
    cin >> A >> B;
    cout << std::max({A + B, A - B, A * B}) << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
   12 |     cout << std::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 <bits/stdc++.h>
#define FOR(i, begin, end) for(int i=(begin);i<(end);i++)
#define REP(i, n) FOR(i,0,n)
#define int long long
using namespace std;

typedef pair<int, int> Pii;

void readline(int N, vector<int> &a){
    string s;
    for(int i = 0; i < N - 1; i++){
        getline(cin, s, ' ');
        a[i] = atoi(s.c_str());
    }
    getline(cin, s, '\n');
    a[N - 1] = atoi(s.c_str());
}
void readline(int N, vector<double> &a){
    string s;
    for(int i = 0; i < N - 1; i++){
        getline(cin, s, ' ');
        a[i] = atof(s.c_str());
    }
    getline(cin, s, '\n');
    a[N - 1] = atof(s.c_str());
}

signed main(){

    int N;
    string S;
    cin >> N;
    cin >> S;

    int ans = 0;

    FOR(i, 1, N){
        string S1 = S.substr(0, i);
        string S2 = S.substr(i, N);
        int ans_tmp = 0;
        
        REP(i, 26){
            if(S1.find((char)('a' + j)) != string::npos && S2.find((char)('a' + j))) ans_tmp++;
        }

        if(ans_tmp > ans) ans = ans_tmp;
    }

    cout << ans;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:43:37: error: 'j' was not declared in this scope
   43 |             if(S1.find((char)('a' + j)) != string::npos && S2.find((char)('a' + j))) ans_tmp++;
      |                                     ^
Language: C++

#include <iostream>
#include <algorithm>

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

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

#include <iostream>
#include <algorithm>

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

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

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

Compiler output:
main.c: In function 'main':
main.c:6:18: error: implicit declaration of function 'max'; did you mean 'fmax'? [-Wimplicit-function-declaration]
    6 |   printf("%d\n", max(a + b, max(a - b, a * b)));
      |                  ^~~
      |                  fmax
Language: C++

#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(n);i++)
const int MOD=(int)1e9+7;
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:44: error: statement cannot resolve address of overloaded function
    8 |     cout << max({ a + b,a - b,a * b}); endl;
      |                                            ^
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main()
{
	int n;
	cin>>n;
	string a;
	cin>>a;
	int se[n],sw[n];
	for(int i=0;i<n;i++){
		se[i]=0;
		sw[i]=0;
	}
	if(s[0]=='E')
		se[0]=1;
	else
		sw[0]=1;
	for(int i=0;i<n;i++)
		if(s[i]=='E'){
			se[i]=se[i-1]+1;
			sw[i]=sw[i-1];
		}
		else{
			se[i]=se[i-1];
			sw[i]=sw[i-1]+1;
		}
	int minv=300005;
	for(int i=0;i<n;i++){
		int sum=0;
		if(i==0)
			sum=se[n-1]-se[i];
		else if(i==n-1)
			sum=sw[n-2];
		else
			sum=sw[i-1]+(se[n-1]-se[i]);
		minv=min(minv,sum);
	}
	cout<<minv<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:12: error: 's' was not declared in this scope; did you mean 'sw'?
   15 |         if(s[0]=='E')
      |            ^
      |            sw
a.cc:20:20: error: 's' was not declared in this scope
   20 |                 if(s[i]=='E'){
      |                    ^
Language: C

#include<stdio.h>

int main(void){
    int a,b, add, sub, mul;
    scanf("%d %d",&a, &b);
    int add = a + b;
    int sub = a - b;
    int mul = a * b;

    int max = add;
    if(sub > max){
        max = sub;
    }
    if(mul > max){
        max = mul;
    }
    printf("%d",max);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:9: error: redeclaration of 'add' with no linkage
    6 |     int add = a + b;
      |         ^~~
main.c:4:14: note: previous declaration of 'add' with type 'int'
    4 |     int a,b, add, sub, mul;
      |              ^~~
main.c:7:9: error: redeclaration of 'sub' with no linkage
    7 |     int sub = a - b;
      |         ^~~
main.c:4:19: note: previous declaration of 'sub' with type 'int'
    4 |     int a,b, add, sub, mul;
      |                   ^~~
main.c:8:9: error: redeclaration of 'mul' with no linkage
    8 |     int mul = a * b;
      |         ^~~
main.c:4:24: note: previous declaration of 'mul' with type 'int'
    4 |     int a,b, add, sub, mul;
      |                        ^~~
Language: C++

#include <stdio.h>
int main(void){
	int a, b;

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

	int max = a + b;
//    char cal[] = "add";

	if( a - b > max ){
		max = a - b;
 //       char cal[] = "add";	}
	if( a * b > max ){
		max = a * b;
//        char cal[] = "add";
	}
    printf("%d", max);
//	printf("type:%s %d\n",cal ,max);
	return 0;
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: expected ')' before ';' token
   10 | int maxi=max((a1;a2);a3);
      |              ~  ^
      |                 )
a.cc:10:17: error: expected ')' before ';' token
   10 | int maxi=max((a1;a2);a3);
      |             ~   ^
      |                 )
a.cc:10:20: error: expected ';' before ')' token
   10 | int maxi=max((a1;a2);a3);
      |                    ^
      |                    ;
a.cc:10:24: error: expected ';' before ')' token
   10 | int maxi=max((a1;a2);a3);
      |                        ^
      |                        ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
int a,b;
cin>>a>>b;
int a1=a+b;
int a2=a-b;
int a3=a^b;
int maxi=max((a1;a2);a3);
cout<<maxi;
retrun 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: expected ')' before ';' token
   10 | int maxi=max((a1;a2);a3);
      |              ~  ^
      |                 )
a.cc:10:17: error: expected ')' before ';' token
   10 | int maxi=max((a1;a2);a3);
      |             ~   ^
      |                 )
a.cc:10:20: error: expected ';' before ')' token
   10 | int maxi=max((a1;a2);a3);
      |                    ^
      |                    ;
a.cc:10:24: error: expected ';' before ')' token
   10 | int maxi=max((a1;a2);a3);
      |                        ^
      |                        ;
a.cc:12:1: error: 'retrun' was not declared in this scope
   12 | retrun 0;
      | ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
int a,b;
cin>>a>>b;
int a1=a+b;
int a2=a-b;
int a3=a^b;
int maxi=max((a1;a2)a3);
cout<<maxi;
retrun 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: expected ')' before ';' token
   10 | int maxi=max((a1;a2)a3);
      |              ~  ^
      |                 )
a.cc:10:17: error: expected ')' before ';' token
   10 | int maxi=max((a1;a2)a3);
      |             ~   ^
      |                 )
a.cc:10:20: error: expected ';' before ')' token
   10 | int maxi=max((a1;a2)a3);
      |                    ^
      |                    ;
a.cc:12:1: error: 'retrun' was not declared in this scope
   12 | retrun 0;
      | ^~~~~~
Language: C

#include <stdio.h>

int main(void)
{
int A, B, C;
scanf("%d %d", &A &B);

C = A + B;
if (C < A - B)
	C = A - B;
if (C = A * B)
	C = A * B;
printf("%d", C);
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:19: error: invalid operands to binary & (have 'int *' and 'int')
    6 | scanf("%d %d", &A &B);
      |                ~~ ^
      |                |
      |                int *
Language: C

#include <stdio.h>

int main(void)
{
	int A, B, C;
	scanf("%d %d", &A &B);

	C = A + B;
	if (C < A - B)
		C = A - B;
	else if (C = A * B)
		C = A * B;
	printf("%d", C);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:27: error: invalid operands to binary & (have 'int *' and 'int')
    6 |         scanf("%d %d", &A &B);
      |                        ~~ ^
      |                        |
      |                        int *
Language: C

#include <stdio.h>

int main(void)
{
	int A, B, C;
	scanf("%d %d", &A,&B);

	int C = A + B;
	if (C < A - B)
		C = A - B;
	else if (C = A * B)
		C = A * B;
	printf("%d", C);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:13: error: redeclaration of 'C' with no linkage
    8 |         int C = A + B;
      |             ^
main.c:5:19: note: previous declaration of 'C' with type 'int'
    5 |         int A, B, C;
      |                   ^
Language: C

#include <stdio.h>

int main(void)
{
	int A, B, C;
	scanf("%d %d", &A &B);

	int C = A + B;
	if (C < A - B)
		int C = A - B;
	else if (C = A * B)
		int C = A * B;
	printf("%d", C);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:27: error: invalid operands to binary & (have 'int *' and 'int')
    6 |         scanf("%d %d", &A &B);
      |                        ~~ ^
      |                        |
      |                        int *
main.c:8:13: error: redeclaration of 'C' with no linkage
    8 |         int C = A + B;
      |             ^
main.c:5:19: note: previous declaration of 'C' with type 'int'
    5 |         int A, B, C;
      |                   ^
main.c:10:17: error: expected expression before 'int'
   10 |                 int C = A - B;
      |                 ^~~
main.c:12:17: error: expected expression before 'int'
   12 |                 int C = A * B;
      |                 ^~~
Language: C

#include <stdio.h>

int main(void)
{
	int A, B, C;
	scanf("%d %d",&A &B);
	int C = A + B;

	if (C < A - B)
		int C = A - B;
	if (C < A*B)
		int C = A * B;
		
	printf("%d", C);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:26: error: invalid operands to binary & (have 'int *' and 'int')
    6 |         scanf("%d %d",&A &B);
      |                       ~~ ^
      |                       |
      |                       int *
main.c:7:13: error: redeclaration of 'C' with no linkage
    7 |         int C = A + B;
      |             ^
main.c:5:19: note: previous declaration of 'C' with type 'int'
    5 |         int A, B, C;
      |                   ^
main.c:10:17: error: expected expression before 'int'
   10 |                 int C = A - B;
      |                 ^~~
main.c:12:17: error: expected expression before 'int'
   12 |                 int C = A * B;
      |                 ^~~
Language: C

#include <stdio.h>

int main(void)
{
	int A, B, C;
	scanf("%d %d",&A &B);
	int C = A + B

		if (C < A - B)
			int C = A - B
			if (C < A*B)
				int C = A * B

				printf("%d", C);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:26: error: invalid operands to binary & (have 'int *' and 'int')
    6 |         scanf("%d %d",&A &B);
      |                       ~~ ^
      |                       |
      |                       int *
main.c:7:13: error: redeclaration of 'C' with no linkage
    7 |         int C = A + B
      |             ^
main.c:5:19: note: previous declaration of 'C' with type 'int'
    5 |         int A, B, C;
      |                   ^
main.c:9:17: error: expected ',' or ';' before 'if'
    9 |                 if (C < A - B)
      |                 ^~
Language: C

#include <stdio.h>

int main(void)
{
	int A, B, a, b, c;
	scanf("%d %d", &A &B);
	int a = A + B;
	int	b = A - B;
	int c = A * B;

	if (a>b&&a>c)
		printf("%d", a);
	else if (b>a&&b>c)
		printf("%d", b);
	else
		printf("%d", c);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:27: error: invalid operands to binary & (have 'int *' and 'int')
    6 |         scanf("%d %d", &A &B);
      |                        ~~ ^
      |                        |
      |                        int *
main.c:7:13: error: redeclaration of 'a' with no linkage
    7 |         int a = A + B;
      |             ^
main.c:5:19: note: previous declaration of 'a' with type 'int'
    5 |         int A, B, a, b, c;
      |                   ^
main.c:8:17: error: redeclaration of 'b' with no linkage
    8 |         int     b = A - B;
      |                 ^
main.c:5:22: note: previous declaration of 'b' with type 'int'
    5 |         int A, B, a, b, c;
      |                      ^
main.c:9:13: error: redeclaration of 'c' with no linkage
    9 |         int c = A * B;
      |             ^
main.c:5:25: note: previous declaration of 'c' with type 'int'
    5 |         int A, B, a, b, c;
      |                         ^
Language: C

#include <stdio.h>

int main(void)
{
	int a, b,c;
	scanf("%d %d", &A &B);
	int a = A + B;
	int	b = A - B;
	int c = A * B;

	if (a > b, c)
		printf("%d", a);
	else if (b > a, c)
		printf("%d", b);
	else
		printf("%d", c);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:25: error: 'A' undeclared (first use in this function)
    6 |         scanf("%d %d", &A &B);
      |                         ^
main.c:6:25: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:28: error: 'B' undeclared (first use in this function)
    6 |         scanf("%d %d", &A &B);
      |                            ^
main.c:7:13: error: redeclaration of 'a' with no linkage
    7 |         int a = A + B;
      |             ^
main.c:5:13: note: previous declaration of 'a' with type 'int'
    5 |         int a, b,c;
      |             ^
main.c:8:17: error: redeclaration of 'b' with no linkage
    8 |         int     b = A - B;
      |                 ^
main.c:5:16: note: previous declaration of 'b' with type 'int'
    5 |         int a, b,c;
      |                ^
main.c:9:13: error: redeclaration of 'c' with no linkage
    9 |         int c = A * B;
      |             ^
main.c:5:18: note: previous declaration of 'c' with type 'int'
    5 |         int a, b,c;
      |                  ^
Language: Java

#include<bits/stdc++.h>
using namespace std;
int main()
{

    int A[5],a,b;
    cin>>a>>b;
    int op1 = a+b;
    int op2 = a-b;
    int op3 = a*b;
    A[0]=op1;
    A[1]=op2;
    A[2]=op3;
    sort(A,A+3);
    cout<<A[2]<<endl;
}


Compiler output:
Main.java:1: error: illegal character: '#'
#include<bits/stdc++.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include<bits/stdc++.h>
        ^
Main.java:6: error: not a statement
    int A[5],a,b;
             ^
Main.java:6: error: not a statement
    int A[5],a,b;
               ^
Main.java:7: error: not a statement
    cin>>a>>b;
          ^
Main.java:15: error: not a statement
    cout<<A[2]<<endl;
              ^
Main.java:3: error: unnamed classes are a preview feature and are disabled by default.
int main()
^
  (use --enable-preview to enable unnamed classes)
Main.java:6: error: ']' expected
    int A[5],a,b;
          ^
Main.java:6: error: ';' expected
    int A[5],a,b;
              ^
9 errors
Language: Java




import static sun.swing.MenuItemLayoutHelper.max;

public class TestIface2 {
    public static void main(String[] args) {
        int a,b,c;
        a=5;
        b=6;
        c=10;
        int ans = max(a,b,c);
        System.out.println(ans);
        
    }
}


Compiler output:
Main.java:6: error: class TestIface2 is public, should be declared in a file named TestIface2.java
public class TestIface2 {
       ^
Main.java:4: error: package sun.swing is not visible
import static sun.swing.MenuItemLayoutHelper.max;
                 ^
  (package sun.swing is declared in module java.desktop, which does not export it to the unnamed module)
Main.java:4: error: static import only from classes and interfaces
import static sun.swing.MenuItemLayoutHelper.max;
^
Main.java:12: error: cannot find symbol
        int ans = max(a,b,c);
                  ^
  symbol:   method max(int,int,int)
  location: class TestIface2
4 errors
Language: C++

#include<iostream>
using namespace std;
int main(){
	int a,b{
	cin>>a>>b;
	if(a+b>a-b&&a+b>a*b&&a+b>a%b){cout<<a+b<<endl;}
	else if(a-b>a+b&&a-b>a*b&&a-b>a%b){cout<<a-b<<endl;}
	else if(a*b>a+b&&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:5:18: error: expected '}' before ';' token
    5 |         cin>>a>>b;
      |                  ^
a.cc:4:16: note: to match this '{'
    4 |         int a,b{
      |                ^
a.cc:5:15: error: invalid user-defined conversion from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'int' [-fpermissive]
    5 |         cin>>a>>b;
      |         ~~~~~~^~~
In file included from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_ios.h:121:16: note: candidate is: 'std::basic_ios<_CharT, _Traits>::operator bool() const [with _CharT = char; _Traits = std::char_traits<char>]' (near match)
  121 |       explicit operator bool() const
      |                ^~~~~~~~
/usr/include/c++/14/bits/basic_ios.h:121:16: note:   return type 'bool' of explicit conversion function cannot be converted to 'int' with a qualification conversion
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: expected ';' before 'if'
    6 |   c=a+b
      |        ^
      |        ;
    7 |   if(c<a*b)c=a*b;
      |   ~~
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 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:
a.cc: In function 'int main()':
a.cc:21:18: error: expected '}' at end of input
   21 |         return 0;
      |                  ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

#include<stdio.h>
int main(void)
{
    int A, B, T, H, K, D;
    scanf("%d%d", &A, &B);

    T = A + B;
    H = A - B;
    K = A * B;

    if(T >= H) && (T >= K)
      D = T;
    else if(H >= T) && (H >= K)
      D = H;
    else if(K >= T) && (K >= H)
      D = K;
    printf("%d\n", D);
    return 0;


Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: expected identifier before '(' token
   11 |     if(T >= H) && (T >= K)
      |                   ^
a.cc:13:24: error: expected identifier before '(' token
   13 |     else if(H >= T) && (H >= K)
      |                        ^
a.cc:15:24: error: expected identifier before '(' token
   15 |     else if(K >= T) && (K >= H)
      |                        ^
a.cc:18:14: error: expected '}' at end of input
   18 |     return 0;
      |              ^
a.cc:3:1: note: to match this '{'
    3 | {
      | ^
Language: C

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



Compiler output:
main.c: In function 'main':
main.c:5:24: error: expected ';' before 'if'
    5 |     scanf("%d%d",&a,&b)
      |                        ^
      |                        ;
    6 |     if (a-b>=a+b && a-b>=a*b)
      |     ~~                  
main.c:8:5: error: 'else' without a previous 'if'
    8 |     else if (a+b>=a-b && a+b>=a*b)
      |     ^~~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:18:24: error: expected ';' before '}' token
   18 |        printf("%d", C3)
      |                        ^
      |                        ;
   19 |     }
      |     ~
Language: C

#include <stdio.h>
 
int main(void)
{
   int a,b,ans;
   int ad=a+b,sb=a-b;ml=a*b;

   scanf("%d%d",&a,&b);
 
   if((ad>sb)&&(ad>ml))
      ans=ad;
   else if((ml>ad)&&(ml>ad))
      ans=ml;
   else 
      ans=sb;

   printf("%d",ans);

   return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:22: error: 'ml' undeclared (first use in this function)
    6 |    int ad=a+b,sb=a-b;ml=a*b;
      |                      ^~
main.c:6:22: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int a,b;
    cin >> a >> b ;
    if(a+b >= a*b)
    {
        if(a+b >= a-b)
        cout <<  a+b << endl;
        return 0;
    }
    if(a*b >= a+b)
    {
        if(a*b >= a-b)
        cout <<  a*b << endl;
        return 0;
    }
    if(a-b >= a+b)
    {
        if(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

 int a,b;
    scanf("%d %d",&a,&b);
   if(a+b>a-b && a+b>a*b)
    {
        printf("the among them is %d",a+b);
    }
    else if(a-b>a+b && a-b>a*b)
    {
        printf("the among them is %d",a-b);
    }
    else if(a*b>a+b && a*b>a-b)
    {
        printf("the among them is %d",a*b);
    }
    return 0;

}


Compiler output:
main.c:2:11: error: expected declaration specifiers or '...' before string constant
    2 |     scanf("%d %d",&a,&b);
      |           ^~~~~~~
main.c:2:19: error: expected declaration specifiers or '...' before '&' token
    2 |     scanf("%d %d",&a,&b);
      |                   ^
main.c:2:22: error: expected declaration specifiers or '...' before '&' token
    2 |     scanf("%d %d",&a,&b);
      |                      ^
main.c:3:4: error: expected identifier or '(' before 'if'
    3 |    if(a+b>a-b && a+b>a*b)
      |    ^~
main.c:7:5: error: expected identifier or '(' before 'else'
    7 |     else if(a-b>a+b && a-b>a*b)
      |     ^~~~
main.c:11:5: error: expected identifier or '(' before 'else'
   11 |     else if(a*b>a+b && a*b>a-b)
      |     ^~~~
main.c:15:5: error: expected identifier or '(' before 'return'
   15 |     return 0;
      |     ^~~~~~
main.c:17:1: error: expected identifier or '(' before '}' token
   17 | }
      | ^
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main(){
   int A,B;
   cin >> A>>B;
   int wa,sa,seki;
   wa = A+B;
   sa = A-B;
   seki = A*B;
   //int wasa = max(wa,sa);
   cout << max(wa,sa,seki) << 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:12:15:   required from here
   12 |    cout << max(wa,sa,seki) << 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 c=a+b;
 c=max(c,a-b);
c=max(c,a*b);
cout<<c<<endl;



Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: expected '}' at end of input
    9 | cout<<c<<endl;
      |               ^
a.cc:4:1: note: to match this '{'
    4 | { int a,b;
      | ^
Language: C++

#include "bits/stdc++.h"
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rrep(i,n) for(int i = 1; i <= (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define all(s) s.begin(), s.end()
using namespace std;
typedef long long int ll;
typedef pair<int,int> p;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<p> vp;
const int mx = 100005, inf = 1001001001;
const ll linf = 1e18;
const double eps = 1e-10;
const int div = 1e9+7;

int a, b;


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

    return 0;

}

Compiler output:
a.cc:20:11: error: 'const int div' redeclared as different kind of entity
   20 | const int div = 1e9+7;
      |           ^~~
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42,
                 from a.cc:1:
/usr/include/stdlib.h:992:14: note: previous declaration 'div_t div(int, int)'
  992 | extern div_t div (int __numer, int __denom)
      |              ^~~
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: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 <cstdio>
#include <algorithm>
#include <vector>
using namespace std;

int main()
{
	int a, b;
	vector<int>A(3);
	A.push_back(a - b), A.push_back(a + b),A.push_back(a*b);
	sort(A.begin(), A.end());
	printf("%d %d",A[2])
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:29: error: expected ';' before 'return'
   12 |         printf("%d %d",A[2])
      |                             ^
      |                             ;
   13 |         return 0;
      |         ~~~~~~
Language: C++

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

int a,b;

int main(){
    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:9:14:   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: Java

	public static void Main(String[] args) {
		@SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in);
 
		// 人数Nの入力
        int N = sc.nextInt();
 
        // 文字列Sの入力
        String S = sc.next();
 
        // ループ
        int min = N;
 
        for (int i = 0; i < S.length(); i++)
        {
            int tmp = 0; // 振り向く人数
 
            // リーダーで列を分ける
            String left = S.substring(0, i);
            String right = S.substring(i + 1);
 
            // leftに含まれるWの数
            tmp += left.length() - left.replace("W", "").length();
 
            // rightに含まれるEの数
            tmp += right.length() - right.replace("E", "").length();
 
            // 最小値の更新
            if (tmp <= min)
            {
                min = tmp;
            }
        }
 
        // 出力
        System.out.println(min);
 
	}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
	public static void Main(String[] args) {
	              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

import java.util.Scanner;

public class C_Attention {

	public static void Main(String[] args) {
		@SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in);

		// 人数Nの入力
        int N = sc.nextInt();

        // 文字列Sの入力
        String S = sc.next();

        // ループ
        int min = N;

        for (int i = 0; i < S.length(); i++)
        {
            int tmp = 0; // 振り向く人数

            // リーダーで列を分ける
            String left = S.substring(0, i);
            String right = S.substring(i + 1);

            // leftに含まれるWの数
            tmp += left.length() - left.replace("W", "").length();

            // rightに含まれるEの数
            tmp += right.length() - right.replace("E", "").length();

            // 最小値の更新
            if (tmp <= min)
            {
                min = tmp;
            }
        }

        // 出力
        System.out.println(min);

	}

}


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

import java.util.Scanner;

public class C_Attention {

	public static void main(String[] args) {
		@SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in);

		// 人数Nの入力
        int N = sc.nextInt();

        // 文字列Sの入力
        String S = sc.next();

        // ループ
        int min = N;

        for (int i = 0; i < S.length(); i++)
        {
            int tmp = 0; // 振り向く人数

            // リーダーで列を分ける
            String left = S.substring(0, i);
            String right = S.substring(i + 1);

            // leftに含まれるWの数
            tmp += left.length() - left.replace("W", "").length();

            // rightに含まれるEの数
            tmp += right.length() - right.replace("E", "").length();

            // 最小値の更新
            if (tmp <= min)
            {
                min = tmp;
            }
        }

        // 出力
        System.out.println(min);

	}

}


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

#include<iostream>
using namespace std;
int main(){
  int A,B;cin>>A>>B;
  int ans[3]={A+B,A-B,A*B};
  cout<<max(ans)<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: no matching function for call to 'max(int [3])'
    6 |   cout<<max(ans)<<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[3]={A+B,A-B,A*B}
  cout<<max(ans)<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected ',' or ';' before 'cout'
    6 |   cout<<max(ans)<<endl;
      |   ^~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
    int A, B;
    int a,b,c;
    int max = INT_MIN;

    cin >> A >> B ;

    a = A + B;
    b = A - B;
    c = A * B;

    max = a;
    if(b > max){
        max = b;
    }
    if(c > max){
        max = c;
    }
    cout << max; 

}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: 'INT_MIN' was not declared in this scope
    7 |     int max = INT_MIN;
      |               ^~~~~~~
a.cc:2:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    1 | #include<iostream>
  +++ |+#include <climits>
    2 | using namespace std;
Language: C

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

    int A, B;
    scanf("%d",A );
    scanf("%d",B );

    int a = A+B
    int b = A-B
    int c = A*B

    if ((a<=b) &&(c<=b)){
        printf("%d\n",b);
    }else if ((b<=a) && (c<=a)) {
        printf("%d\n",a);
    }else{
        printf("%d\n",c);
    }

    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:5: error: expected ',' or ';' before 'int'
    9 |     int b = A-B
      |     ^~~
main.c:14:6: error: 'else' without a previous 'if'
   14 |     }else if ((b<=a) && (c<=a)) {
      |      ^~~~
main.c:14:16: error: 'b' undeclared (first use in this function)
   14 |     }else if ((b<=a) && (c<=a)) {
      |                ^
main.c:14:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:26: error: 'c' undeclared (first use in this function)
   14 |     }else if ((b<=a) && (c<=a)) {
      |                          ^
Language: C

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

    int A, B;
    scanf("%s",A );
    scanf("%s",B );

    int a = A+B
    int b = A-B
    int c = A*B

    if ((a<=b) &&(c<=b)){
        printf("%d\n",b);
    }else if ((b<=a) && (c<=a)) {
        printf("%d\n",a);
    }else{
        printf("%d\n",c);
    }

    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:5: error: expected ',' or ';' before 'int'
    9 |     int b = A-B
      |     ^~~
main.c:14:6: error: 'else' without a previous 'if'
   14 |     }else if ((b<=a) && (c<=a)) {
      |      ^~~~
main.c:14:16: error: 'b' undeclared (first use in this function)
   14 |     }else if ((b<=a) && (c<=a)) {
      |                ^
main.c:14:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:26: error: 'c' undeclared (first use in this function)
   14 |     }else if ((b<=a) && (c<=a)) {
      |                          ^
Language: Java

public class Main {
    public static void main(String[] args) {
        // 自分の得意な言語で
        // Let's チャレンジ！！
 
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
      String s[]=line.split(" ",0);
      int n=Integer.parseInt(s[0]);
      int k=Integer.parseInt(s[1]);
      int a=n+k;
      int su=a-k;
      int m=a*k;
      int ans=a;
      if(ans<su)
        ans=su;
      if(ans<m)
        ans=m;
        System.out.println(ans);
    }
}

Compiler output:
Main.java:6: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:6: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

public class Main {
    public static void main(String[] args) {
        // 自分の得意な言語で
        // Let's チャレンジ！！
 
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
      String s[]=line.split(" ",0);
      int n=Integer.parseInt(s[0]);
      int k=Integer.parseInt(s[1]);
      int a=n+k;
      int su=n-k;
      int m=n*k;
      int ans=a;
      if(ans<su)
        ans=su;
      if(ans<m)
        ans=m;
        System.out.println(ans);
    }
}

Compiler output:
Main.java:6: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:6: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class Main
2 errors