criyle/codenet-compile-errors huggingface dataset:
Language: Java

public class Main {
        public static void main(String[] args) throws IOException
        {
        	BufferedReader br = 
        			new BufferedReader(new InputStreamReader(System.in));
        	String str1 = br.readLine();
        	String str2 = br.readLine();
        	
        	int A = Integer.parseInt(str1);
        	int B = Integer.parseInt(str2);
        	
        	int num1 = A + B;
        	int num2 = A - B;
        	int num3 = A * B;
        	
        	if(num1 <= num2) {
        		if(num2 <= num3) {
        			System.out.println(num3);
        		} 
        		else {
        			System.out.println(num2);
        		}
        	}
        	else {
        		if(num3 <= num1) {
        			System.out.println(num1);
        		}
        		else {
        			System.out.println(num3);
        		}
        	}
        }
      
}


Compiler output:
Main.java:2: error: cannot find symbol
        public static void main(String[] args) throws IOException
                                                      ^
  symbol:   class IOException
  location: class Main
Main.java:4: error: cannot find symbol
        	BufferedReader br = 
        	^
  symbol:   class BufferedReader
  location: class Main
Main.java:5: error: cannot find symbol
        			new BufferedReader(new InputStreamReader(System.in));
        			    ^
  symbol:   class BufferedReader
  location: class Main
Main.java:5: error: cannot find symbol
        			new BufferedReader(new InputStreamReader(System.in));
        			                       ^
  symbol:   class InputStreamReader
  location: class Main
4 errors
Language: Java


import java.io.*;

public class hoge {
  public static void main ( String[ ] args ) {
	  int a,b,x,y,z;
	  System.out.print("a = ");
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(isr);
try{
	String buf = br.readLine();
	a = Integer.parseInt(buf);
	System.out.print("b = ");
	buf = br.readLine();
	b = Integer.parseInt(buf);
}catch(Exception e){
	a = 0;
	b = 0;
}
   x = a + b;
   y = a - b;
   z = a * b;
   
int values[] = {x, y, z};
int max      = values[0];
for (int index = 1; index < values.length; index ++) {
	 max = Math.max(max, values[index]);
     }
	  System.out.println ( max );
  }
}


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

#include <stdio.h>

int main(){
int a,b;
int max = 0;
scanf("%d %d"&a,&b);
max = a + b;
if(a + b < a - b)
max = a - b;
if(max < a * b)
max = a * b;

printf("%d",max);
}

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

#include <bits/stdc++.h>
using namespace std;
int main(void)
{
   int a,b;
   cin >> a >> b;
   
   if (((a==0)&&(b>0))||((a>0)&&(b==0))){
       cout << a+b <<endl;
   }else if((a==0||b==0)&&(a<=0&&b<=0)){
       cout << -(a+b) <<endl;
   }
   else if ((a==1||b==1)&&(a>0&&b>0)){
       cout << a+b <<endl;
   }else if(a<0&&b<0){
       cout << a*b <<endl;
   }else if (a>0&&b<0){
       cout << a-b << endl;
   }else if (a<0&&b>0){
       cout << b-a <<endl;
   }else{
       cout << a*b <<endl;
   }


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

#include <stdio.h>

int main(){
int a,b;
int max = 0;
scanf("%d %d"&a,&b);
max = a + b;
if(a + b < a - b)
max = a - b;
if(max < a * b)
max = a * b;

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

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

#!/usr/bin/env python

a, b = map(int, input().split())

print(max([a+b,a-b,a*b]))

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #!
    1 | #!/usr/bin/env python
      |  ^
a.cc:3:1: error: 'a' does not name a type
    3 | a, b = map(int, input().split())
      | ^
Language: C++

#include <string>
#include <queue>
#include <stack>
#include <vector>
#include <sstream>
#include <algorithm>
#include <deque>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <list>
#include <cstdio>
#include <iostream>
#include <cmath>
#include <climits>
#include <bitset>
#include <functional>
#include <numeric>
#include <ctime>
#include <cassert>
#include <cstring>
#include <fstream>
 
using namespace std;
int main()}
int a,b;
cin>>a>>b;
cout<<max{a+b,a-b,a*b}<<endl;
}

Compiler output:
a.cc:26:11: error: expected initializer before '}' token
   26 | int main()}
      |           ^
a.cc:26:11: error: expected declaration before '}' token
a.cc:28:1: error: 'cin' does not name a type
   28 | cin>>a>>b;
      | ^~~
a.cc:29:1: error: 'cout' does not name a type
   29 | cout<<max{a+b,a-b,a*b}<<endl;
      | ^~~~
a.cc:29:23: error: expected unqualified-id before '<<' token
   29 | cout<<max{a+b,a-b,a*b}<<endl;
      |                       ^~
a.cc:30:1: error: expected declaration before '}' token
   30 | }
      | ^
Language: C

#include <stdio.h>
int max(int x, int y)
{
	if (x > y)
		return x;
	else
		return y;

}
int main(void)
{
	int a;
	int b;
	int P;
	int Q;
		int R;
		int M;
		int N;
		scanf_s("%d", &a);
		scanf_s("%d", &b);
		P = a + b;
		Q = a - b;
		R = a * b;
		M = max(P, Q);
		N = max(M, R);
		printf("%d", N);
		return 0;

}

Compiler output:
main.c: In function 'main':
main.c:19:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   19 |                 scanf_s("%d", &a);
      |                 ^~~~~~~
      |                 scanf
Language: C++

#include <bits/stdc++.h>
#define _USE_MATH_DEFINES
#include <cmath>
#include <vector>
using namespace std;
#define pi M_PI

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

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

#include <stdio.h>
int max(int x, int y)
{
	if (x > y)
		return x;
	else
		return y;

}

int main(void)
{
	int a;
	int b;
	int P;
	int Q;
		int R;
		int M;
		int N;
		scanf_s("%d", &a);
		scanf_s("%d", &b);
		P = a + b;
		Q = a - b;
		R = a * b;
		M = max(P, Q);
		N = max(M, R);
		printf("%d", N);
		return 0;

}

Compiler output:
main.c: In function 'main':
main.c:20:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   20 |                 scanf_s("%d", &a);
      |                 ^~~~~~~
      |                 scanf
Language: C++

#include<string>
#include<map>
using namespace std;
typedef long long ll;

int main() {
	ll A, B, x = 0, y = 0, z = 0, max = 0;
	cin >> A >> B;
	x = A + B;
	y = A - B;
	z = A*B;
	if (x >= y) {
		if (x >= z)cout << x << endl;
		else cout << z << endl;
	}
	else {
		if (y >= z)cout << y << endl;
		else cout << z << endl;
	}
	return 0;

}

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<map>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:13:28: error: 'cout' was not declared in this scope
   13 |                 if (x >= z)cout << x << endl;
      |                            ^~~~
a.cc:13:28: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:41: error: 'endl' was not declared in this scope
   13 |                 if (x >= z)cout << x << endl;
      |                                         ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include<map>
  +++ |+#include <ostream>
    3 | using namespace std;
a.cc:14:22: error: 'cout' was not declared in this scope
   14 |                 else cout << z << endl;
      |                      ^~~~
a.cc:14:22: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:35: error: 'endl' was not declared in this scope
   14 |                 else cout << z << endl;
      |                                   ^~~~
a.cc:14:35: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:17:28: error: 'cout' was not declared in this scope
   17 |                 if (y >= z)cout << y << endl;
      |                            ^~~~
a.cc:17:28: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:41: error: 'endl' was not declared in this scope
   17 |                 if (y >= z)cout << y << endl;
      |                                         ^~~~
a.cc:17:41: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:18:22: error: 'cout' was not declared in this scope
   18 |                 else cout << z << endl;
      |                      ^~~~
a.cc:18:22: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:18:35: error: 'endl' was not declared in this scope
   18 |                 else cout << z << endl;
      |                                   ^~~~
a.cc:18:35: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

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

int main() {
  int A, B;
  cin >> A >> B;
  if (A < 0){
  	if (B < 1) 
    	cout << A - B;
  	else if (B == 1) 
    	cout << A + B;
 	else 
    	cout << A * B;
  }
  else {
    if (B < 1) 
    	cout << A * B;
  	else if (B == 1) 
    	cout << A + B;
 	else 
    	cout << A - B;
}

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

#include <stdio.h>
int max(int x, int y)
{
	if (x > y)
		return x;
	else
		return y;

}

int main(void)
{
	int a;
	int b;
	int P;
	int Q;
		int R;
		int M;
		int N;
		scanf_s("%d", &a);
		scanf_s("%d", &b);
		P = a + b;
		Q = a - b;
		R = a * b;
		M = max(P, Q);
		N = max(M, R);
		printf("%d", N);
		return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   20 |                 scanf_s("%d", &a);
      |                 ^~~~~~~
      |                 scanf
Language: C++

//============================================================================
// Name        : ABC_A.cpp
// Author      : 
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <cstdio>
#include <algorithm>

using namespace std;

int main() {
	int A,B,Max;
	cin >> A;
	cin >> B;
	Max =max(A*B, A+B);
	Max = max(Max, A-B);

	cout << Max << endl; // prints !!!Hello World!!!
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:9: error: 'cin' was not declared in this scope
   16 |         cin >> A;
      |         ^~~
a.cc:11:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
   10 | #include <algorithm>
  +++ |+#include <iostream>
   11 | 
a.cc:21:9: error: 'cout' was not declared in this scope
   21 |         cout << Max << endl; // prints !!!Hello World!!!
      |         ^~~~
a.cc:21:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:21:24: error: 'endl' was not declared in this scope
   21 |         cout << Max << endl; // prints !!!Hello World!!!
      |                        ^~~~
a.cc:11:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
   10 | #include <algorithm>
  +++ |+#include <ostream>
   11 |
Language: C

//============================================================================
// Name        : ABC_A.cpp
// Author      : 
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
#include <cstdio>
#include <algorithm>

using namespace std;

int main() {
	int A,B,Max;
	cin >> A;
	cin >> B;
	Max =max(A*B, A+B);
	Max = max(Max, A-B);

	cout << Max << endl; // prints !!!Hello World!!!
	return 0;
}


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

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

int a, b.c,d,e;

printf("整数を入力してください。");
printf("整数A:"); scanf("%d", &a);
printf("整数B:"); scanf("%d", &b);

c = a + b;
d = a - b;
e = a * b;

max = c;

if (d >= max) {
	max = d;
}
if (e >= max) {
	max = e;
}

printf("%d", max);

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    4 | int a, b.c,d,e;
      |         ^
main.c:6:1: error: expected declaration specifiers before 'printf'
    6 | printf("整数を入力してください。");
      | ^~~~~~
main.c:7:1: error: expected declaration specifiers before 'printf'
    7 | printf("整数A:"); scanf("%d", &a);
      | ^~~~~~
main.c:7:19: error: expected declaration specifiers before 'scanf'
    7 | printf("整数A:"); scanf("%d", &a);
      |                   ^~~~~
main.c:8:1: error: expected declaration specifiers before 'printf'
    8 | printf("整数B:"); scanf("%d", &b);
      | ^~~~~~
main.c:8:19: error: expected declaration specifiers before 'scanf'
    8 | printf("整数B:"); scanf("%d", &b);
      |                   ^~~~~
main.c:10:1: error: expected declaration specifiers before 'c'
   10 | c = a + b;
      | ^
main.c:11:1: error: expected declaration specifiers before 'd'
   11 | d = a - b;
      | ^
main.c:12:1: error: expected declaration specifiers before 'e'
   12 | e = a * b;
      | ^
main.c:14:1: error: expected declaration specifiers before 'max'
   14 | max = c;
      | ^~~
main.c:16:1: error: expected declaration specifiers before 'if'
   16 | if (d >= max) {
      | ^~
main.c:19:1: error: expected declaration specifiers before 'if'
   19 | if (e >= max) {
      | ^~
main.c:23:1: error: expected declaration specifiers before 'printf'
   23 | printf("%d", max);
      | ^~~~~~
main.c:25:1: error: expected declaration specifiers before 'return'
   25 | return 0;
      | ^~~~~~
main.c:26:1: error: expected declaration specifiers before '}' token
   26 | }
      | ^
main.c:2:5: error: old-style parameter declarations in prototyped function definition
    2 | int main(void)
      |     ^~~~
main.c:27: error: expected '{' at end of input
Language: C++

#include <iostream>

using namespace std;

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'scanf' was not declared in this scope
    3 |         scanf("%d %d",&a, &b);
      |         ^~~~~
a.cc:5:17: error: 'printf' was not declared in this scope
    5 |                 printf("%d\n",a+b);
      |                 ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(){
a.cc:9:17: error: 'printf' was not declared in this scope
    9 |                 printf("%d\n",a-b);
      |                 ^~~~~~
a.cc:9:17: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:13:17: error: 'printf' was not declared in this scope
   13 |                 printf("%d\n",a*b);
      |                 ^~~~~~
a.cc:13:17: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include <iostream>
#include <stack>
#include <queue>
#include <cmath>
#include <algorithm>
#include <string>

using namespace std;
int N;
string ar;
int check[100],Cnt,Max;

int main()
{
	cin>>a>>ar;
	for(int x=1; x<N; x++)
	{
		Cnt=0;
		for(int y=0; y<100; y++)
		{
			check[y]=0;
		}
		for(int z=0; z<x; z++)
		{
			check[ar[z]-97]=1;
		}
		for(int w=x; w<N; w++)
		{
			if(check[ar[w]]==1)Cnt++;
		}
		if(Cnt>Max) Max=Cnt;
		
	}
	cout<<Max;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:14: error: 'a' was not declared in this scope; did you mean 'ar'?
   15 |         cin>>a>>ar;
      |              ^
      |              ar
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;
      }
      else{
        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:27:6: error: expected '}' at end of input
   27 |     }
      |      ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C

#include <stdio.h>


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

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:7: error: conflicting types for 'x'; have 'int[3]'
    7 |   int x[3];
      |       ^
main.c:6:11: note: previous declaration of 'x' with type 'int'
    6 |   int a,b,x,i,j;
      |           ^
Language: C++

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

using namespace std;

int main(){

	int a,b;
	scanf("%d %d",&a,%b);
	//cin>>a>>b;

	int x,y,z;

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

	if(x>y){
		if(x>z)printf("%d",x);
		else printf("%d",z);
	}else{
		if(y>z)printf("%d",y);
		else printf("%d",z);
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:26: error: expected primary-expression before '%' token
    9 |         scanf("%d %d",&a,%b);
      |                          ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: 'abs' was not declared in this scope
   10 |         c=abs(a-b);
      |           ^~~
Language: C++

#include <bits/stdc++.h>
#define _USE_MATH_DEFINES
#include <cmath>
#include <vector>
using namespace std;
#define pi M_PI

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

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'p' was not declared in this scope
   11 |     p = a + b;
      |     ^
a.cc:12:5: error: 's' was not declared in this scope
   12 |     s = a - b;
      |     ^
a.cc:13:5: error: 'm' was not declared in this scope
   13 |     m = a * b;
      |     ^
Language: C++

a, b = map(int, input().split())

mx = a + b

if a * b > mx:
    mx = a * b
if a - b > mx:
    mx = a - b

print(mx)

Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a, b = map(int, input().split())
      | ^
Language: C++

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

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

#include<stdio.h>

int main(void){
    int a,b;

    scanf("%d %d",&a,&b);
    c=a+b;
    if(c<a*b)c=a*b;
    if(c<a-b)c=a-b;
    printf("%d\n",c);



    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:5: error: 'c' undeclared (first use in this function)
    7 |     c=a+b;
      |     ^
main.c:7:5: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <cstdio>

using namespace std;

int main()
{
  int a, b, ans;
  scanf("%d", &a);
  scanf("%d", &b);

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

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:16: error: expected ';' before '}' token
   12 |     ans = a + b
      |                ^
      |                ;
   13 |   }else{
      |   ~             
a.cc:14:14: error: expected ';' before '}' token
   14 |     ans = a-b
      |              ^
      |              ;
   15 |   }
      |   ~
Language: C++

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <cstring>
#include <cctype>
#include <cmath>
#include <stack>
#include <queue>
#include <vector>
#include <set>
#include <map>
#include <list>
#include <stdio.h>
#include <string.h>
#include <cstdlib>
#include <math.h>
#define INF 2000000000
using namespace std;
int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1};
#define ll long long
#define PL pair<long long, long long>
#define P pair<int,int>
#define mk make_pair
#define en endl;
#define WHITE 0
#define BLACK 2
#define GRAY 1
#define RE return 0;


//int main(){
//  set<string> str;
//  string s;
//  cin>>s;
//  int x;
//  cin>>x;
//  str.insert(s);
//
//  for(int i=0; i<s.size(); i++){
//    for(int j=0; i+j<s.size(); j++){
//      string st;
//      int y=0;
//      cout<<"i = "<<i<< "  J = "<<j<<en
//      for(int k=i; k<=i+j; k++){
//        st[y++]=s[k];
//        cout<<"st["<<y-1<<"] = "<<s[k]<<en
//      }
//      string sst=st.substr(i,j);
//      str.insert(sst);
//    }
//  }
//
//  int i=0;
//  for(set<string>::iterator it=str.begin(); it!=str.end(); it++){
//    i++;
//    string ss=*it;
//    cout<<"ss = "<<ss<<en
//    if(i==x) {
//      cout<<ss<<en
//      break;
//    }
//  }
//}


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

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

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <cstring>
#include <cctype>
#include <cmath>
#include <stack>
#include <queue>
#include <vector>
#include <set>
#include <map>
#include <list>
#include <stdio.h>
#include <string.h>
#include <cstdlib>
#include <math.h>
#define INF 2000000000
using namespace std;
int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1};
#define ll long long
#define PL pair<long long, long long>
#define P pair<int,int>
#define mk make_pair
#define en endl;
#define WHITE 0
#define BLACK 2
#define GRAY 1
#define RE return 0;


//int main(){
//  set<string> str;
//  string s;
//  cin>>s;
//  int x;
//  cin>>x;
//  str.insert(s);
//
//  for(int i=0; i<s.size(); i++){
//    for(int j=0; i+j<s.size(); j++){
//      string st;
//      int y=0;
//      cout<<"i = "<<i<< "  J = "<<j<<en
//      for(int k=i; k<=i+j; k++){
//        st[y++]=s[k];
//        cout<<"st["<<y-1<<"] = "<<s[k]<<en
//      }
//      string sst=st.substr(i,j);
//      str.insert(sst);
//    }
//  }
//
//  int i=0;
//  for(set<string>::iterator it=str.begin(); it!=str.end(); it++){
//    i++;
//    string ss=*it;
//    cout<<"ss = "<<ss<<en
//    if(i==x) {
//      cout<<ss<<en
//      break;
//    }
//  }
//}


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

//int

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

#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<cmath>
#include<stack>
#include<queue>
#include<cstdlib>
#include<cstdio>
#include<utility>
#include<list>
using namespace std;
int main(){
	int tmp,tmp2,tmp3,ans=0;
	int a,b;
	cin>>a>>b;
	tmp = a+b;
	tmp2 = a-b;
	tmp3 = a*b;
	ans = max(tmp, mtp2);
	ans = max(tmp3, ans);
	cout<<ans<<endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:24: error: 'mtp2' was not declared in this scope; did you mean 'tmp2'?
   20 |         ans = max(tmp, mtp2);
      |                        ^~~~
      |                        tmp2
Language: C++

#include<iostream>
using namespace std;

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

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

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

using namespace std;

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

	string s;
	long long N,ans, a, b, c;


	cin >>a >> b;

	ans = max(a-b, max(a + b, a*b));
	

	cout << ans  << "\n";
	//cin >> s;
}

Compiler output:
a.cc:8:1: error: '::main' must return 'int'
    8 | void main() {
      | ^~~~
Language: C++

a = []
a = gets.split.map(&:to_i)
c=[]
c.push(a[0]+a[1])
c.push(a[0]-a[1])
c.push(a[0]*a[1])
puts c.max

Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a = []
      | ^
Language: C++

#include<iostream>
using namespace std;

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

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

package main

import (
	"bufio"
	"fmt"
	"io"
	"os"
	"strconv"
)

func max(a, b int) int {
	if a > b {
		return a
	} else {
		return b
	}
}

func main() {
	defer stdout.Flush()
	a := readInt()
	b := readInt()
	c := a + b
	d := a - b
	e := a * b
	println(max(c, max(d, e)))
}

var (
	readString func() string
	stdout     *bufio.Writer
)

func init() {
	readString = newReadString(os.Stdin)
	stdout = bufio.NewWriter(os.Stdout)
}

func newReadString(ior io.Reader) func() string {
	r := bufio.NewScanner(ior)
	r.Split(bufio.ScanWords)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

func readInt() int {
	i, err := strconv.Atoi(readString())
	if err != nil {
		panic(err.Error())
	}
	return i
}

func readIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = readInt()
	}
	return b
}

func readLengthAndSlice() []int {
	n := readInt()
	return readIntSlice(n)
}

func printf(f string, args ...interface{}) (int, error) {
	return fmt.Fprintf(stdout, f, args...)
}

func println(args ...interface{}) (int, error) {
	return fmt.Fprintln(stdout, args...)
}


Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
a.cc:19:1: error: 'func' does not name a type
   19 | func main() {
      | ^~~~
a.cc:29:5: error: expected constructor, destructor, or type conversion before '(' token
   29 | var (
      |     ^
a.cc:39:1: error: 'func' does not name a type
   39 | func newReadString(ior io.Reader) func() string {
      | ^~~~
a.cc:51:1: error: 'func' does not name a type
   51 | func readInt() int {
      | ^~~~
a.cc:59:1: error: 'func' does not name a type
   59 | func readIntSlice(n int) []int {
      | ^~~~
a.cc:67:1: error: 'func' does not name a type
   67 | func readLengthAndSlice() []int {
      | ^~~~
a.cc:72:1: error: 'func' does not name a type
   72 | func printf(f string, args ...interface{}) (int, error) {
      | ^~~~
a.cc:72:42: error: expected unqualified-id before ')' token
   72 | func printf(f string, args ...interface{}) (int, error) {
      |                                          ^
a.cc:76:1: error: 'func' does not name a type
   76 | func println(args ...interface{}) (int, error) {
      | ^~~~
a.cc:76:33: error: expected unqualified-id before ')' token
   76 | func println(args ...interface{}) (int, error) {
      |                                 ^
Language: C++

//
//  main.cpp
//  codeforces
//
//  Created by cfhaiteeh on 21/5/2018.
//  Copyright © 2018 cfhaiteeh. All rights reserved.
//

#include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <map>
#include <stack>
#include <queue>
#include <vector>
#define  LL long long

using namespace  std;
const int maxn=123456;

LL n,H;
void init(){
    
    
}
LL ans;
//r 2e9
LL br(LL l,LL r,LL P,LL len){
    LL MIN=0;
    while(l<=r){
        LL mid=(l+r)/2;
        LL t1=(1+mid-1)*(mid-1)+mid-P;
        t1=n-t1;
        if(t1<0){
            r=mid-1;
        }
        else{
            LL x=t1/mid;
            if(t1%mid!=0)x++;
            LL need=(mid-1)*2+1-len;
            need+=x;
            
            if(MIN==0)MIN=need;
            else MIN=min(MIN,need);
            l=mid+1;
        }
    }
    return MIN;
}
void play(){
    LL p=2e9;
    LL l=1,r=min(H,p);
    
    ans=LONG_MAX;
    
    while(l<=r){
        LL mid=(l+r)/2;
        //top
        LL le=n-(1+mid)*mid/2;
        if(le<0){
            r=mid-1;
            
        }
        else{
            LL x=le/mid;
            if(le%mid!=0)x++;
            // cout<<x <<" "<<mid<<endl;
            ans=min(ans,x+mid);
            //  if(mid==1)cout<<"de"<<" "<<le<<endl;
            LL x2=br(mid+1, 2e9, (1+mid)*mid/2-mid,mid-1 );
            if(x2!=0){
                ans=min(ans,x2);
                // cout<<"x2"<<" "<<x2<<endl;
            }
            l=mid+1;
            
        }
    }
}
void pri(){
    printf("%lld\n",ans);
    
}
int main() {
    // insert code here...
    
    //   cout<<p*p/2<<endl;
    int a,b;
    while(scanf("%d%d",&a,&b)!=EOF){
        int c=a+b;
        int d=a-b;
        int e=a*b;
        c=max(c,d);
        c=max(c,e);
        printf("%d\n",c);
    }
    return 0;
}


Compiler output:
a.cc: In function 'void play()':
a.cc:56:9: error: 'LONG_MAX' was not declared in this scope
   56 |     ans=LONG_MAX;
      |         ^~~~~~~~
a.cc:17:1: note: 'LONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   16 | #include <queue>
  +++ |+#include <climits>
   17 | #include <vector>
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin>>a>>b;
      |   ^~~
a.cc:8:9: error: 'max' was not declared in this scope
    8 |   int f=max(c, d, e);
      |         ^~~
a.cc:9:3: error: 'cout' was not declared in this scope
    9 |   cout<<f<<en
      |   ^~~~
a.cc:9:12: error: 'en' was not declared in this scope; did you mean 'e'?
    9 |   cout<<f<<en
      |            ^~
      |            e
Language: C++

#include <iostream>
using namespace std;

int main() {
	
	int a, b, c, n;
	
	cin >> a >> b;
	/*
	cin >> n

	cin >> a >> b >> c;
	
	*/
	
	
	cout << max(a+b, max(a - b, a * b) << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:44: error: invalid operands of types 'const int' and '<unresolved overloaded function type>' to binary 'operator<<'
   17 |         cout << max(a+b, max(a - b, a * b) << endl;
      |                          ~~~~~~~~~~~~~~~~~~^~~~~~~
Language: C++

#include<bits/stdc++.h>

#define INF 1e9
#define llINF 1e18
#define MOD 1e9+7
#define pb push_back
#define mp make_pair 
#define F first
#define S second
#define ll long long
using namespace std;
int main(){
  int a,b,c;
  string s1,s2;
  cin>>a>>b;
  int ans=-INF;
  ans=max(ans,a+b);
  ans=max(ans,a-b);
  ans=max(ans,a*b)
  cout<<ans<<endl;
  return 0;
}


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

#include <iostream>
using namespace std;

int main() {
	
	int a, b, c, n;
	
	cin >> a >> b;
	/*
	cin >> n

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

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

int main(){
  int N;string S;cin>>N>>S;
  priority_queue<int> ans;
  for(int i=1;i<N;i++){
    string A=S.substr(0,i);
    string B=S.substr(i,N-i);
    vector<bool> X(26,false);
    int count=0;
    for(int j=0;j<N-i;j++) X.at(B.at(j)-'a')=true;
    for(int j=0;j<i;j++){
      if(X.at(A.at(j)-'a')){
        X.at(A.at(j)-'a')=false;
        count++;
    }
    ans.push(count);
  }
  cout<<ans.top()<<endl;
}



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

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <cmath>
#include <map>
#include <iomanip>
#define intt long long

int main() {
	int N; std::cin >> N;
	std::string s; std::cin >> s;
    intt count = 0;
    intt ans = 0;
    for (int i = 1; i < N - 1; i++) {
        std::vector<int> R(26), L(26);
        for (int j = 0; j < i; j++)L[s[j] - 'a'] = 1;
        for (int k = i; k < N; k++)R[s[k] - 'a'] = 1;
        for (int l = 0; l < 26; ++l) {
            if (R[i] == 1 && L[i] == 1)count++;
        }
    }
    ans = std::max(ans, count);
}
	}
}

Compiler output:
a.cc:26:9: error: expected declaration before '}' token
   26 |         }
      |         ^
a.cc:27:1: error: expected declaration before '}' token
   27 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
typedef long long ll;
#define _GLIBCXX_DEBUG
typedef vector<int> vec;
typedef vector<ll> lvec;
typedef vector<char> cvec;
typedef vector<double> dvec;
typedef pair<ll, ll> LP;
typedef tuple<ll, ll, ll> LT;
typedef pair<int, int> P;
typedef tuple<int, int, int> T;
#define fs first
#define sc second
int main()	{
  string s,a,b;
  cin>>s;
  int ans=0;
  int n=s.size();
  rep(i,n){
    a=s.substr(0,i);
    b=s.substr(n-i);
    int res=0;
    vector<int>cnt1(26),cnt2(26);
    rep(j,a.size()){
      cnt1[a[j]-'a']++;
    }
    rep(j,b.size())
      cnt2[b[j]-'a']++;
    rep(j,26){
      if(cnt1[j]>0 && cnt2[j]>0)
        res++;
      ans=max(ans,res);
    }
  }
  cout<<ans<<endl;
}
}

Compiler output:
a.cc:41:1: error: expected declaration before '}' token
   41 | }
      | ^
Language: Java

import java.util.*;

import jdk.vm.ci.aarch64.AArch64.Flag;
public class Main{
    public static void main( String[] args) {
        Scanner sc = new Scanner(System.in);
         int n = sc.nextInt();
         String s = sc.next();
         int max = 0;
        for (int i = 0; i < n; i++) {
             String s1 = s.substring(0,i);
             String s2 = s.substring(i);
             int count = 0;
            for(char c ='a'; c <= 'z'; c++){
                boolean flag1 = false;
                for(int j = 0; j < s1.length(); j++){
                    if(c==s1.charAt(j)){
                        flag1 = true;
                        break;
                    }
                }
                boolean flag2 = false;
                for(int j = 0; j < s2.length(); j++){
                    if(c==s2.charAt(j)){
                        flag2 = true;
                        break;
                    }
                }
                if(flag1 && flag2){
                    count++;
                }
            }
            max = Math.max(max, count);
        }   
        System.out.println(max);
    }
}

Compiler output:
Main.java:3: error: package jdk.vm.ci.aarch64 is not visible
import jdk.vm.ci.aarch64.AArch64.Flag;
                ^
  (package jdk.vm.ci.aarch64 is declared in module jdk.internal.vm.ci, which is not in the module graph)
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll =long long;
#define all(v) v.begin(),v.end()
 
int main() {
ll N;
  cin>>N;
  string S;
  cin>>S;
  ll ans=0;
  for(ll i=0;i<N-1;i++) {
    set<char> s;
for(ll j=0;j<=i;j++) {
  s.insert(S[j]);
}
    
    ll count=0;
    for(ll h=i+1;h<N;h++) {
      if(S.count(S[h]) {
        s.erese(S[h]);
        count++;
      }
         }
         
         ans=max(ans,count);
         }
         
         cout<<ans<<endl;
         }
         

      
      


  
  
  
  


Compiler output:
a.cc: In function 'int main()':
a.cc:20:12: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'count'
   20 |       if(S.count(S[h]) {
      |            ^~~~~
a.cc:20:23: error: expected ')' before '{' token
   20 |       if(S.count(S[h]) {
      |         ~             ^~
      |                       )
a.cc:24:10: error: expected primary-expression before '}' token
   24 |          }
      |          ^
Language: C++

#include<bits/stdc++.h>

using namespace std;

#define debug(n) cerr << #n << ':' << n << endl;
#define dline    cerr << __LINE__ << endl;

using ll = long long;
using ull = unsigned long long;
template<class T, class U> using P = pair<T,U>;
template<class T> using Heap = priority_queue<T>;
template<class T> using heaP = priority_queue<T,vector<T>,greater<T>>;
template<class T,class U> using umap = unordered_map<T,U>;
template<class T> using uset = unordered_set<T>;

template<class T>
bool ChangeMax(T&a,const T&b){
  if(a >= b) return false;
  a = b;    return true;
}

template<class T>
bool ChangeMin(T&a,const T&b){
  if(a <= b) return false;
  a = b;    return true;  
}

template<class T, size_t N, class U>
void Fill(T (&a)[N], const U&v){
    fill((U*)a,(U*)(a+N),v);
}

template<class T>
istream& operator >> (istream&is, vector<T>&v){
  for(auto&e:v)is >> e;
  return is;
}

int Cnter(string a,string b){
  sort(a.begin(), a.end());
  sort(b.begin(), b.end());
  int ret = 0;
  for(int i = 'a'; i <= 'z'; ++i){
    ret += binary_search(a.begin(),a.end(),i)&&binary_search(b.begin(),b.end(),i);
  }
  return ret;
}

int main(){
  string s,t; cin >> s >> t;
  int ans = 0;
  for(int i = 1; i < n-1; ++i){
    ChangeMax(ans,Cnter(s.substr(0,i),t.substr(i,n-i)));
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:52:22: error: 'n' was not declared in this scope
   52 |   for(int i = 1; i < n-1; ++i){
      |                      ^
Language: C++

n = int(input())
s = input().rstrip()

ans = 0
for i in range(n):
    x = s[:i]
    y = s[i:]
    ans = max(ans, len(set(x) & set(y)))
print(ans)

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		String s = scn.next();
      	int max = 0;
        for (int i=1;i<n; ++i){
            String str1 = s.substring(0,i);
            String str2 = s.substring(i);
            int count = 0;
            boolean[] az1 = new boolean[26];
            boolean[] az2 = new boolean[26];
          
            for (int j=0;j<str1.length();j++){
                az1[str1.charAt(j)-'a']=true;
            }
            for (int j=0;j<str2.length();j++){
                az2[str2.charAt(j)-'a']=true;
            }
            for (int j=0;j<26;j++){
                if (az1[j] && az2[j]){
                  count = count + 1;
                }
            }
            max = Math.max(max,count);
        }
        System.out.println(max);
		}
	}
}

Compiler output:
Main.java:32: error: class, interface, enum, or record expected
}
^
1 error
Language: Java

import java.util.Scanner;
public class main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		String S = sc.next();
		int max = 0;
		for (int i = 1; i < N - 1; i++) {
			String X = S.substring(0, i);
			String Y = S.substring(i);
			int result = 0;
			int min = Math.min(X.length(), Y.length());
			for (int j = 0; j < 26 && result < min; j++) {
				char alphbet = (char) ((char)'a' + j);
				if (X.contains(String.valueOf(alphbet)) && Y.contains(String.valueOf(alphbet))) {
					result++;
				}
			}
			max = Math.max(max, result);
		}
		System.out.println(max);
	}
}


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

import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        String S = sc.next();
        int max = 0;
        //区切るところを変えて探す
        for (int i=1;i<N;i++){
            String str1 = S.substring(0,i);
            String syr2 = S.substring(i);
            int count = 0;
            //アルファベットあるかな
            boolean[] ar1 = new boolean[26];
            boolean[] ar2 = new boolean[26];
            for (int j=0;j<str1.length();j++){//前半
                ar1[str1.charAt(j)-'a']=true;
            }
            for (int j=0;j<str2.length();j++){//後半
                ar2[str2.charAt(j)-'a']=true;
            }
            for (int j=0;j<26;j++){//両方にあるか
                if (ar1[j]&&ar2[j]){
                  count++;
                }
            }
            max = Math.max(max,count);
        }
        System.out.println(max);
    }
}

Compiler output:
Main.java:19: error: cannot find symbol
            for (int j=0;j<str2.length();j++){//??
                           ^
  symbol:   variable str2
  location: class Main
Main.java:20: error: cannot find symbol
                ar2[str2.charAt(j)-'a']=true;
                    ^
  symbol:   variable str2
  location: class Main
2 errors