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



#include <iostream>
using namespace std;

int main()
{
    int color_11 = (cin >> (color_11), color_11),
        color_2=(cin >> (color_2), color_2),
        color_3=(cin >> (color_3), color_3);

    if ((color_11 == color_2) || (color_11 == color_3) ){
		cout << "1" ;}
    else if ((color_11 == color_2) || (color_11 == color_3) || (color_2 == color_3){
		cout << "2";}
    else{
		cout << "3";}

	system("pause");
    return 0 ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:84: error: expected ';' before '{' token
   14 |     else if ((color_11 == color_2) || (color_11 == color_3) || (color_2 == color_3){
      |                                                                                    ^
      |                                                                                    ;
a.cc:16:5: error: expected primary-expression before 'else'
   16 |     else{
      |     ^~~~
a.cc:15:30: error: expected ')' before 'else'
   15 |                 cout << "2";}
      |                              ^
      |                              )
   16 |     else{
      |     ~~~~                      
a.cc:14:13: note: to match this '('
   14 |     else if ((color_11 == color_2) || (color_11 == color_3) || (color_2 == color_3){
      |             ^
Language: C

#include<stdio.h>
int main(void){
    int a,b,c;
    scanf("%d %d %d",&a,&b,&c);
    if(a==b&&b==c)
    printf("1");
    else if(a==b||a==c||b==c)
    print("2");
    else
    {
        printf("3");
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:5: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
    8 |     print("2");
      |     ^~~~~
      |     printf
Language: C++

import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    int c = sc.nextInt();
    int count = 1;
    if (b != a) {
      count += 1;
    }
    if (c != a && c != b) {
      count += 1;
    }
    System.out.println(count);
  }
}

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

#include <stdio.h>

int main(void)
{
	int a, b, c, count;
	
	scanf("%d%d%d", &a, &b, &c);
	
	if((a == b && a == c) && b == c) {
		count = 1;
	}
	else if((a == b && a != c) {
		count = 2;
	}
	else if(a != b && a == c) {
		count = 2;
	}
	else {
		count = 3;
	}
	printf("%d", count);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:35: error: expected ')' before '{' token
   12 |         else if((a == b && a != c) {
      |                ~                  ^~
      |                                   )
main.c:23:1: error: expected expression before '}' token
   23 | }
      | ^
Language: C

#include <stdio.h>

int main(void)
{
	int a, b, c, count;
	
	scanf("%d%d%d", &a, &b, &c);
	
	if((a == b && a == c) && b == c) {
		count = 1;
	}
	else if(a == b && a != c && ) {
		count = 2;
	}
	else if(a != b && a == c) {
		count = 2;
	}
	else if((a != b && a != c) && b != c) {
		count = 3;
	}
	printf("%d", count);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:37: error: expected expression before ')' token
   12 |         else if(a == b && a != c && ) {
      |                                     ^
Language: C

#include<stdio.h>
int main()
{
    int n,k,fac1=1,fac2=1,fac3=1,t;
    scanf("%d%d",&n,&k);
    if(n==k)
    printf("%d",n);
    else
    {
    while(k>=1)
    {
        fac1=fac1*k;
        --k;
    }
    while(n>=1)
    {
        fac2=fac2*n;
        --n;
    }
    
    while(k-n>=1)
    {
        fac3=fac3*(k-n);
        --(k-n);
    }
    printf("%d",fac1/(fac2*fac3));
    }
    return 0;
    
}

Compiler output:
main.c: In function 'main':
main.c:24:9: error: lvalue required as decrement operand
   24 |         --(k-n);
      |         ^~
Language: C

#include<stdio.h>
int main()
{
    int n,k,fac1=1,fac2=1,fac3=1;
    scanf("%d%d",&n,&k);
    if(n==k)
    printf("%d",n);
    else
    {
    while(k>=1)
    {
        fac1=fac1*k;
        --k;
    }
    while(n>=1)
    {
        fac2=fac2*n;
        --n;
    }
    while(k-n>=1)
    {
        fac3=fac3*(k-n);
        --(k-n-1);
    }
    printf("%d",fac1/(fac2*fac3));
    }
    return 0;
    
}

Compiler output:
main.c: In function 'main':
main.c:23:9: error: lvalue required as decrement operand
   23 |         --(k-n-1);
      |         ^~
Language: Java

import java.util.*;

public class Solution{
	public static void main(String args[]){
		Scanner in = new Scanner(System.in);
		int a =in.nextInt(), b = in.nextInt(), c = in.nextInt();
		int count = 0;
		if(a!=b) {
			count++;
		}
		if(b!=c) {
			count++;
		}
		if(a!=c) {
			count++;
		}
		if(count == 3) {
			System.out.println("3");
	//		System.out.print("Three different colors: \n"+a+", "+b+" and "+c+".");
		}
		if(count == 2) {
			if(a==c) c = b;
			System.out.println("2");
	//		System.out.print("Two different colors: "+a+" and "+c+".");
		}
		if(count == 0) {
			System.out.println("1");
	//		System.out.print("One different color: \r\n"+a+".");
		}
		in.close();
	}
}

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

import java.util.*;

public class Solution{
	public static void main(String args[]){
		Scanner in = new Scanner(System.in);
		int a =in.nextInt(), b = in.nextInt(), c = in.nextInt();
		int count = 0;
		if(a!=b) {
			count++;
		}
		if(b!=c) {
			count++;
		}
		if(a!=c) {
			count++;
		}
		if(count == 3) {
			System.out.print("Three different colors: "+a+", "+b+" and "+c+".");
		}
		if(count == 2) {
			if(a==c) c = b;
			System.out.print("Two different colors: "+a+" and "+c+".");
		}
		if(count == 0) {
			System.out.print("One different color: "+a+".");
		}
		in.close();
	}
}

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

#include <bits/stdc++.h>
int main()
{
int a,b,c,i,t;
cin>>a>>b>>c;
if((a==b)||(b==c)||(c==a))
{
cout<<2;
}
else
if(a==b==c)
{
cout<<1;
}
else
cout<<3;
return 0;
}

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

import java.util.*;

public class Solution{
	public static void main(String args[]){
		Scanner in = new Scanner(System.in);
		int a =in.nextInt(), b = in.nextInt(), c = in.nextInt();
		int count = 0;
		if(a!=b) {
			count++;
		}
		if(b!=c) {
			count++;
		}
		if(a!=c) {
			count++;
		}
		if(count == 3) {
			System.out.print("Three different colors: "+a+", "+b+" and "+c+".");
		}
		if(count == 2) {
			if(a==c) c = b;
			System.out.print("Two different colors: "+a+" and "+c+".");
		}
		if(count == 1) {
			System.out.print("One different color: "+a+".");
		}
		in.close();
	}
}

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

#include<iostream>
int main()
{
int a[5],i,c=0,b[i],j;
for(i=0;i<3;i++)
{
cin>>a[i];
}
for(i=0;i<2;i++)
{
for(j=(i+1);j<3;j++)
{
if(a[i]!=a[j])
c++;
}
}
cout<<c;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 | cin>>a[i];
      | ^~~
      | 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:17:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 | cout<<c;
      | ^~~~
      | 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>
int main()
{
int a[5],i,c=0,b[i],j;
for(i=0;i<3;i++)
{
cin>>a[i];
}
for(i=0;i<2;i++)
{
for(j=(i+1);j<3;j++)
{
if(a[i]!=a[j])
c++;
}
}
cout<<c;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 | cin>>a[i];
      | ^~~
      | 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:17:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 | cout<<c;
      | ^~~~
      | 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>
int main()
{
int a[5],i,c=0,b[i];
for(i=0;i<3;i++)
{
cin>>a[i];
}
for(i=0;i<2;i++)
{
for(j=(i+1);j<3;j++)
{
if(a[i]!=a[j])
c++;
}
}
}





Compiler output:
a.cc: In function 'int main()':
a.cc:7:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 | cin>>a[i];
      | ^~~
      | 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:11:5: error: 'j' was not declared in this scope
   11 | for(j=(i+1);j<3;j++)
      |     ^
Language: C

#include<stdio.h>
void main()
{
	int a[3],b[100];
	int ct=0;
	for(int i=0;i<3;i++)
	scanf("%d",&a[i]);
	for(int i=0;i<100;i++)
	{
		b[i]=0;
		
	}
	for(int i=0;i;<3;i++)
	{
		if(b[a[i]]==0)
		{
			ct++;
			b[a[i]]=1;
		}
	}
	printf("%d\n",ct);
}

Compiler output:
main.c: In function 'main':
main.c:13:23: error: expected expression before '<' token
   13 |         for(int i=0;i;<3;i++)
      |                       ^
Language: C

#include<stdio.h>
int main(void){
  int color[3];
  int count=0;
  int i,j;
  for(i=0;i<3;i++){
    scanf("%d",&color[i]);
    if(i!=0){
      for(j=0;j<i;j++){
        if(color[i]==color[j]){
          count++;
          break;
        }
      }
    }
    int a=3-count;
    printf("%d",a);
    return 0;
  }

Compiler output:
main.c: In function 'main':
main.c:19:3: error: expected declaration or statement at end of input
   19 |   }
      |   ^
Language: C

#include<stdio.h>
int main(void){
  int color[3];
  int count=0;
  int i,j;
  for(i=0;i<3;i++){
    scanf("%d",&color[i]);
    if(i!=0){
      for(j=0;j<i;J++){
        if(color[i]==color[j]){
          count++;
          break;
        }
      }
    }
    int a=3-count;
    printf("%d",a);
    return 0;
  }

Compiler output:
main.c: In function 'main':
main.c:9:19: error: 'J' undeclared (first use in this function)
    9 |       for(j=0;j<i;J++){
      |                   ^
main.c:9:19: note: each undeclared identifier is reported only once for each function it appears in
main.c:19:3: error: expected declaration or statement at end of input
   19 |   }
      |   ^
Language: C

#include<stdio.h>
int main(void){
  int color[3];
  int count=0;
  int i;
  for(i=0;i<3;i++){
    scanf("%d",&color[i]);
    if(i!=0){
      for(j=0;j<i;J++){
        if(color[i]==color[j]){
          count++;
          break;
        }
      }
    }
    int a=3-count;
    printf("%d",a);
    return 0;
  }

Compiler output:
main.c: In function 'main':
main.c:9:11: error: 'j' undeclared (first use in this function)
    9 |       for(j=0;j<i;J++){
      |           ^
main.c:9:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:19: error: 'J' undeclared (first use in this function)
    9 |       for(j=0;j<i;J++){
      |                   ^
main.c:19:3: error: expected declaration or statement at end of input
   19 |   }
      |   ^
Language: C++

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

int main() {
  
  int a=0, b=0, c=0;
  cin >> a >> b >> c;
  
  if(a==b && a==c) {
    
    cout << "1" << endl;
    
  } else if(a!=b && a!=c && b!=c) {
    
    cout << "3" << endl;
    
  } else if {
    
    cout << "2" << endl;
    
  }
  
  return 0;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:13: error: expected '(' before '{' token
   17 |   } else if {
      |             ^
      |             (
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int a,b,c;
  cin >> a >> b >> c;
  if(a==b==c){
    cout << 1;
  }
  else if(a==b||b==c||c==a){
    cout << 2;
  }
  int e=3;
  else{
    cout << e;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:3: error: 'else' without a previous 'if'
   13 |   else{
      |   ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define pp pair<int,int>
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define ll long long
#define ld long double
#define all(a) (a).begin(),(a).end()
#define mk make_pair
ll MOD=1000000007;
ll mod=998244353;
int inf=1000001000;
ll INF=1e18+5;


int main() {
  set<int> s;
  int n,ans=0;
  cin >> n;
  rep(i,n){
    int f;
    cin >> f;
    if (s.find()==s.end()) s.insert(f);
    else ans++;
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:15: error: no matching function for call to 'std::set<int>::find()'
   22 |     if (s.find()==s.end()) s.insert(f);
      |         ~~~~~~^~
In file included from /usr/include/c++/14/set:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:158,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_set.h:806:9: note: candidate: 'template<class _Kt> decltype (std::set<_Key, _Compare, _Alloc>::iterator{((std::set<_Key, _Compare, _Alloc>*)this)->std::set<_Key, _Compare, _Alloc>::_M_t._M_find_tr(__x)}) std::set<_Key, _Compare, _Alloc>::find(const _Kt&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>]'
  806 |         find(const _Kt& __x)
      |         ^~~~
/usr/include/c++/14/bits/stl_set.h:806:9: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_set.h:812:9: note: candidate: 'template<class _Kt> decltype (std::set<_Key, _Compare, _Alloc>::const_iterator{((const std::set<_Key, _Compare, _Alloc>*)this)->std::set<_Key, _Compare, _Alloc>::_M_t._M_find_tr(__x)}) std::set<_Key, _Compare, _Alloc>::find(const _Kt&) const [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>]'
  812 |         find(const _Kt& __x) const
      |         ^~~~
/usr/include/c++/14/bits/stl_set.h:812:9: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_set.h:796:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::find(const key_type&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; iterator = std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator; key_type = int]'
  796 |       find(const key_type& __x)
      |       ^~~~
/usr/include/c++/14/bits/stl_set.h:796:7: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_set.h:800:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::const_iterator std::set<_Key, _Compare, _Alloc>::find(const key_type&) const [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; const_iterator = std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator; key_type = int]'
  800 |       find(const key_type& __x) const
      |       ^~~~
/usr/include/c++/14/bits/stl_set.h:800:7: note:   candidate expects 1 argument, 0 provided
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int64_t i=0;i < (int64_t)(n);i++)
using namespace std;

//////全探索したいときに開けよ////////
vector<vector<int>> fspattern;
vector<int> fspattern_draft;
int fspcnt = 0;

void setfspattern_core(int floor,int number,int degree){
  if(floor==degree){
    fspattern.at(fspcnt) = fspattern_draft;
    fspcnt++;
  }else{
    rep(i,number){
      fspattern_draft.at(floor) = i;
      setfspattern_core(floor+1,number,degree);
    }
  }
}

void setfspattern(int number,int degree){
  int64_t array_num = 1;
  rep(i,degree){
    array_num *= number;
  }
  fspattern = vector<vector<int>>(array_num,vector<int>(degree));
  fspattern_draft = vector<int>(degree);
  setfspattern_core(0,number,degree);
}

//////nCrのmodを求めたいときに開けよ/////////
//int64_t univMod = 1000000007;
//int64_t factnum = 100000
//vector<int64_t> modfact(factnum);
//vector<int64_t> modinvfact(factnum);

/*void setmodfact(){
  for(int i=0;i<factnum;i++){
    if(i == 0){
      modfact.at(i) = 1;
    }else{
      modfact.at(i) = (modfact.at(i-1)*i)%univMod;
    }
  }
}

int64_t calcmodpower(int64_t a,int64_t n){
  int64_t res = 1;
  while(n != 0){
    if(n & 1){
      res = (res * a) % univMod;
    }
    a = (a*a) % univMod;
    n = n >> 1;
  }
  return res;
}

int64_t calcinverse(int64_t n){
	return calcmodpower(n,univMod-2);
}

void setmodinvfact(){
  for(int i=0;i<factnum;i++){
    if(i==0){
      modinvfact.at(i) = 1;
    }else{
      modinvfact.at(i) = calcmodpower(modfact.at(i),univMod-2);
    }
  }
}

int64_t calcmodcomb(int64_t n,int64_t r){
  return (((modfact.at(n)*modinvfact.at(r))%univMod)*modinvfact.at(n-r))%univMod;
}

int64_t calcmodpositive(int64_t n){
  return (n + ((abs(n)+univMod-1)/univMod)*univMod)%univMod;
}
  
    */



int64_t calcGCD(int64_t a,int64_t b){
	int64_t p = a;
	int64_t q = b;
	int64_t c = a%b;
	while(c != 0){
		p = q;
		q = c;
		c = p%q;
	}
	return q;
}


int main(){
  set<int> s;
  rep(i,3){
    int h;
    cin >> h;
    s.insert(h);
  }
  cout << s.size() << endl;
}
    
  
}

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

#include<iostream>
int a[4],ans[105],ak;
main()
{
    for(int i=1;i<=3;i++){
        cin>>a[i];
        ans[a[i]]++;
    }
    for(int i=1;i<=103;i++){
        if(ans[i]>0) ak++;
    }
    cout<<ak<<endl;
    return 0;
}

Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |         cin>>a[i];
      |         ^~~
      |         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:12:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |     cout<<ak<<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:12:15: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   12 |     cout<<ak<<endl;
      |               ^~~~
      |               std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: Java

import java.util.Scanner;

public class main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b =sc.nextInt();
		int c = sc.nextInt();
		int ans = 0;
		if(a == b) {
			if(b == c) ans = 1;
			else ans = 2;
		}else if(b == c) {
			ans = 2;
		}else if(a == c){
			ans = 2;
		}else {
			ans = 3;
		}
		System.out.println(ans);
		sc.close();
	}
}

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

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

int main() {
  int a,b,c;
  cin >> a >> b >> c ;
  int ans =3;
  if(a==c)
   ans--;
  if(a==b)
    ans--;
  if(c== b)
    ans--;
  if((a == b) && (b == c))
    ans ++ 
  cout << ans ;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:11: error: expected ';' before 'cout'
   15 |     ans ++
      |           ^
      |           ;
   16 |   cout << ans ;
      |   ~~~~
Language: C++

#include <iostream>

using namespace std;

int main(){
  cin>>a>>b>>c;
  cout<<1+(a!=b)+(b!=c&&a!=c);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: 'a' was not declared in this scope
    6 |   cin>>a>>b>>c;
      |        ^
a.cc:6:11: error: 'b' was not declared in this scope
    6 |   cin>>a>>b>>c;
      |           ^
a.cc:6:14: error: 'c' was not declared in this scope
    6 |   cin>>a>>b>>c;
      |              ^
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args) {
    Set colorSet = new Set();
    Scanner sc = new Scanner(System.in);
    int color1 = sc.nextInt();
    int color2 = sc.nextInt();
    int color3 = sc.nextInt();

    colorSet.add(color1);
    color.add(color2);
    colorSet.add(color3);

    int[] colorList = colorSet.toArray();
    System.out.println(colorList.length);
  }
}


Compiler output:
Main.java:5: error: Set is abstract; cannot be instantiated
    Set colorSet = new Set();
                   ^
Main.java:12: error: cannot find symbol
    color.add(color2);
    ^
  symbol:   variable color
  location: class Main
Main.java:15: error: incompatible types: Object[] cannot be converted to int[]
    int[] colorList = colorSet.toArray();
                                      ^
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
3 errors
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args) {
    Set colorSet = new Set();
    Scanner sc = new Scanner(System.in);
    int color1 = sc.nextInt();
    int color2 = sc.nextInt();
    int color3 = sc.nextInt();

    colorSet.add(color1);
    color.add(color2);
    colorSet.add(color3);

    colorSet.toArray().length;
  }
}


Compiler output:
Main.java:15: error: not a statement
    colorSet.toArray().length;
                      ^
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long int ll
#define int ll
int32_t main(){
   int i = 3;
   set<int> myset;
   while(i--){
      int temp;
      cin>>temp;
      myset.insert(temp);
   }
   cout<<myset.size()<<endl;
}

Compiler output:
a.cc:5:1: error: expected initializer before 'int32_t'
    5 | int32_t main(){
      | ^~~~~~~
Language: Java

import java.util.*;

class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      	int a,b,c ;
      	a = sc.nextInt();
        b = sc.nextInt();
        c = sc.nextInt();
      	if(a != b && b!= c && c!=a){
        System.out.println(3)
        }else if( a==b && b==c && c==a){
          System.out.println(1);
        }else{
        System.out.println(2);
        }
    }	
}

Compiler output:
Main.java:11: error: ';' expected
        System.out.println(3)
                             ^
1 error
Language: C++

#include <iostream>
using namespace std;
int main(void){
    string str;
	vector<string> v;
  	while (getline(cin, str, ' ')) {
 		v.push_back(str);
	}
  	sort(v.begin(), v.end());
 	v.erase(unique(v.begin(), v.end()), v.end());
    cout << v.size() << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'vector' was not declared in this scope
    5 |         vector<string> v;
      |         ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:5:22: error: expected primary-expression before '>' token
    5 |         vector<string> v;
      |                      ^
a.cc:5:24: error: 'v' was not declared in this scope
    5 |         vector<string> v;
      |                        ^
a.cc:9:9: error: 'sort' was not declared in this scope; did you mean 'short'?
    9 |         sort(v.begin(), v.end());
      |         ^~~~
      |         short
a.cc:10:17: error: 'unique' was not declared in this scope
   10 |         v.erase(unique(v.begin(), v.end()), v.end());
      |                 ^~~~~~
Language: C++

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

int main() {
  int a,b,c;
  if(A!=B&&B!=C&&C!=A) cout<<3<<endl;
  else if(A==B&&B==C&&C==A) cout<<1<<endl;
  else cout<<2<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: 'A' was not declared in this scope
    6 |   if(A!=B&&B!=C&&C!=A) cout<<3<<endl;
      |      ^
a.cc:6:9: error: 'B' was not declared in this scope
    6 |   if(A!=B&&B!=C&&C!=A) cout<<3<<endl;
      |         ^
a.cc:6:15: error: 'C' was not declared in this scope
    6 |   if(A!=B&&B!=C&&C!=A) cout<<3<<endl;
      |               ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c,cnt = 0;
  cin >> a >> b >> c;
  if(a != b)
    cnt++;
  else if(a != c)
    cnt++;
  else if(b != c)
    cnt++;
  cout << cnt << endl;
}
  
}

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

import java.util.*;
import java.util.ArrayList;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      ArrayList<Integer> list = new ArrayList<Integer>();
      int a =sc.nextInt();
      int b = sc.nextInt();
      int c = sc.nextInt();
      number = 3;
      if(a == b){
      	number--;
      }
      if(a == c){
      	number --;
      }
      if(b == c){
      	number --;
      }
      if(number ==0){
      	number=1;
      }
      System.out.println(number);
    }
}


Compiler output:
Main.java:10: error: cannot find symbol
      number = 3;
      ^
  symbol:   variable number
  location: class Main
Main.java:12: error: cannot find symbol
      	number--;
      	^
  symbol:   variable number
  location: class Main
Main.java:15: error: cannot find symbol
      	number --;
      	^
  symbol:   variable number
  location: class Main
Main.java:18: error: cannot find symbol
      	number --;
      	^
  symbol:   variable number
  location: class Main
Main.java:20: error: cannot find symbol
      if(number ==0){
         ^
  symbol:   variable number
  location: class Main
Main.java:21: error: cannot find symbol
      	number=1;
      	^
  symbol:   variable number
  location: class Main
Main.java:23: error: cannot find symbol
      System.out.println(number);
                         ^
  symbol:   variable number
  location: class Main
7 errors
Language: Java

import java.util.*;
import java.util.ArrayList;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      ArrayList<Integer> list = new ArrayList<Integer>();
      int a =sc.nextInt();
      int b = sc.nextInt();
      int c = sc.nextInt();
      number = 3;
      if(a == b){
      	number--;
      }
      if(a == c){
      	number --;
      }
      if(b == c){
      	number --;
      }
      if(number ==0){
      	number=1;
      }
      System.out.println(number);
}

Compiler output:
Main.java:24: error: reached end of file while parsing
}
 ^
1 error
Language: C

#include <stdio.h>
int main(void){
	int a,b,c,sum;
	scanf("%d%d%d",&a,&b,&c);
	if(a!=b){
		sum++;
	}
	if(b!=c){
		sum++;
	}
	if(c!=a){
		sum++;
	}
	if(a==B||a==c){
		sum=1;
	}
	printf("%d",sum);
	return 0;
}	

Compiler output:
main.c: In function 'main':
main.c:14:15: error: 'B' undeclared (first use in this function)
   14 |         if(a==B||a==c){
      |               ^
main.c:14:15: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
int main(){
  int a[4];
  cin>>a[0]>>a[1]>>a[2];
  int cnt=3;
  if(a[i]==a[(i+1)%3]&&a[(i+2)%3]==a[(i+1)%3]){
    cout<<1<<endl;
    return 0;
  }
  for(int i=0;i<3;i++){
    if(a[i]==a[(i+1)%3])cnt--;
  }
  cout<<cnt<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: 'i' was not declared in this scope
    9 |   if(a[i]==a[(i+1)%3]&&a[(i+2)%3]==a[(i+1)%3]){
      |        ^
Language: C

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

int main(){
    int a,b,c;
    scanf("%d %d %d",&a,&b,&c);
 if(a == b && a==c){
   printf("1");
 }
 else if((a==b && a!=c) || (a != b && a==c))
 {
   printf("2");
 }
 else{
   printf("3");

return 0;
}


Compiler output:
main.c: In function 'main':
main.c:20:1: error: expected declaration or statement at end of input
   20 | }
      | ^
Language: Java

import java.util.*;
public class A {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		int c = Integer.parseInt(sc.next());
		int ans = 3;
		
		if(a == b) {
			ans--;
		}else if(a == c){
			ans--;
		}else if(b == c){
			ans--;
		}
		
		if(ans == 0) {
			System.out.println(1);
		}else {
			System.out.println(ans);
		}
	}
}


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

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

int main()
{
  	int a, b, c;
  	cin>>a>>b>>c;
  	map<int, int> m;
  	m[a]++;m[b]++;m[c]++;
  	int count = 0;
  	for(auto i = m.begin(); i != m.end(); i++)
    {
    	if(i -> second != 0)
          	count++;
    }
  	cout<<count<<"\n";
	return 0;
}

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

#include <iostream>
using namespace std;
int a,b,c,sum=3;
int main(){
	cin>>a>>b>>c;
	if(a==b){
		sum--;
	}
	if(b==c){
		sum--;
	}
	if(c==a){
		sum--;
	}
	if(a==b&&b==c){
		cout<<1;
		break;
	}
	cout<<sum;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:17: error: break statement not within loop or switch
   17 |                 break;
      |                 ^~~~~
Language: C++

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

int main() {
  int A, B, C;
  cin >> A >> B >> C;
  cout << (max({A, B, C})==min({A, B, C)}?"1":((A!=B&&B!=C)?"3":"2")) << endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:40: error: expected '}' before ')' token
    7 |   cout << (max({A, B, C})==min({A, B, C)}?"1":((A!=B&&B!=C)?"3":"2")) << endl;
      |                                ~       ^
a.cc:7:41: error: expected ')' before '}' token
    7 |   cout << (max({A, B, C})==min({A, B, C)}?"1":((A!=B&&B!=C)?"3":"2")) << endl;
      |           ~                             ^
      |                                         )
a.cc:7:41: error: expected ';' before '}' token
    7 |   cout << (max({A, B, C})==min({A, B, C)}?"1":((A!=B&&B!=C)?"3":"2")) << endl;
      |                                         ^
      |                                         ;
a.cc: At global scope:
a.cc:7:42: error: expected unqualified-id before '?' token
    7 |   cout << (max({A, B, C})==min({A, B, C)}?"1":((A!=B&&B!=C)?"3":"2")) << endl;
      |                                          ^
a.cc:9:1: error: expected declaration before '}' token
    9 | }
      | ^
Language: C++


// C++ implementation of the approach 
#include <bits/stdc++.h> 
using namespace std; 
  
// Function to generate and print the required string 
void generateString(int A, int B) 
{ 
    string rt; 
    while (0 < A || 0 < B) { 
  
        // More 'b', append "bba" 
        if (A < B) { 
            if (0 < B--) 
                rt.push_back('b'); 
            if (0 < B--) 
                rt.push_back('b'); 
            if (0 < A--) 
                rt.push_back('a'); 
        } 
  
        // More 'a', append "aab" 
        else if (B < A) { 
            if (0 < A--) 
                rt.push_back('a'); 
            if (0 < A--) 
                rt.push_back('a'); 
            if (0 < B--) 
                rt.push_back('b'); 
        } 
  
        // Equal number of 'a' and 'b' 
        // append "ab" 
        else { 
            if (0 < A--) 
                rt.push_back('a'); 
            if (0 < B--) 
                rt.push_back('b'); 
        } 
    } 
    cout << rt; 
} 
  
// Driver code 
int main() 
{ 
    int A = 2, B = 6; 
    generateString(A, B); 
  
    return 0; 
} 








return 0;}

Compiler output:
a.cc:60:1: error: expected unqualified-id before 'return'
   60 | return 0;}
      | ^~~~~~
a.cc:60:10: error: expected declaration before '}' token
   60 | return 0;}
      |          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int a,b,c:
  cin >> a >> b >> c;
  if(a == b && b == c){
    cout << "1" << endl;
  }else if(a == b){
    cout << "2" << endl;
  }else if(b == c){
    cout << "2" << endl;
  }else if(a == c){
    cout << "2" << endl;
  }else{
    cout << "3" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:12: error: found ':' in nested-name-specifier, expected '::'
    4 |   int a,b,c:
      |            ^
      |            ::
a.cc:4:11: error: 'c' has not been declared
    4 |   int a,b,c:
      |           ^
a.cc:5:7: error: qualified-id in declaration before '>>' token
    5 |   cin >> a >> b >> c;
      |       ^~
a.cc:6:21: error: 'c' was not declared in this scope
    6 |   if(a == b && b == c){
      |                     ^
Language: C++


#include <iostream>

using namespace std;
int main()
{

    int r,m,d;
    cin>>r>>m>>d;

    if(r==m && r==d){

        cout<<1;
    }
  else if ( (r==m && r!=d)||(r!=m && d==m)||(a==d && a!=m ))
    {

        cout<<2;
    }
else if  (r!=m && m!=d && r!=d)
    {

        cout<<3;
    }
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:46: error: 'a' was not declared in this scope
   15 |   else if ( (r==m && r!=d)||(r!=m && d==m)||(a==d && a!=m ))
      |                                              ^
Language: C++

#include <iostream>
#include <string>
#include <sstream>
#include <iomanip> 
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <queue>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <functional>
#include <algorithm>
#include <unordered_map>
#include <unordered_set>
#include <bitset>

using namespace std;

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

	int a, b, c;
	set<int> s;
	cin >> a >> b >> c;
	s.insert(a);
	s.insert(b);
	s.insert(c);

	cout << s.count();

	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:33:24: error: no matching function for call to 'std::set<int>::count()'
   33 |         cout << s.count();
      |                 ~~~~~~~^~
In file included from /usr/include/c++/14/set:63,
                 from a.cc:12:
/usr/include/c++/14/bits/stl_set.h:756:9: note: candidate: 'template<class _Kt> decltype (((const std::set<_Key, _Compare, _Alloc>*)this)->std::set<_Key, _Compare, _Alloc>::_M_t._M_count_tr(__x)) std::set<_Key, _Compare, _Alloc>::count(const _Kt&) const [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>]'
  756 |         count(const _Kt& __x) const
      |         ^~~~~
/usr/include/c++/14/bits/stl_set.h:756:9: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_set.h:750:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::size_type std::set<_Key, _Compare, _Alloc>::count(const key_type&) const [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; size_type = long unsigned int; key_type = int]'
  750 |       count(const key_type& __x) const
      |       ^~~~~
/usr/include/c++/14/bits/stl_set.h:750:7: note:   candidate expects 1 argument, 0 provided
Language: C++

#include<iostraem>
using namespace std;

int main(){
  int a, b, c;
  cin >> a >> b >> c;
  if ((a == b) && (b == c) && (c ==a))
    cout << 1 << endl;
  else if ((a == b) || (b == c) || (c == a))
    cout << 2 << endl;
  else 
    cout << 3 << endl;
  
  return 0;
}

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

#include <vector>
#include <iostream>
#include <algorithm>
#include <functional>
#include <string>
#include <limits.h>
#include <cmath>
#include <queue>
#include <map>
#include <iomanip>
#include <random>
#include <fstream>
#define rep(i, n) for (int i = 0; i < n; i++)
#define PI 3.14159265358979323846
#define MOD 1000000007
using namespace std;
using ll = long long;

const int MAX = 1000000;

ll fac[MAX], finv[MAX], inv[MAX];

// テーブルを作る前処理
void COMinit() {
  fac[0] = fac[1] = 1;
  finv[0] = finv[1] = 1;
  inv[1] = 1;
  for (int i = 2; i < MAX; i++){
    fac[i] = fac[i - 1] * i % MOD;
    inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
    finv[i] = finv[i - 1] * inv[i] % MOD;
  }
}

// 二項係数計算
long long COM(int n, int k){
  if (n < k) return 0;
  if (n < 0 || k < 0) return 0;
  return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

ll gcd(ll a, ll b)
{
  ll r;
  while ((r = a % b))
  {
    a = b;
    b = r;
  }
  return b;
}

template <class T> struct cord{
  T x,y;
};

template <class T> double dist(cord<T> a, cord<T> b){
  T dx=a.x-b.x;
  T dy=a.y-b.y;
  return sqrt(dx*dx+dy*dy);
}

int main()
{

  //cout << fixed << setprecision(10);

  vector<int> color(3);
  rep(i,3){cin>>color[i];}
  sort(color.begin(),color.end());
  if (a==b && b==c){cout << 1;}
  else if (a==b || b==c){cout << 2;}
  else {cout << 3;}

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:71:7: error: 'a' was not declared in this scope
   71 |   if (a==b && b==c){cout << 1;}
      |       ^
a.cc:71:10: error: 'b' was not declared in this scope
   71 |   if (a==b && b==c){cout << 1;}
      |          ^
a.cc:71:18: error: 'c' was not declared in this scope
   71 |   if (a==b && b==c){cout << 1;}
      |                  ^
Language: C++

#include<stdio.h>
int main()
{
	int a[3]={0};
	int i,j,x,;
	int k=1;
	for(i=0;i<3;i++){
	scanf("%d",&x);
	a[i]=x;}
	for(i=0;i<2;i++)
	{
		for(j=i+1;j<3;j++)
		{
			if(a[i]!=a[j])
			k++;
		}
	}
	printf("%d\n",k);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:19: error: expected unqualified-id before ';' token
    5 |         int i,j,x,;
      |                   ^
Language: C++

#include<stdio.h>
int main()
{
	int a[3]={0};
	int i,j,x,;
	int k=0;
	for(i=0;i<3;i++){
	scanf("%d",&x);
	a[i]=x;}
	for(i=0;i<3;i++)
	{
		for(j=i+1;j<3;j++)
		{
			if(a[i]!=a[j])
			k++;
		}
	}
	printf("%d\n",k);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:19: error: expected unqualified-id before ';' token
    5 |         int i,j,x,;
      |                   ^
Language: C

#include <stdio.h>
int main1()
{
	int a,b,c;
	scanf("%d%d%d",&a,&b,&c);
	if(a==b||a==c||b==c)
	{
		printf("2");
	}
	else if(a==b&&b==c)
	{
		printf("1");
	}
	else
	{
		printf("1");
	}
	return 0;
} 


Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

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

int a;
set<int> s;
int main(){
     for(int i = 0; i < n; i++){ cin >> a; s.insert(a); }
     cout << s.size();
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:25: error: 'n' was not declared in this scope
    7 |      for(int i = 0; i < n; i++){ cin >> a; s.insert(a); }
      |                         ^
Language: C++

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

int main(){
  int a,b,c;
  int answer;
  cin >> a >> b >> c;
  if(a==b && b==c)
    answer = 1;
  else if(a!=b && b!=c)
    answer = 3;
  else
    answer = 2;
  cout << answer << endl;
}


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

#include<iostream>
#include <algorithm>
#define syso(s) std::cout<<s<<endl;
#define sc(i) std::cin>>i;
using namespace std;
int main() {
	int a, b, c;
	int count = 0;
	sc(a)
	sc(b)
	sc(c)
	if (a == b) {
		count++;
	}
	if (b == c) {
		count++;
	}
	if (c == a) {
		count++;
	}
	if (count == 3) {
		count--;
	}
	syso(3-count)
	return 0;
}


Compiler output:
Main.java:1: error: illegal character: '#'
#include<iostream>
^
Main.java:2: error: illegal character: '#'
#include <algorithm>
^
Main.java:3: error: illegal character: '#'
#define syso(s) std::cout<<s<<endl;
^
Main.java:4: error: illegal character: '#'
#define sc(i) std::cin>>i;
^
Main.java:4: error: class, interface, enum, or record expected
#define sc(i) std::cin>>i;
        ^
Main.java:5: error: class, interface, enum, or record expected
using namespace std;
^
Main.java:6: error: unnamed classes are a preview feature and are disabled by default.
int main() {
^
  (use --enable-preview to enable unnamed classes)
Main.java:9: error: ';' expected
	sc(a)
	     ^
Main.java:10: error: ';' expected
	sc(b)
	     ^
Main.java:11: error: ';' expected
	sc(c)
	     ^
Main.java:24: error: ';' expected
	syso(3-count)
	             ^
11 errors
Language: C++

import java.util.Scanner;
public class Main {
	static Scanner scan=new Scanner(System.in);
	static int gcd (int a, int b) {return b>0?gcd(b,a%b):a;}
	static long lcm (int a, int b) {return a*b/gcd(a,b);}
	static int max(int a,int b) {return a>b?a:b;}
	static int min(int a,int b) {return a<b?a:b;}
	static long factorial(int i) {return i==1?1:i*factorial(i-1);}
	static int lower_bound(int a[],int key) {
		int low=0,high=a.length;
		while(low<high) {
			int mid=((high-low)/2)+low;
			if(a[mid]<=key)low=mid+1;
			else high=mid;
		}
		return high;
		}
	static int upper_bound(int a[],int key) {
		int low=0,high=a.length;
		while(low<high) {
			int mid=((high-low)/2)+low;
			if(a[mid]<key)low=mid+1;
			else high=mid;
		}
		return high;
		}
	static boolean isPrime (int n) {
		if (n==2) return true;
		if (n<2 || n%2==0) return false;
		double d = Math.sqrt(n);
		for (int i=3; i<=d; i+=2)if(n%i==0){return false;}
		return true;
	}
	static int upper_division(int a,int b) {
		if(a%b==0) {
			return a/b;
		}
		else {
			return a/b+1;
		}
	}
	static long lupper_division(long a,long b) {
		if(a%b==0) {
			return a/b;
		}
		else {
			return a/b+1;
		}
	}
	static long lmax(long a,long b) {return Math.max(a, b);}
	static long lmin(long a,long b) {return Math.min(a, b);}
	static int[] setArray(int a) {
		int b[]=new int[a];
		for(int i=0;i<a;i++) {
			b[i]=scan.nextInt();
		}
		return b;
	}
	static String reverce(String str) {
		String strr="";
		for(int i=str.length()-1;i>=0;i--) {
			strr+=str.charAt(i);
		}
		return strr;
	}
	public static void main(String[] args) {
		int a=scan.nextInt();
		int b=scan.nextInt();
		int c=scan.nextInt();
		if(a==b&&b==c) {
			System.out.println(1);
		}
		else if(a==b||a==b||c==b) {
			System.out.println(2);
		}
		else {
			System.out.println(3);
		}
	}
}


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

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

#define int long long
#define pb emplace_back
#define mp make_pair
#define f(i,a,n) for(int i=a ; i<n ; i++)
#define F first
#define S second
#define fast ios:: sync_with_stdio(false),cin.tie(0);

int32_t main(){
	fast;
	map<int,int<m;
	int a,b,c;
	cin >> a >> b >> c;
	m[a]++ , m[b]++ , m[c]++;
	cout << m.size();
}







Compiler output:
a.cc: In function 'int32_t main()':
a.cc:4:18: error: 'long int' is not a template
    4 | #define int long long
      |                  ^~~~
a.cc:14:17: note: in expansion of macro 'int'
   14 |         map<int,int<m;
      |                 ^~~
a.cc:14:21: error: 'm' was not declared in this scope; did you mean 'tm'?
   14 |         map<int,int<m;
      |                     ^
      |                     tm
a.cc:4:18: error: template argument 2 is invalid
    4 | #define int long long
      |                  ^~~~
a.cc:14:17: note: in expansion of macro 'int'
   14 |         map<int,int<m;
      |                 ^~~
a.cc:4:18: error: template argument 4 is invalid
    4 | #define int long long
      |                  ^~~~
a.cc:14:17: note: in expansion of macro 'int'
   14 |         map<int,int<m;
      |                 ^~~
Language: C++

#include <iostream>
int main(){int a,b,c;std::cin>>a>>b>>c;std::cout<<max(1,(a!=b)+(b!=c)+(c!=a));}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:51: error: 'max' was not declared in this scope; did you mean 'std::max'?
    2 | int main(){int a,b,c;std::cin>>a>>b>>c;std::cout<<max(1,(a!=b)+(b!=c)+(c!=a));}
      |                                                   ^~~
      |                                                   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,
                 from a.cc:1:
/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,b,c,count;
  count = 0;
  if(a != b){
    count ++;
  }
  if(a != c){
    count ++;
  }
  if(c != b){
    count ++;
  }
  if (count == 0){
    count ++
  }
  cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: expected ';' before '}' token
   16 |     count ++
      |             ^
      |             ;
   17 |   }
      |   ~
Language: C

#include<stdio.h>
int main()
{
    int a,b,c;
    scanf("%d%d%d",&a,&b,&c);
    if(a==b&&b==c)
    {
    printf("1\n");
    }
    if(a==b&&a!=c)
    {
    printf("2\n");
    }
    if(a!=b&&b==c)
    {
    printf("2\n");
    }
    if(a!=b&&a==c)
    {
    printf("2\n");
    }
    if(a!=b&&b!=c&&a!=c)
    {
    printf("3\n")
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:24:18: error: expected ';' before '}' token
   24 |     printf("3\n")
      |                  ^
      |                  ;
   25 |     }
      |     ~
Language: C++

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

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<stdio.h>
      | ^~~~~~~