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

#include <stdio.h>

int max3 (int a, int b, int c)
{
  int max = a;
  
  if (b > max ) max = b;
  if (c > max) max = c;
  return max;
}

int main (void);
{
  scanf("%d",&a);
  scanf("%d",&b);
  printf"%d",max3(a-b,a+b,a*b)
    return 0;
}
  

Compiler output:
a.cc:13:1: error: expected unqualified-id before '{' token
   13 | {
      | ^
Language: C++

#include <studio.h>

int max3 (int a, int b, int c)
{
  int max = a;
  
  if (b > max ) max = b;
  if (c > max) max = c;
  return max;
}

int main (void);
{
  scanf("%d",&a);
  scanf("%d",&b);
  printf"%d",max3(a-b,a+b,a*b)
    return 0;
}
  

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

# include <studio.h>

int max3 (int a, int b, int c)
{
  int max = a;
  
  if (b > max ) max = b;
  if (c > max) max = c;
  return max;
}

int main (void);
{
  scanf("%d",&a);
  scanf("%d",&b);
  printf"%d",max3(a-b,a+b,a*b)
    return 0;
}
  

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

#include<iostream>
using mamespace std;
int main()
{
  int a,b;
  cin>>a>>b;
  int s=a+b;
  int m=a*b;
  int sb=a-b;
  if(s>m && s>sb)
    cout<<s;
  else if(m>s && m>sb)
      cout<<m;
      else
    cout<<sb;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'mamespace'
    2 | using mamespace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin>>a>>b;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:11:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |     cout<<s;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:13:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |       cout<<m;
      |       ^~~~
      |       std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:15:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   15 |     cout<<sb;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define forn for(int i=0;i<n;i++)
#define form for(int j=0;j<m;j++)
#define pb push_back
#define s second
#define f first
int main()
{
   int a,b;
   cin>>a>.b;
   int maxx=max(a+b,a-b);
   cout<<max(maxx,a*b);
   return 0;
				
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: expected primary-expression before '.' token
   12 |    cin>>a>.b;
      |           ^
Language: C

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

    }
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:20:31: error: expected ';' before 'else'
   20 |                 printf("none")
      |                               ^
      |                               ;
   21 |          else
      |          ~~~~
Language: C++

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

    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:31: error: expected ';' before 'else'
   20 |                 printf("none")
      |                               ^
      |                               ;
   21 |          else
      |          ~~~~
Language: Java

import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.TreeSet;
 
 
 
public class Main {
  public static void main(String[] args) {
    InputReader sc = new InputReader(System.in);
 
 
    int a = sc.nextInt();
    int b = sc.nextInt();
		int wa = a + b;
		int sa = a - b;
		int seki = a * b;
		if(wa < sa){
			if(sa < saki){
				System.out.println(seki);
			}else{
				System.outs.println(sa);
			}
		}else{
			if(wa < seki){
				System.out.println(seki);
			}else{
				System.out.println(wa);
			}
		}
 
 
 
  }
 
 //ここからテンプレ
  static class InputReader {
      private InputStream stream;
      private byte[] buf = new byte[1024];
      private int curChar;
      private int numChars;
      private SpaceCharFilter filter;
 
      public InputReader(InputStream stream) {
          this.stream = stream;
      }
 
      public int next() {
          if (numChars == -1)
              throw new InputMismatchException();
          if (curChar >= numChars) {
              curChar = 0;
              try {
                  numChars = stream.read(buf);
              } catch (IOException e) {
                  throw new InputMismatchException();
              }
              if (numChars <= 0)
                  return -1;
          }
          return buf[curChar++];
      }
 
      public String nextStr() {
        int c = next();
        while(isSpaceChar(c)){c = next();}
        StringBuffer str = new StringBuffer();
        do{
          str.append((char)c);
          c = next();
        }while(!isSpaceChar(c));
        return str.toString();
      }
 
      public char nextChar() {
        int c = next();
        while(isSpaceChar(c)){c = next();}
        char ret;
        do{
          ret = (char)c;
          c = next();
        }while(!isSpaceChar(c));
        return ret;
      }
 
      public int nextInt() {
          int c = next();
          while (isSpaceChar(c))
              c = next();
          int sgn = 1;
          if (c == '-') {
              sgn = -1;
              c = next();
          }
          int res = 0;
          do {
              if (c < '0' || c > '9')
                  throw new InputMismatchException();
              res *= 10;
              res += c - '0';
              c = next();
          } while (!isSpaceChar(c));
          return res * sgn;
      }
 
      public boolean isSpaceChar(int c) {
          if (filter != null)
              return filter.isSpaceChar(c);
          return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
      }
 
      public interface SpaceCharFilter {
          public boolean isSpaceChar(int ch);
      }
  }
}

Compiler output:
Main.java:23: error: cannot find symbol
			if(sa < saki){
			        ^
  symbol:   variable saki
  location: class Main
Main.java:26: error: cannot find symbol
				System.outs.println(sa);
				      ^
  symbol:   variable outs
  location: class System
2 errors
Language: C++

#include <stdio.h>
#include <string.h>

struct ststr {
    char str[11];
};

int searchChar(char strf[],char strp[],int length){
    int s=0;
    for(int i=0;i<length;i++){
            int flag=0;
        for(int j=0;j<length;j++){
            if(strf[i]==strp[j])flag=1;
        }
    if(flag)s++;
    }
    return s;
}

int main(){
    char buff[11];
    int N,i,j;
    scanf("%d",&N);
    struct ststr data[N];
    for(i=0;i<N;i++){
        gets(data[i].str);
    }
    int s=0;
    for(i=0;i<N-1;i++){
        for(j=i+1;j<N;j++){
            strcpy(buff,data[i].str);
            if(searchChar(buff,data[j].str,11)==11)s++;
        }
    }
    printf("%d",s);
}


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

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

const int MOD = 1000000007;
const int INF = 1e9;

//long long
using ll = long long;

//出力系
#define print(x) cout << x << endl
#define yes cout << "Yes" << endl
#define YES cout << "YES" << endl
#define no cout << "No" << endl
#define NO cout << "NO" << endl
 
// begin() end()
#define all(x) (x).begin(),(x).end()

//for
#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define REPR(i,n) for(int i=n, i##_len=(n); i>=0; i--)
#define FOR(i,a,b) for(int i=(a), i##_len=(b); i<i##_len; ++i)

//最大公約数 
int gcd(int a, int b) { return b ? gcd(b, a%b) : a; }

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }

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

int ans = max(A + B, A - B, A * B);
print(ans);

}


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:34:14:   required from here
   34 | int ans = max(A + B, A - B, A * B);
      |           ~~~^~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C++

 int main ()
  {
 const int A;
 const int B;
  cin >> A;
  cin >> B;
  const int  c=A + B
  const int  d=A - B
  const int  e=A * B 
  if ((c>d)&&(c>e))
   std::cout<< "c" ;
    }
  else ((d>e)&&(d>c)) {
    std::cout<<"d" ;
    }
  else ((e>c)&&(e>d)) {
    std::cout<<"e" ;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:12: error: uninitialized 'const A' [-fpermissive]
    3 |  const int A;
      |            ^
a.cc:4:12: error: uninitialized 'const B' [-fpermissive]
    4 |  const int B;
      |            ^
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> A;
      |   ^~~
a.cc:8:3: error: expected ',' or ';' before 'const'
    8 |   const int  d=A - B
      |   ^~~~~
a.cc: At global scope:
a.cc:13:3: error: expected unqualified-id before 'else'
   13 |   else ((d>e)&&(d>c)) {
      |   ^~~~
a.cc:16:3: error: expected unqualified-id before 'else'
   16 |   else ((e>c)&&(e>d)) {
      |   ^~~~
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
Language: C++

 int main ()
  {
  int A;
  int B;
  cin >> A;
  cin >> B;
  const int  c=A + B
  const int  d=A - B
  const int  e=A * B 
  if ((c>d)&&(c>e))
   std::cout<< "c" ;
    }
  else ((d>e)&&(d>c)) {
    std::cout<<"d" ;
    }
  else ((e>c)&&(e>d)) {
    std::cout<<"e" ;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> A;
      |   ^~~
a.cc:8:3: error: expected ',' or ';' before 'const'
    8 |   const int  d=A - B
      |   ^~~~~
a.cc: At global scope:
a.cc:13:3: error: expected unqualified-id before 'else'
   13 |   else ((d>e)&&(d>c)) {
      |   ^~~~
a.cc:16:3: error: expected unqualified-id before 'else'
   16 |   else ((e>c)&&(e>d)) {
      |   ^~~~
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
Language: C++

#include<stdio>
int main(){
  int a,b;
  scanf("%d %d",&a,&b);
  int sum=-201;
  int q,w,e;
  q = a+b;
  w = a-b;
  e = a*b;
  if(q>sum)
    sum =q;
  if(w>sum)
    sum =w;
  if(e>sum);
   sum=e;
  printf("%d",sum);
}
    

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

#include <iostream>

using namespace std;

int main()
{
	int a, b, wa, sa, seki;
	
	cin >> a >> b;
	
	wa = a + b;
	sa = a - b;
	seki a * b;
	
	if(wa < sa){
		cout << sa << endl;
		if(sa < seki){
			cout << seki << endl;
		}
	}
	else if(wa < seki){
		cout << seki << endl;
		if(seki < sa){
			cout << sa << endl;
		}
	}
	else{
		cout << wa << endl;
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: expected ';' before 'a'
   13 |         seki a * b;
      |             ^~
      |             ;
Language: C++

#include <iostream>

using namespace std;

int main()
{
	int a, b, wa, sa, seki;
	
	cin >> a >> b;
	
	wa = a + b;
	sa = a - b;
	seki a * b;
	
	if(wa < sa){
		cout << sa << "" << endl;
		if(sa < seki){
			cout << seki "" << endl;
		}
	}
	else if(wa < seki){
		cout << seki << "" << endl;
		if(seki < sa){
			cout << sa << "" endl;
		}
	}
	else{
		cout << wa << "" << endl;
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: expected ';' before 'a'
   13 |         seki a * b;
      |             ^~
      |             ;
a.cc:18:37: error: expected ';' before string constant
   18 |                         cout << seki "" << endl;
      |                                     ^~~
      |                                     ;
a.cc:24:41: error: expected ';' before 'endl'
   24 |                         cout << sa << "" endl;
      |                                         ^~~~~
      |                                         ;
Language: C++

#include<stdio.h>
#include<iostream>

int main(){
  int a,b;
  cin >> a >> b;
  int ans[];
  ans[0]=a+b;
  ans[1]=a-b;
  ans[2]=a*b;
  cout << max(ans);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> a >> b;
      |   ^~~
      |   std::cin
In file included from a.cc:2:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:7: error: storage size of 'ans' isn't known
    7 |   int ans[];
      |       ^~~
a.cc:11:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |   cout << max(ans);
      |   ^~~~
      |   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:11: error: 'max' was not declared in this scope; did you mean 'std::max'?
   11 |   cout << max(ans);
      |           ^~~
      |           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)
      |     ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int A=0;B=0;
  cin>>A>>B;
  int sum=A+B;
  int sub=A-B;
  int mul=A*B;
  if(sum>sub){
     if(sum>mul){
        cout<<sum;
     }else{ 
        cout<<mul;
      }
  }else{
    if(sub>mul){
      cout<<sub;
    }else{
      cout<<mul;
  }
   }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:11: error: 'B' was not declared in this scope
    4 |   int A=0;B=0;
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int A=0;B=0;
  cin>>A>>B;
  int sum=A+B;
  int sub=A-B;
  int mul=A*B;
  if(sum>sub)
     if(sum>mul)
        cout<<sum;
      else 
        cout<<mul;
  else
    if(sub>mul)
      cout<<sub;
    else
      cout<<mul;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:11: error: 'B' was not declared in this scope
    4 |   int A=0;B=0;
      |           ^
Language: C

#include<stdio.h>
#include<iostream>
 
int main(void){
	int a, b,ans;
	cin >> a >> b;
  ans = max(a+b,a-b,a*b);
  cout << ans << endl;	
}

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

#include<stdio.h>
#include <iostream>

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

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

#include<stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:5:9: error: 'cin' undeclared (first use in this function)
    5 |         cin >> a >> b;
      |         ^~~
main.c:5:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:9: error: implicit declaration of function 'max' [-Wimplicit-function-declaration]
    6 |   ans = max(a+b,a-b,a*b);
      |         ^~~
main.c:7:3: error: 'cout' undeclared (first use in this function)
    7 |   cout << ans << endl;
      |   ^~~~
main.c:7:18: error: 'endl' undeclared (first use in this function)
    7 |   cout << ans << endl;
      |                  ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(0);
  cin.tie(0);
  int a,b;
  if((a+b)>(a-b)&&(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: In function 'int main()':
a.cc:12:25: error: expected '}' at end of input
   12 |     cout << a*b << endl;
      |                         ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C

#include<stdio.h>
#include <string.h>
int main(int a,int b){
  struct ans;
  int ans = max(a+b,a-b,a*b);
  return max;
}

Compiler output:
main.c: In function 'main':
main.c:5:13: error: implicit declaration of function 'max' [-Wimplicit-function-declaration]
    5 |   int ans = max(a+b,a-b,a*b);
      |             ^~~
main.c:6:10: error: returning 'int (*)()' from a function with return type 'int' makes integer from pointer without a cast [-Wint-conversion]
    6 |   return max;
      |          ^~~
Language: C

#include<stdio.h>
int main(int a,int b){
  struct ans;
  int ans = max(a+b,a-b,a*b);
  return max;
}

Compiler output:
main.c: In function 'main':
main.c:4:13: error: implicit declaration of function 'max' [-Wimplicit-function-declaration]
    4 |   int ans = max(a+b,a-b,a*b);
      |             ^~~
main.c:5:10: error: returning 'int (*)()' from a function with return type 'int' makes integer from pointer without a cast [-Wint-conversion]
    5 |   return max;
      |          ^~~
Language: C

#include<stdio.h>
int main(int a,int b){
  struct ans;
  ans = max(a+b,a-b,a*b);
  return max;
}

Compiler output:
main.c: In function 'main':
main.c:4:3: error: 'ans' undeclared (first use in this function)
    4 |   ans = max(a+b,a-b,a*b);
      |   ^~~
main.c:4:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:4:9: error: implicit declaration of function 'max' [-Wimplicit-function-declaration]
    4 |   ans = max(a+b,a-b,a*b);
      |         ^~~
main.c:5:10: error: returning 'int (*)()' from a function with return type 'int' makes integer from pointer without a cast [-Wint-conversion]
    5 |   return max;
      |          ^~~
Language: C++

#include <iostream>

using namespace std;

int main(){
	int a;
	int b;
	cin >> a;
	cin >> b;
	if(a*b<=0){
		if(0<b){
			cout << a-b;
		}else{
			cout << a+b;
		}
	}else{
		if(a=1||b=1){
			cout << a+b;
		}else{
			cout << a*b;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:23: error: lvalue required as left operand of assignment
   17 |                 if(a=1||b=1){
      |                      ~^~~
Language: C++

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

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

Compiler output:
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:8:14:   required from here
    8 |     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++

import java.io.*;
import java.util.*;
import java.util.function.*;

public class Main {

    public static void main(String[] args) throws IOException {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer in=new StringTokenizer("");
        int n=Integer.parseInt(br.readLine());
        Map<String,Integer> mp=new HashMap<>();
        Consumer<String> fun=(s)->mp.put(s, mp.getOrDefault(s, 0)+1);
        for(int i=0;i<n;i++)fun.accept(Arrays.toString(br.readLine().chars().mapToObj(it -> (char) it).sorted().toArray()));
        System.out.println(mp.values().stream().mapToInt(it -> it * (it - 1) / 2).sum());
    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.util.*;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.util.function.*;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: expected unqualified-id before 'public'
    5 | public class Main {
      | ^~~~~~
Language: C++

#include <iostream>
#include <cmath>
 
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:9:13:   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 <stdio.h>
 
void SortBubble(int array[],int n);
 
int main(void){
  int a,b,fa;
  int anser[3];
  
  a = getchar();
  b = getchar();
  
  anser[0] = a+b;
  anser[1] = a-b;
  anser[2] = a*b;
  
  SortBubble(anser, 3);
  
  fa = anser[0];
  
  printf(fa);
}
 
void SortBubble(int array[],int n)
{
    int i,j,temp;
 
    for (i = n-1;i > 0;i--) {
        for (j = 0;j < n - 1;j++) {
            if (array[j + 1] < array[j]) {
                temp = array[j];array[j] = array[j + 1];array[j + 1] = temp;
            }
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:10: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   20 |   printf(fa);
      |          ^~
      |          |
      |          int
In file included from a.cc:1:
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C++

#include <stdio.h>
 
void SortBubble(int array[],int n);
 
int main(void){
  int a,b;
  int anser[3];
  
  a = getchar();
  b = getchar();
  
  anser[0] = a+b;
  anser[1] = a-b;
  anser[2] = a*b;
  
  SortBubble(anser, 3);
  
  printf(anser[0]);
}
 
void SortBubble(int array[],int n)
{
    int i,j,temp;
 
    for (i = n-1;i > 0;i--) {
        for (j = 0;j < n - 1;j++) {
            if (array[j + 1] < array[j]) {
                temp = array[j];array[j] = array[j + 1];array[j + 1] = temp;
            }
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:17: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   18 |   printf(anser[0]);
      |          ~~~~~~~^
      |                 |
      |                 int
In file included from a.cc:1:
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C++

#include <stdio.h>

void SortBubble(int array[],int n);

int main(void){
  int a,b;
  int anser[3];
  
  scanf("%d",a);
  scanf("%d",b);
  
  anser[0] = a+b;
  anser[1] = a-b;
  anser[2] = a*b;
  
  SortBubble(anser, 3);
  
  printf(anser[0]);
}

void SortBubble(int array[],int n)
{
    int i,j,temp;

    for (i = n-1;i > 0;i--) {
        for (j = 0;j < n - 1;j++) {
            if (array[j + 1] < array[j]) {
                temp = array[j];array[j] = array[j + 1];array[j + 1] = temp;
            }
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:17: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   18 |   printf(anser[0]);
      |          ~~~~~~~^
      |                 |
      |                 int
In file included from a.cc:1:
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C++

#include <stdio.h>

void SortBubble(int array[],int n);

int main(void){
  int a,b;
  int anser[];
  
  scanf("%d",a);
  scanf("%d",b);
  
  anser[0] = a+b;
  anser[1] = a-b;
  anser[2] = a*b;
  
  SortBubble(anser, 3);
}

void SortBubble(int array[],int n)
{
    int i,j,temp;

    for (i = n-1;i > 0;i--) {
        for (j = 0;j < n - 1;j++) {
            if (array[j + 1] < array[j]) {
                temp = array[j];array[j] = array[j + 1];array[j + 1] = temp;
            }
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: storage size of 'anser' isn't known
    7 |   int anser[];
      |       ^~~~~
Language: C++

#include <stdio.h>

void SortBubble(int array[],int n);

int main(void){
  int a,b;
  int anser[];
  
  scanf("%i",a);
  scanf("%i",b);
  
  anser[0] = a+b;
  anser[1] = a-b;
  anser[2] = a*b;
  
  SortBubble(anser, 3);
}

void SortBubble(int array[],int n)
{
    int i,j,temp;

    for (i = n-1;i > 0;i--) {
        for (j = 0;j < n - 1;j++) {
            if (array[j + 1] < array[j]) {
                temp = array[j];array[j] = array[j + 1];array[j + 1] = temp;
            }
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: storage size of 'anser' isn't known
    7 |   int anser[];
      |       ^~~~~
Language: C++

#include <std.io>

void SortBubble(int array[],int n);

int main(void){
  int a,b;
  int anser[];
  
  scanf("%i",a);
  scanf("%i",b);
  
  anser[0] = a+b;
  anser[1] = a-b;
  anser[2] = a*b;
  
  SortBubble(anser, 3);
  
  printf(anser[0]);
}

void SortBubble(int array[],int n)
{
    int i,j,temp;

    for (i = n-1;i > 0;i--) {
        for (j = 0;j < n - 1;j++) {
            if (array[j + 1] < array[j]) {
                temp = array[j];array[j] = array[j + 1];array[j + 1] = temp;
            }
        }
    }
}

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

#include <bits/stdc++.h>
using namespace std;
#define int long long int
#define endl "\n"
const int MOD=1e9+7;
#ifndef HOME
#define cerr if(0)cerr
#endif

int32_t main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
  	int a,b;
  	cin>>a>>n;
  	cout<<max({a+b,a-b,a*b});
    
    return 0;
    
}



Compiler output:
a.cc: In function 'int32_t main()':
a.cc:14:17: error: 'n' was not declared in this scope
   14 |         cin>>a>>n;
      |                 ^
Language: Java

public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		int A, B;
		A = scan.nextInt();
		B = scan.nextInt();
		scan.close();
		int a, b, c;
		a = A + B;
		b = A * B;
		c = A - B;
		System.out.println(a + "," + b + "," + c);
		if (a > b) {
			if (a > c) {
				System.out.println(a);
			}else{
				System.out.println(c);
			}
		}else{
			if(b>c) {
				System.out.println(b);
			}else {
				System.out.println(c);
			}
		}
	}

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

package abc137_a;

import java.util.Scanner;

public class A {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		int A, B;
		A = scan.nextInt();
		B = scan.nextInt();
		scan.close();
		int a, b, c;
		a = A + B;
		b = A * B;
		c = A - B;
		System.out.println(a + "," + b + "," + c);
		if (a > b) {
			if (a > c) {
				System.out.println(a);
			}else{
				System.out.println(c);
			}
		}else{
			if(b>c) {
				System.out.println(b);
			}else {
				System.out.println(c);
			}
		}
	}
}

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

import java.util.Scanner;

public class A {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		int A, B;
		A = scan.nextInt();
		B = scan.nextInt();
		scan.close();
		int a, b, c;
		a = A + B;
		b = A * B;
		c = A - B;
		System.out.println(a + "," + b + "," + c);
		if (a > b) {
			if (a > c) {
				System.out.println(a);
			}else{
				System.out.println(c);
			}
		}else{
			if(b>c) {
				System.out.println(b);
			}else {
				System.out.println(c);
			}
		}
	}
}

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

import java.util.*;
public class Cp{
	public static void main(String[] args) {
		int a,b;
		Scanner sc = new Scanner(System.in);
		a= sc.nextInt();
		b= sc.nextInt();
		System.out.println(max(a+b,max(a*b,a-b)));
	}
	public static int max(int a,int b){
		return (a>b)?a:b;
	}
}

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

#include<bits/stdc++.h>
using namespace std;
bool comp(int a,int b)
  {
    return(a<b);
  }
  int main()
  {
  int c,d;
  cin>>c>>d;
  cout<<std::max({c+d,c-d,c*d},comp)<<\"n";
  return 0;
  }
  
  


Compiler output:
a.cc:11:39: error: stray '\' in program
   11 |   cout<<std::max({c+d,c-d,c*d},comp)<<\"n";
      |                                       ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  bool comp(int a,int b)
  {
    return(a<b);
  }
  int main
  {
  int c,d;
  cin>>c>>d;
  cout<<std::max({c+d,c-d,c*d},comp)<<\"n";
  return 0;
  }
  
  


Compiler output:
a.cc:13:39: error: stray '\' in program
   13 |   cout<<std::max({c+d,c-d,c*d},comp)<<\"n";
      |                                       ^
a.cc: In function 'int main()':
a.cc:6:3: error: a function-definition is not allowed here before '{' token
    6 |   {
      |   ^
a.cc:11:3: error: expected primary-expression before 'int'
   11 |   int c,d;
      |   ^~~
a.cc:11:3: error: expected '}' before 'int'
a.cc:10:3: note: to match this '{'
   10 |   {
      |   ^
a.cc:12:8: error: 'c' was not declared in this scope
   12 |   cin>>c>>d;
      |        ^
a.cc:12:11: error: 'd' was not declared in this scope
   12 |   cin>>c>>d;
      |           ^
a.cc:13:32: error: 'comp' was not declared in this scope
   13 |   cout<<std::max({c+d,c-d,c*d},comp)<<\"n";
      |                                ^~~~
Language: C++

    #include <iostream>
    #include <string.h>
    #include <algorithm>
    #include <math.h>
    typedef long long ll;
     
    using namespace std;
    int main(){
      int a,b;
      cin >> a >> b;
      cout << max([a+b,a-b,a*b]);
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:11:21: error: expected ',' before '+' token
   11 |       cout << max([a+b,a-b,a*b]);
      |                     ^
      |                     ,
a.cc:11:21: error: expected identifier before '+' token
a.cc:11:23: error: expected ']' before ',' token
   11 |       cout << max([a+b,a-b,a*b]);
      |                       ^
      |                       ]
a.cc: In lambda function:
a.cc:11:23: error: expected '{' before ',' token
a.cc: In function 'int main()':
a.cc:11:31: error: expected ')' before ']' token
   11 |       cout << max([a+b,a-b,a*b]);
      |                  ~            ^
      |                               )
Language: C++

#include <iostream>
#include <string.h>
#include <algorithm>
#include <math.h>
typedef long long ll;

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

Compiler output:
In file included from /usr/include/c++/14/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:11:14:   required from here
   11 |   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>
#include <string.h>
#include <algorithm>
typedef long long ll;

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

Compiler output:
In file included from /usr/include/c++/14/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: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;
  cout << 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:6:14:   required from here
    6 |   cout << max(a+b,a-b,a*b);
      |           ~~~^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#define int int64_t
#define rp(i, N) for(int i=0; i<N; i++);
using namespace std;
using pair = pair<int, int>;
using tup  = tuple<int, int, int>;
using vec  = vector<int>;
using vvec = vector<vec>;
const int INF = 100000000;
// " ", ' '

// プロトタイプ宣言
// int myfunc(int, vvec);

// グローバル変数
// int N, M;
// vvec data(N, vec(M));

// 関数：

signed main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	
	int A, B; cin >> A >> B;
	int ans = A+B;
	if (ans < A-B) ans = A-B;
	if (ans < A*B) ans = A*B

	cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:33: error: expected ';' before 'cout'
   28 |         if (ans < A*B) ans = A*B
      |                                 ^
      |                                 ;
   29 | 
   30 |         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});
  return 0;
}

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

import java.util.*;
 
public class Main{
	public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	int a = scan.nextInt();
      	int b = scan.nextInt();
      	System.out.print(Math.max(a-b, a+b, a*b));
    }
}

Compiler output:
Main.java:8: error: no suitable method found for max(int,int,int)
      	System.out.print(Math.max(a-b, a+b, a*b));
      	                     ^
    method Math.max(int,int) is not applicable
      (actual and formal argument lists differ in length)
    method Math.max(long,long) is not applicable
      (actual and formal argument lists differ in length)
    method Math.max(float,float) is not applicable
      (actual and formal argument lists differ in length)
    method Math.max(double,double) is not applicable
      (actual and formal argument lists differ in length)
1 error
Language: Java

import java.util.*;

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

Compiler output:
Main.java:8: error: int cannot be dereferenced
      	System.out.print(Math.max(a-b, a+b. a*b));
      	                                  ^
1 error
Language: C++

#include <stdio.h>
#include <cmath>

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:9: error: 'cin' was not declared in this scope
    8 |         cin>>a>>b;
      |         ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <cmath>
  +++ |+#include <iostream>
    3 | 
a.cc:9:9: error: 'cout' was not declared in this scope
    9 |         cout<<max(a+b, a-b, a*b)<<endl;
      |         ^~~~
a.cc:9:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:35: error: 'endl' was not declared in this scope
    9 |         cout<<max(a+b, a-b, a*b)<<endl;
      |                                   ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <cmath>
  +++ |+#include <ostream>
    3 | 
In file included from /usr/include/c++/14/bits/specfun.h:43,
                 from /usr/include/c++/14/cmath:3906,
                 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:9:13:   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 <stdio>
#include <cmath>

using namespace std;

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





Compiler output:
a.cc:1:10: fatal error: stdio: No such file or directory
    1 | #include <stdio>
      |          ^~~~~~~
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)<<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:8:13:   required from here
    8 |         cout<<max(a+b, a-b, a*b)<<endl;
      |               ~~~^~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#include <stdio.h>
#include <cmath>

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:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |         cin>>a>>b;
      |         ^~~
      |         std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |         cout<<max(a+b, a-b, a*b)<<endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:8:15: error: 'max' was not declared in this scope; did you mean 'std::max'?
    8 |         cout<<max(a+b, a-b, a*b)<<endl;
      |               ^~~
      |               std::max
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:8:35: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |         cout<<max(a+b, a-b, a*b)<<endl;
      |                                   ^~~~
      |                                   std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
#include <stdio>
#include <cmath>

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


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

#include <bits/stdc++.h>

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:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |         cin>>a>>b;
      |         ^~~
      |         std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |         cout<<max(a+b, a-b, a*b)<<endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:6:15: error: 'max' was not declared in this scope; did you mean 'std::max'?
    6 |         cout<<max(a+b, a-b, a*b)<<endl;
      |               ^~~
      |               std::max
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:6:35: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |         cout<<max(a+b, a-b, a*b)<<endl;
      |                                   ^~~~
      |                                   std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:35: error: expected primary-expression before '<<' token
    7 |   if (a < 0 && b < 0) cout << a * << endl;
      |                                   ^~
Language: C

            #include <stdio.h>
             
            int main(){
              int a,b;
              if(scanf("%d",&a)==1&&scanf("%d",&b)==1){
                int tmp;
                int A=a+b,B=a-b,C=a*b;
                if(A>=B&&A>=C) tmp = A;
                if(B>=A&&B>=C) tmp = B;
                if(C>=A&&C>=B) tmp = C;
                printf("%d",tmp);
              }
              else  {
        printf("Failed to read integer.\n");
    }

Compiler output:
main.c: In function 'main':
main.c:15:5: error: expected declaration or statement at end of input
   15 |     }
      |     ^