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

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

int main() {
  string S;
  cin >> S;
  
  for(int i = 0;i < length(S);i++){
    int ans;
    ans = 0;
    
    if(S[i] == S[i+1]) {
      ans++;
    } else{
      continue;
    }
  
    return ans;
  }
  
  if(ans == 1){
    cout << "YES" << endl;
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:21: error: 'length' was not declared in this scope
    9 |   for(int i = 0;i < length(S);i++){
      |                     ^~~~~~
a.cc:22:6: error: 'ans' was not declared in this scope; did you mean 'abs'?
   22 |   if(ans == 1){
      |      ^~~
      |      abs
Language: C++

#include<iostream>
 
using namespace std;

int main(){
    string s; cin >> s;
    sort(s.begin(), s.end());                                          
    s[0] == s[1] && s[2] == s[3] && s[1] != s[2]
    ? cout << "Yes" : cout << "No";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'sort' was not declared in this scope; did you mean 'short'?
    7 |     sort(s.begin(), s.end());
      |     ^~~~
      |     short
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
#include <string>
#include <array>
#include <vector>
#include <functional>
#include <unordered_map>
#include <map>
#include <numeric>
#include <limits>
#include <utility>
#include <queue>
#include <random>
#include <bitset>
#include <memory>
#include <complex>
#include<fstream>
using namespace std;
typedef long long LL;

int main(void)
{
	string s;
	cin >>s;
	sort(s.begin(),s.end());
	if (s[0] == s[1] && s[1] != s[2] && s[2] == s[3]) {
		cout <<"Yes"<<endl

	}
	else {
		cout <<"No"<<endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:35: error: expected ';' before '}' token
   28 |                 cout <<"Yes"<<endl
      |                                   ^
      |                                   ;
   29 | 
   30 |         }
      |         ~
Language: C

#include<stdio.h>
#include<string.h>
int main()
{
	char S[5]="\0";
	gets(S);
	if(S(0)==S(1) && S(2)==S(3))
		printf("Yes");
	else if(S(0)==S(2) && S(1)==S(3))
		printf("Yes");
	else
		printf("No");
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    6 |         gets(S);
      |         ^~~~
      |         fgets
main.c:7:12: error: called object 'S' is not a function or function pointer
    7 |         if(S(0)==S(1) && S(2)==S(3))
      |            ^
main.c:5:14: note: declared here
    5 |         char S[5]="\0";
      |              ^
main.c:7:18: error: called object 'S' is not a function or function pointer
    7 |         if(S(0)==S(1) && S(2)==S(3))
      |                  ^
main.c:5:14: note: declared here
    5 |         char S[5]="\0";
      |              ^
main.c:7:26: error: called object 'S' is not a function or function pointer
    7 |         if(S(0)==S(1) && S(2)==S(3))
      |                          ^
main.c:5:14: note: declared here
    5 |         char S[5]="\0";
      |              ^
main.c:7:32: error: called object 'S' is not a function or function pointer
    7 |         if(S(0)==S(1) && S(2)==S(3))
      |                                ^
main.c:5:14: note: declared here
    5 |         char S[5]="\0";
      |              ^
main.c:9:17: error: called object 'S' is not a function or function pointer
    9 |         else if(S(0)==S(2) && S(1)==S(3))
      |                 ^
main.c:5:14: note: declared here
    5 |         char S[5]="\0";
      |              ^
main.c:9:23: error: called object 'S' is not a function or function pointer
    9 |         else if(S(0)==S(2) && S(1)==S(3))
      |                       ^
main.c:5:14: note: declared here
    5 |         char S[5]="\0";
      |              ^
main.c:9:31: error: called object 'S' is not a function or function pointer
    9 |         else if(S(0)==S(2) && S(1)==S(3))
      |                               ^
main.c:5:14: note: declared here
    5 |         char S[5]="\0";
      |              ^
main.c:9:37: error: called object 'S' is not a function or function pointer
    9 |         else if(S(0)==S(2) && S(1)==S(3))
      |                                     ^
main.c:5:14: note: declared here
    5 |         char S[5]="\0";
      |              ^
Language: C

#include<stdio.h>
int main()
{
	char S[5]="\0";
	gets(S);
	if(S(0)==S(1) && S(2)==S(3))
		printf("Yes");
	else if(S(0)==S(2) && S(1)==S(3))
		printf("Yes");
	else
		printf("No");
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    5 |         gets(S);
      |         ^~~~
      |         fgets
main.c:6:12: error: called object 'S' is not a function or function pointer
    6 |         if(S(0)==S(1) && S(2)==S(3))
      |            ^
main.c:4:14: note: declared here
    4 |         char S[5]="\0";
      |              ^
main.c:6:18: error: called object 'S' is not a function or function pointer
    6 |         if(S(0)==S(1) && S(2)==S(3))
      |                  ^
main.c:4:14: note: declared here
    4 |         char S[5]="\0";
      |              ^
main.c:6:26: error: called object 'S' is not a function or function pointer
    6 |         if(S(0)==S(1) && S(2)==S(3))
      |                          ^
main.c:4:14: note: declared here
    4 |         char S[5]="\0";
      |              ^
main.c:6:32: error: called object 'S' is not a function or function pointer
    6 |         if(S(0)==S(1) && S(2)==S(3))
      |                                ^
main.c:4:14: note: declared here
    4 |         char S[5]="\0";
      |              ^
main.c:8:17: error: called object 'S' is not a function or function pointer
    8 |         else if(S(0)==S(2) && S(1)==S(3))
      |                 ^
main.c:4:14: note: declared here
    4 |         char S[5]="\0";
      |              ^
main.c:8:23: error: called object 'S' is not a function or function pointer
    8 |         else if(S(0)==S(2) && S(1)==S(3))
      |                       ^
main.c:4:14: note: declared here
    4 |         char S[5]="\0";
      |              ^
main.c:8:31: error: called object 'S' is not a function or function pointer
    8 |         else if(S(0)==S(2) && S(1)==S(3))
      |                               ^
main.c:4:14: note: declared here
    4 |         char S[5]="\0";
      |              ^
main.c:8:37: error: called object 'S' is not a function or function pointer
    8 |         else if(S(0)==S(2) && S(1)==S(3))
      |                                     ^
main.c:4:14: note: declared here
    4 |         char S[5]="\0";
      |              ^
Language: C++

#include <bits\stdc++.h>
using namespace std;
int main(){
  string s;
  cin >> s;
  sort(s.begin(),s.end());
  if(s[0]==s[1]&&s[1]!=s[2]&&s[2]==s[3])
    cout<<"Yes";
  else cout << "No";
  return 0;
}

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

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

int main(){
  string S;
  cin >> S;
  
  for(int i=0; i<4; i++){
    int cnt = 0;
    for(int j=0; j<4; j++){
      if(S[i]==S[j]){
        cnt++;
      }
    }
    if(cnt != 2){
      cout << "No";
      return 0;
    }
  }
  
  cout << "Yes";
  return 0;
}

Compiler output:
a.cc:2:17: error: 'sta' is not a namespace-name
    2 | using namespace sta;
      |                 ^~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string S;
      |   ^~~~~~
a.cc:5:3: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> S;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:10: error: 'S' was not declared in this scope
    6 |   cin >> S;
      |          ^
a.cc:16:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |       cout << "No";
      |       ^~~~
      |       std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:21:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   21 |   cout << "Yes";
      |   ^~~~
      |   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 <iostream>
#include <iomanip>
#include <string>
using namespace std;

int main() {
	int i, j, c = 0;
	string S;
	cin >> S;
	for (i = 0; i <= 3; i++) {
		for(j=0;j<=3;j++)
			if (S[j] == S[i])
				c++;
	}
	if (c == 8)
		cout << "Yes" << endl;
	else
		cout << "No" << endl;
	return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:19:18: error: expected '}' at end of input
   19 |         return 0;
      |                  ^
a.cc:6:12: note: to match this '{'
    6 | int main() {
      |            ^
Language: C++

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

int main(){
               string S;cin >> S;
               int flag=0;
               for (int i=0;i < 4; i++) {
                              for (int j = 0; j < 4; j++) {
                                             if (S[i] == S[j])flag++
                              }
               }
               if (flag == 4){
                              cout << "Yes" <<endl;
               }else{
                              cout << "No" <<endl;
               }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:69: error: expected ';' before '}' token
   10 |                                              if (S[i] == S[j])flag++
      |                                                                     ^
      |                                                                     ;
   11 |                               }
      |                               ~
Language: C++

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

int main(){
               String S;cin >> S;
               int flag=0;
               for (int i=0;i < 4; i++) {
                              for (int j = 0; j < 4; j++) {
                                             if (S[i] == S[j])flag++
                              }
               }
               if (flag == 4){
                              cout << "Yes" <<endl;
               }else{
                              cout << "No" <<endl;
               }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:16: error: 'String' was not declared in this scope
    6 |                String S;cin >> S;
      |                ^~~~~~
a.cc:6:32: error: 'S' was not declared in this scope
    6 |                String S;cin >> S;
      |                                ^
a.cc:10:69: error: expected ';' before '}' token
   10 |                                              if (S[i] == S[j])flag++
      |                                                                     ^
      |                                                                     ;
   11 |                               }
      |                               ~
Language: C++

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

int main(){
               String S;cin >> S;
               int flag;
               for (int i=0;i < 4; i++) {
                              for (int j = 0; j < 4; j++) {
                                             if (S[i] == S[j])flag++
                              }
               }
               if (flag == 4){
                              cout << "Yes" <<endl;
               }else{
                              cout << "No" <<endl;
               }
}


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

import java.util.Scanner;

public class ABC132A{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String S = sc.next();

        String str1 = S.substring(0, 1);
        String str2 = "";
        String str3 = "none";
        boolean hantei = false;
        for(int i = 1; i < S.length(); i++){
            if(str1.equals(S.substring(i, i+1))){
                hantei = true;
            }else{
                if(str2.equals("")){
                    str2 = S.substring(i, i+1);
                }else{
                    str3 = S.substring(i, i+1);
                }
            }
        }
        if(str2.equals(str3) && hantei){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
}


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

import java.util.Arrays;
import java.util.Scanner;

public class Main {

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        String[] arrS = s.split("");
        Arrays.sort(arrS);

        boolean result = arrS[0].equals(arrS[1]) && arrS[2].equals(arrS[3]) && !arrS[0].equals(arrS[2);

        System.out.println(result ? "Yes" : "No");
    }
}


Compiler output:
Main.java:14: error: ']' expected
        boolean result = arrS[0].equals(arrS[1]) && arrS[2].equals(arrS[3]) && !arrS[0].equals(arrS[2);
                                                                                                     ^
1 error
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main()
{
  char a = '\0', b = '\0';
  char* str[5] = "";
  scanf("%s", str);
  a = str[0];
  for(char c : str){
    if(c != a){
      b = c;
    }
  }
  
  int cnt = 0;
  for(char c : str){
    if(c == a){
      cnt++;
    }
    
    if(c == b){
      cnt++;
    }
    
  }
  
  if(cnt == 2){
    printf("Yes\n");
  }else{
    printf("No\n");
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: array must be initialized with a brace-enclosed initializer
    8 |   char* str[5] = "";
      |                  ^~
a.cc:10:12: error: invalid conversion from 'char*' to 'char' [-fpermissive]
   10 |   a = str[0];
      |       ~~~~~^
      |            |
      |            char*
a.cc:11:16: error: invalid conversion from 'char*' to 'char' [-fpermissive]
   11 |   for(char c : str){
      |                ^~~
      |                |
      |                char*
a.cc:18:16: error: invalid conversion from 'char*' to 'char' [-fpermissive]
   18 |   for(char c : str){
      |                ^~~
      |                |
      |                char*
Language: C++

#incldue <iostream>
using namespace std;

int main(void){
  int cnt[26] = {0};
  char c;
  int flg;
  
  for (int i=0; i<4; i++){
    cin >> c;
    cnt[c-'A']++;
  }
  flg = 1;
  for (int i=0; i<26; i++){
    if (cnt[i]!=0 && cnt[i]!=2) flg = 0;
  }
  cout << (flg?"Yes":"No") << endl;
  return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incldue; did you mean #include?
    1 | #incldue <iostream>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:10:5: error: 'cin' was not declared in this scope
   10 |     cin >> c;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #incldue <iostream>
a.cc:17:3: error: 'cout' was not declared in this scope
   17 |   cout << (flg?"Yes":"No") << endl;
      |   ^~~~
a.cc:17:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:31: error: 'endl' was not declared in this scope
   17 |   cout << (flg?"Yes":"No") << endl;
      |                               ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #incldue <iostream>
Language: Java

package vj;

import java.util.Scanner;

public class vj {

	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
	     
		 String S = sc.next();
		 
		 char[] ch = new char[4];
		 for(int a=0;a<ch.length;++a)
		 {
			 ch[a] =S.charAt(a);
		 }
		 
		 int index=0;

		 for(int q=0;q<S.length()-1;++q)
		 {
			 for(int w=q+1;w<S.length();++w)
			 {
				 if(ch[q] == ch[w])
				 {
					 ++index;
				 }
			 }
		 }
		 if(index==2)
		 {
			 System.out.println("YES");
		 }
		 else
			 System.out.println("NO");
	}
	}



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



import java.util.Arrays;
import java.util.Scanner;

public class DIV3A {
 public static void main(String[] args) {
  Scanner sc=new Scanner(System.in);
  String str=sc.next();
  
  char[] arr=str.toCharArray();
  int[] nums=new int[4];
  for(int i=0;i<nums.length;i++) {
   nums[i]=(int)arr[i];
  }
  Arrays.sort(nums);
  if(nums[0]!=nums[3] && nums[0]==nums[1] && nums[2]==nums[3]) {
   System.out.println("Yes");
  }else {
   System.out.println("No");
  }
  
 }
}

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

#include <iostream>
#include <string>
#include <map>
using namespace std;

int main() {
    string s;
    cin >> s;
    sort(s.begin(), s.end());
    if (s[0] == s[1] && s[2] == s[3]) {
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'sort' was not declared in this scope; did you mean 'short'?
    9 |     sort(s.begin(), s.end());
      |     ^~~~
      |     short
Language: C++

using System;

class Program
{
    static void Main(string[] args)
    {
        var s = Console.ReadLine();

        if (s[0] == s[1] && s[1] == s[2] && s[2] == s[3])
        {
            Console.WriteLine("No");
        }
        else if (
            s[0] == s[1] && s[2] == s[3] ||
            s[0] == s[2] && s[1] == s[3] ||
            s[0] == s[3] && s[1] == s[2])
        {
            Console.WriteLine("Yes");
        }
        else
        {
            Console.WriteLine("No");
        }
    }
}


Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:5:22: error: 'string' has not been declared
    5 |     static void Main(string[] args)
      |                      ^~~~~~
a.cc:5:31: error: expected ',' or '...' before 'args'
    5 |     static void Main(string[] args)
      |                               ^~~~
a.cc:25:2: error: expected ';' after class definition
   25 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Program::Main(int*)':
a.cc:7:9: error: 'var' was not declared in this scope
    7 |         var s = Console.ReadLine();
      |         ^~~
a.cc:9:13: error: 's' was not declared in this scope
    9 |         if (s[0] == s[1] && s[1] == s[2] && s[2] == s[3])
      |             ^
a.cc:11:13: error: 'Console' was not declared in this scope
   11 |             Console.WriteLine("No");
      |             ^~~~~~~
a.cc:18:13: error: 'Console' was not declared in this scope
   18 |             Console.WriteLine("Yes");
      |             ^~~~~~~
a.cc:22:13: error: 'Console' was not declared in this scope
   22 |             Console.WriteLine("No");
      |             ^~~~~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
  char s[5];
  scanf("%s", s);
  sort(s, s+4);
  printf((s[0]==s[1] && s[1]!=s[2] && s[2]==s[3]) ? "Yes\n": "No\n");
  return  0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'sort' was not declared in this scope; did you mean 'short'?
    7 |   sort(s, s+4);
      |   ^~~~
      |   short
Language: C++

#include<iostream>
using namespace std;

int main(){
  char s[5];
  scanf("%s", s);
  sort(s, s+4);
  printf((s[0]==s[1] && s[1]!=s[2] && s[2]==s[3]) ? "Yes\n": "No\n");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'sort' was not declared in this scope; did you mean 'short'?
    7 |   sort(s, s+4);
      |   ^~~~
      |   short
Language: C++

#include<iostream>
using namespace std;

int main(){
  char s[5];
  int count = 0;
  int tmp;

  cin >> s;
  for(int i=0; s[i]!='\0'; i++){
    tmp = s[i];
    if(tmp == s[i+1]) count++;
  }

  if(count == 2){
    cout << "Yes";
  }else{
    count << "No";
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:11: error: invalid operands of types 'int' and 'const char [3]' to binary 'operator<<'
   18 |     count << "No";
      |     ~~~~~ ^~ ~~~~
      |     |        |
      |     int      const char [3]
Language: C++

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

int main() {
  string s;
  cin >> s;
  sort(s.begin(), s.end());
  cout << (s[0]==s[1] && s[2]==s[3] && s[1]!=s[2] ? "Yes" : "No") << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'sort' was not declared in this scope; did you mean 'short'?
    8 |   sort(s.begin(), s.end());
      |   ^~~~
      |   short
Language: C++

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

int main() {
  string s;
  cin >> s;
  sort(s.begin(), s.end());
  cout (s[0]==s[1] && s[2]==s[3] && s[1]!=s[2] ? "Yes" : "No") << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'sort' was not declared in this scope; did you mean 'short'?
    8 |   sort(s.begin(), s.end());
      |   ^~~~
      |   short
a.cc:9:8: error: no match for call to '(std::ostream {aka std::basic_ostream<char>}) (const char*)'
    9 |   cout (s[0]==s[1] && s[2]==s[3] && s[1]!=s[2] ? "Yes" : "No") << endl;
      |   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C

#include<stdio.h>

int main(void) {

	char S[4];

	scanf("%s", S);
  
  if(S[0] == S[1] == S[2] == S[3]){
    puts("No");
    return 0;
  }
    if else(S[0] == S[1] && S[2] == S[3]) {
			puts("Yes");
    }
    else if(S[0] == S[2] && S[1] == S[3]){
        puts("Yes");
    }
    else if(S[0] == S[3] && S[1] == S[2]){
	puts("Yes");
    }
    else{
      puts("No");
    }
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:13:8: error: expected '(' before 'else'
   13 |     if else(S[0] == S[1] && S[2] == S[3]) {
      |        ^~~~
      |        (
Language: C

#include<stdio.h>

int main(void) {

	char S[4];

	scanf("%s", S);
  
  if(S[0] == S[1] == S[2] == S[3]){
    puts("No");
  }
    if else(S[0] == S[1] && S[2] == S[3]) {
			puts("Yes");
    }
    else if(S[0] == S[2] && S[1] == S[3]){
        puts("Yes");
    }
    else if(S[0] == S[3] && S[1] == S[2]){
	puts("Yes");
    }
    else{
      puts("No");
    }
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:12:8: error: expected '(' before 'else'
   12 |     if else(S[0] == S[1] && S[2] == S[3]) {
      |        ^~~~
      |        (
Language: C

#include<stdio.h>

int main(void) {

	char S[4];

	scanf("%s", S);
  
  if(S[0] == S[1] == S[2] == S[3] == S[4]){
    puts("No");
  }
    if else(S[0] == S[1] && S[2] == S[3]) {
			puts("Yes");
    }
    else if(S[0] == S[2] && S[1] == S[3]){
        puts("Yes");
    }
    else if(S[0] == S[3] && S[1] == S[2]){
	puts("Yes");
    }
    else{
      puts("No");
    }
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:12:8: error: expected '(' before 'else'
   12 |     if else(S[0] == S[1] && S[2] == S[3]) {
      |        ^~~~
      |        (
Language: C

#include<stdio.h>

int main(void) {

	char S[4];

	scanf("%s", S);
      else if(S[1] == S[2] && S[3] == S[4]) {
			puts("Yes");
			return 0;
      }
      else if(S[1] == S[3] && S[2] == S[4]){
        puts("Yes");
        return 0;
      }
	puts("No");
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:7: error: 'else' without a previous 'if'
    8 |       else if(S[1] == S[2] && S[3] == S[4]) {
      |       ^~~~
Language: C++

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

int main(){
  vector<string> S(4);
  for(int i;S){
    cin >> S.at(i);
  }
    
  sort(S.begin(),S.end());
    
  if(S.at(1)==S.at(2) && S.at(3)==S.at(4)){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: could not convert 'S' from 'std::vector<std::__cxx11::basic_string<char> >' to 'bool'
    6 |   for(int i;S){
      |             ^
      |             |
      |             std::vector<std::__cxx11::basic_string<char> >
a.cc:6:14: error: expected ';' before ')' token
    6 |   for(int i;S){
      |              ^
      |              ;
Language: C

#include <stdio.h>

int main(void){
  
  char S[];
  
  scanf("%d",S);
  
  for(int i = 0; i < 4; ++i){
    for(int j = i + 1; j < 4; ++j){
      if(s[i] == s[j]){
        puts("Yes");
      }
      else{
        puts("No");
      }
    }
  }
  
  return 0;
}
        
      

Compiler output:
main.c: In function 'main':
main.c:5:8: error: array size missing in 'S'
    5 |   char S[];
      |        ^
main.c:11:10: error: 's' undeclared (first use in this function)
   11 |       if(s[i] == s[j]){
      |          ^
main.c:11:10: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main()
{
    char a[4];

    scanf("%s",a);

    int i,j,c=0;

    for(i=0;i<4;i++)
        for(j=i+1;j<4;j++)
    {
        if(a[i]==a[j])
            c++;
    }

    if(c==2)
        printf("Yes");
    else
        printf("No");
    
    return 0:
}

Compiler output:
main.c: In function 'main':
main.c:23:13: error: expected ';' before ':' token
   23 |     return 0:
      |             ^
      |             ;
Language: C

#include <stdio.h>

int main()
{
    char a[4];

    scanf("%s",a);

    int i,j,c=0;

    for(i=0;i<4;i++)
        for(j=i+1;j<4;j++)
    {
        if(a[i]==a[j])
            c++;
    }

    if(c==2)
        printf("YES");
    else
        printf("NO");
    
    return 0:
}

Compiler output:
main.c: In function 'main':
main.c:23:13: error: expected ';' before ':' token
   23 |     return 0:
      |             ^
      |             ;
Language: C++

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

int main() {
  string s;
  cin >> s;
  sort(s.begin(),s.end());
  
  if(s[0] == s[1] && s[2] == s[3]){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
}


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

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

int main(){
  string s;cin >> s;
  int suma=0;
  if(s.at(0)==s.at(1)){
    if(s.at(2)==s.at(3) && s.at(0)!=s.at(2)){
      suma++;
    }
  }
  else if(s.at(0)==s.at(2)){
    if(s.at(1)==s.at(3) && s.at(0)!=s.at(1){
      suma++;
    }
  }
  else if(s.at(0)==s.at(3) && s.at(0)!=s.at(1)){
    if(s.at(1)==s.at(2) && s.at(0)){
      suma++;
    }
  }
  if(suma!=0) cout << "Yes" << endl;
  else cout << "No" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:44: error: expected ')' before '{' token
   15 |     if(s.at(1)==s.at(3) && s.at(0)!=s.at(1){
      |       ~                                    ^
      |                                            )
a.cc:18:3: error: expected primary-expression before '}' token
   18 |   }
      |   ^
Language: C++

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

int main()
{
  int counter = 0 ;
  string S;
  cin >> S;
  sort(S.begin(),S.end());
  if( S[0] == S[1] && S[2] == S[3]) cout <<"Yes" << endl;
  else cout <<  "No" <<  endl 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:30: error: expected ';' before '}' token
   11 |   else cout <<  "No" <<  endl
      |                              ^
      |                              ;
   12 | }
      | ~
Language: C++

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

int main() {
  int S;
  cin >> S;
  if(S.at(0)==S.at(1) &&S.at(2)==S.at(3)){
    cout << "Yes" <<endl;
  }
  if(S.at(0)==S.at(2) &&S.at(1)==S.at(3)){
    cout << "Yes" <<endl;
  }
  if(S.at(0)==S.at(3) &&S.at(1)==S.at(2)){
    cout << "Yes" <<endl;
  }
  else{
    cout << "No" <<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: request for member 'at' in 'S', which is of non-class type 'int'
    7 |   if(S.at(0)==S.at(1) &&S.at(2)==S.at(3)){
      |        ^~
a.cc:7:17: error: request for member 'at' in 'S', which is of non-class type 'int'
    7 |   if(S.at(0)==S.at(1) &&S.at(2)==S.at(3)){
      |                 ^~
a.cc:7:27: error: request for member 'at' in 'S', which is of non-class type 'int'
    7 |   if(S.at(0)==S.at(1) &&S.at(2)==S.at(3)){
      |                           ^~
a.cc:7:36: error: request for member 'at' in 'S', which is of non-class type 'int'
    7 |   if(S.at(0)==S.at(1) &&S.at(2)==S.at(3)){
      |                                    ^~
a.cc:10:8: error: request for member 'at' in 'S', which is of non-class type 'int'
   10 |   if(S.at(0)==S.at(2) &&S.at(1)==S.at(3)){
      |        ^~
a.cc:10:17: error: request for member 'at' in 'S', which is of non-class type 'int'
   10 |   if(S.at(0)==S.at(2) &&S.at(1)==S.at(3)){
      |                 ^~
a.cc:10:27: error: request for member 'at' in 'S', which is of non-class type 'int'
   10 |   if(S.at(0)==S.at(2) &&S.at(1)==S.at(3)){
      |                           ^~
a.cc:10:36: error: request for member 'at' in 'S', which is of non-class type 'int'
   10 |   if(S.at(0)==S.at(2) &&S.at(1)==S.at(3)){
      |                                    ^~
a.cc:13:8: error: request for member 'at' in 'S', which is of non-class type 'int'
   13 |   if(S.at(0)==S.at(3) &&S.at(1)==S.at(2)){
      |        ^~
a.cc:13:17: error: request for member 'at' in 'S', which is of non-class type 'int'
   13 |   if(S.at(0)==S.at(3) &&S.at(1)==S.at(2)){
      |                 ^~
a.cc:13:27: error: request for member 'at' in 'S', which is of non-class type 'int'
   13 |   if(S.at(0)==S.at(3) &&S.at(1)==S.at(2)){
      |                           ^~
a.cc:13:36: error: request for member 'at' in 'S', which is of non-class type 'int'
   13 |   if(S.at(0)==S.at(3) &&S.at(1)==S.at(2)){
      |                                    ^~
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
  string s,ans="No";
  cin>>s;
  if(s[0]==s[1]){
    if(s[2]==s[3]&&s[0]!=s[2]){
      ans="Yes"
    }
  }
  
  if(s[0]==s[2]){
    if(s[1]==s[3]&&s[0]!=s[1]){
      ans="Yes"
    }
  }
  
  if(s[0]==s[3]){
    if(s[1]==s[2]&&s[0]!=s[1]){
      ans="Yes"
    }
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: expected ';' before '}' token
    9 |       ans="Yes"
      |                ^
      |                ;
   10 |     }
      |     ~           
a.cc:15:16: error: expected ';' before '}' token
   15 |       ans="Yes"
      |                ^
      |                ;
   16 |     }
      |     ~           
a.cc:21:16: error: expected ';' before '}' token
   21 |       ans="Yes"
      |                ^
      |                ;
   22 |     }
      |     ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
int main(){
  string a; cin>>a;
  if(a[0]==a[1]){ if(a[0]!==a[2]){ if(a[2]==a[3]) {cout<<"Yes"<<endl;}}}
  else if(a[0]==a[2]){ if(a[0]!==a[1]){ if(a[1]==a[3]) {cout<<"Yes"<<endl;}}}
  else if(a[0]==a[3]){ if(a[0]!==a[1]){ if(a[1]==a[2]) {cout<<"Yes"<<endl;}}}
  else cout<<"No"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:28: error: expected primary-expression before '=' token
    6 |   if(a[0]==a[1]){ if(a[0]!==a[2]){ if(a[2]==a[3]) {cout<<"Yes"<<endl;}}}
      |                            ^
a.cc:7:33: error: expected primary-expression before '=' token
    7 |   else if(a[0]==a[2]){ if(a[0]!==a[1]){ if(a[1]==a[3]) {cout<<"Yes"<<endl;}}}
      |                                 ^
a.cc:8:33: error: expected primary-expression before '=' token
    8 |   else if(a[0]==a[3]){ if(a[0]!==a[1]){ if(a[1]==a[2]) {cout<<"Yes"<<endl;}}}
      |                                 ^
Language: C++

#include <iostream>
#include <string>
#include <algorithm>

using namespace std;

int main(void){
  string S;
  cin >> S;
  sort(S.begin, S.end);
  if(S[0] ==S[1] && S[1]!= S[2] && S[2] ==S[3]){
    cout << "Yes" << endl;
  } else cout << "No" << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: no matching function for call to 'sort(<unresolved overloaded function type>, <unresolved overloaded function type>)'
   10 |   sort(S.begin, S.end);
      |   ~~~~^~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_algo.h:4762:5: note: candidate: 'template<class _RAIter> void std::sort(_RAIter, _RAIter)'
 4762 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4762:5: note:   template argument deduction/substitution failed:
a.cc:10:7: note:   couldn't deduce template parameter '_RAIter'
   10 |   sort(S.begin, S.end);
      |   ~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4793:5: note: candidate: 'template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)'
 4793 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4793:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare)'
  292 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note:   candidate expects 4 arguments, 2 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator)'
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note:   candidate expects 3 arguments, 2 provided
Language: C++

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

int main(){
  string s;cin>>s;
  for(int i=0;i<26;++i) for(int j=i+1;j<26;++j){
    char a='a'+i,b='a'+j;
    string t;
    t=t+a+a+b+b;
    do{
      if(s==t){
        cout<<"Yes"<<endl;
        return 0;
    }while(next_permutation(begin(t),end(t)));
  }
  cout<<"No"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:3: error: expected 'while' before 'cout'
   16 |   cout<<"No"<<endl;
      |   ^~~~
a.cc:16:3: error: expected '(' before 'cout'
   16 |   cout<<"No"<<endl;
      |   ^~~~
      |   (
a.cc:16:19: error: expected ')' before ';' token
   16 |   cout<<"No"<<endl;
      |   ~~~~            ^
      |                   )
a.cc:17:2: error: expected '}' at end of input
   17 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: Java

import java.util.Scanner;
public class FiftyFifty {
	public static void main(String[] args) {
		Scanner sc =new Scanner(System.in);
		String S = sc.next();
		String[] SArray = S.split("");
		if(SArray[0].equals(SArray[1])&&SArray[0].equals(SArray[2])&&SArray[0].equals(SArray[3])) {
			System.out.println("Yes");
			}else if(SArray[0].equals(SArray[1])) {
			if(SArray[2].equals(SArray[3])){
				System.out.println("Yes");
			}
		}else if(SArray[0].equals(SArray[2])) {
			if(SArray[1].equals(SArray[3])){
				System.out.println("Yes");
			}
		}else if(SArray[0].equals(SArray[3])) {
			if(SArray[1].equals(SArray[2])) {
			System.out.println("Yes");
			}
		}else {
			System.out.println("No");
		}
	}

}

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

import java.util.Scanner;
public class FiftyFifty {
	public static void main(String[] args) {
		Scanner sc =new Scanner(System.in);
		String S = sc.next();
		String[] SArray = S.split("");
		if(SArray[0].equals(SArray[1])&&SArray[0].equals(SArray[2])&&SArray[0].equals(SArray[3])) {
			System.out.println("Yes");
			}else if(SArray[0].equals(SArray[1])) {
			if(SArray[2].equals(SArray[3])){
				System.out.println("Yes");
			}
		}else if(SArray[0].equals(SArray[2])) {
			if(SArray[1].equals(SArray[3])){
				System.out.println("Yes");
			}
		}else if(SArray[0].equals(SArray[3])) {
			if(SArray[1].equals(SArray[2])) {
			System.out.println("Yes");
			}
		}else{
			System.out.println("No");
		}
	}

}

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

#include<stdio.h>
int main(){
  char s[];
  scanf("%s",&s[]);
  if(s[0]==s[1]&&s[2]==s[3]){
    printf("Yes");
  }
  if(s[0]==s[2]&&s[1]==s[3]){
    printf("Yes");
  }
  if(s[0]==s[3]&&s[1]==s[2]){
    printf("Yes");
  }
  else{
    printf("No");
  } 
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:8: error: array size missing in 's'
    3 |   char s[];
      |        ^
main.c:4:17: error: expected expression before ']' token
    4 |   scanf("%s",&s[]);
      |                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  
  string s;
  cin>>s;
  
  vector<string> s(4);
  
  if(s[1]==s[2]&&s[3]==s[4]||s[1]==s[3]&&s[2]==s[4]||s[1]==s[4]&&s[2]==s[3]){
    cout<<"yes"<<endl;
    
  }
  
  else{
    cout<<"no"<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: conflicting declaration 'std::vector<std::__cxx11::basic_string<char> > s'
    9 |   vector<string> s(4);
      |                  ^
a.cc:6:10: note: previous declaration as 'std::string s'
    6 |   string s;
      |          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  
  string s;
  cin>>s;
  
  vector<string> s(4);
  
  if((s[1]==s[2]&&s[3]==s[4])||(s[1]==s[3]&&s[2]==s[4])||(s[1]==s[4]&&s[2]==s[3])){
    cout<<"yes"<<endl;
    
  }
  
  else{
    cout<<"no"<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: conflicting declaration 'std::vector<std::__cxx11::basic_string<char> > s'
    9 |   vector<string> s(4);
      |                  ^
a.cc:6:10: note: previous declaration as 'std::string s'
    6 |   string s;
      |          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  string s;
  cin>>s;
  sort(s.begin(),s.end())
  if(s[0]==s[1] && s[1]!=s[2] && s[2]==s[3]){
    cout<<"Yes"<<endl;
  }else{
    cout<<"No"<<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:26: error: expected ';' before 'if'
    6 |   sort(s.begin(),s.end())
      |                          ^
      |                          ;
    7 |   if(s[0]==s[1] && s[1]!=s[2] && s[2]==s[3]){
      |   ~~                      
a.cc:9:4: error: 'else' without a previous 'if'
    9 |   }else{
      |    ^~~~
Language: C++

s = input()
if s[0] == s[1] and s[2] == s[3] or s[1] == s[2] and s[0] == s[3] or s[0] == s[2] and s[1] == s[3]:
    print("Yes")
else:
    print("No")

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

#include<stdio.h>
int main(void){
  char s[4];
  scanf("%s",&s);
  int count=0;
  
  for(int i=0;i<4;i++){
    for(int j=i;j<4;j++){
      if(s[i]==s[j]){
        count++;
      }
    }
  }
  if(count==6){
    printf("Yes");
  }else{
    pritnf("No");
  }
  return 0;
}

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

#include<stdioh>
int main(void){
  char s[4];
  scanf("%s",&s);
  int count=0;
  
  for(int i=0;i<4;i++){
    for(int j=i;j<4;j++){
      if(s[i]==s[j]){
        count++;
      }
    }
  }
  if(count==6){
    printf("Yes");
  }else{
    pritnf("No");
  }
  return 0;
}

        

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

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

int main()
{
  string a;
  string b;
  string c;
  
  cin >> a;
  
  if(a[0] == a[1] && a[2] == a[3]){
    cout<<"Yes"<<endl;
  }else if(a[0] == a[2] && a[1] == a[3]){
    cout<<"Yes"<<endl;
  }else if(a[0] == a[3] %% a[1] == a[2]){
    cout<<"Yes"<<endl;
  }else{
    cout<<"No"<<endl;
  }
}
                                     
           
  


Compiler output:
a.cc: In function 'int main()':
a.cc:17:26: error: expected primary-expression before '%' token
   17 |   }else if(a[0] == a[3] %% a[1] == a[2]){
      |                          ^
Language: C++

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

int main()
{
  int f = 0;
  string a;
  string b;
  string c;
  
  cin >> a;
  
  strcpy(b[0], a[0]);
  
  for(int i = 1; i < a.size(); i++){
    if(b[0] == a[i]){
      strcpy(b, a[i]);
    }else if(c.size == 0 || c[0] == a[i]){
      strcpy(c[0], a[i]);
    }else
      f++;
    }
  }
  if(f == 1){
    cout<<"No"<<endl;
  }else{
    cout<<"Yes"<<endl;
  }
}







Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: 'strcpy' was not declared in this scope
   14 |   strcpy(b[0], a[0]);
      |   ^~~~~~
a.cc:2:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | #include<string>
a.cc:19:16: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   19 |     }else if(c.size == 0 || c[0] == a[i]){
      |              ~~^~~~
      |                    ()
a.cc: At global scope:
a.cc:25:3: error: expected unqualified-id before 'if'
   25 |   if(f == 1){
      |   ^~
a.cc:27:4: error: expected unqualified-id before 'else'
   27 |   }else{
      |    ^~~~
a.cc:30:1: error: expected declaration before '}' token
   30 | }
      | ^
Language: Java

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		char[] input= sc.next().toCharArray();
		Map<Character,Integer> map  = new HashMap<Character,Integer>();
		for(int i=0;i<input.length;i++) {
			if(!map.containsKey(input[i])) {
				map.put(input[i],0);
			}else {
				map.put(input[i],map.get(input[i])+1);
				if(map.get(input[i])>=2)System.out.println("No");
			}
		}
		if(map.size()!=2) System.out.println("No"); return;
		System.out.println("Yes");
	}
}


Compiler output:
Main.java:20: error: unreachable statement
		System.out.println("Yes");
		^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string a;
  cin >> a;
  if ((a[0]==a[1]&&a[2]==a[3]&&a[0]!=a[2])||(a[0]==a[2]&&a[1]==a[3]&&a[0]!=a[1])||(a[0]==a[3]&&a[1]==a[2]&&a[0]!=a[1]){
    cout << "Yes" << endl;
  }
      else {
        cout << "No" << endl;
      }
      }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:119: error: expected ')' before '{' token
    7 |   if ((a[0]==a[1]&&a[2]==a[3]&&a[0]!=a[2])||(a[0]==a[2]&&a[1]==a[3]&&a[0]!=a[1])||(a[0]==a[3]&&a[1]==a[2]&&a[0]!=a[1]){
      |      ~                                                                                                                ^
      |                                                                                                                       )
a.cc:13:7: error: expected primary-expression before '}' token
   13 |       }
      |       ^
Language: C

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

  char s[4];
  scanf("%s",s);
  int i,c[27]={0};
  for(i=0;i<4;i++)
    c[s[i]-'A']++;
  for(i=0;i<27;i++){
    if(c[i]==||c[i]==0);
    else{
      puts("No\n");
      return 0;
    }
  }
  puts("Yes\n");
  return 0;
}



Compiler output:
main.c: In function 'main':
main.c:10:14: error: expected expression before '||' token
   10 |     if(c[i]==||c[i]==0);
      |              ^~
Language: C

#include<stdio.h>
#include<string.h>
int main()
{
   char c[4];
  char a;
  scanf("%s",c);
  int i,j;
  for(i=0;i<3;i++)
  {
     for(j=i;j<4;j++)
     {
         if(c[i]>=c[j])
         {
             a=c[i];
           c[i]=c[j];
           c[j]=a;
         }
     }
  }
  if(c[0]==c[1]&&c[2]==c[3])
    printf("YES");
  else
    printf("NO");
  return 0;

Compiler output:
main.c: In function 'main':
main.c:25:3: error: expected declaration or statement at end of input
   25 |   return 0;
      |   ^~~~~~
Language: C

#include<stdio.h>
#include<string.h>
int main()
{
   char c[5];
  char a;
  scanf("%s",c);
  int i,j;
  for(i=0;i<3;i++)
  {
     for(j=i;j<4;j++)
     {
         if(c[i]>=c[j])
         {
             a=c[i];
           c[i]=c[j];
           c[j]=a;
         }
     }
  }
  if(c[0]==c[1]&&c[2]==c[3])
    printf("YES");
  else
    printf("NO");
  return 0;

Compiler output:
main.c: In function 'main':
main.c:25:3: error: expected declaration or statement at end of input
   25 |   return 0;
      |   ^~~~~~
Language: C++

#include<stdio.h>
2 #include<algorithm>
3 using namespace std;
4 int main()
5 {
6 char s[10];
7 scanf("%s", s);
8 if(s[0] == s[1] && s[1] != s[2] && s[2] == s[3])printf("Yes\n");
9 else if(s[0] == s[2] && s[2] != s[1] && s[1] == s[3])printf("Yes\n");
10 else if(s[0] == s[3] && s[3] != s[1] && s[1] == s[2])printf("Yes\n");
11 else printf("No\n");
12 }

Compiler output:
a.cc:2:3: error: stray '#' in program
    2 | 2 #include<algorithm>
      |   ^
a.cc:2:1: error: expected unqualified-id before numeric constant
    2 | 2 #include<algorithm>
      | ^
a.cc:4:1: error: expected unqualified-id before numeric constant
    4 | 4 int main()
      | ^
Language: C++

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


int main()
{
    string stl;
    cin >> st1;
    set<char>st;
    for(int i = 0; i < st1.length(); i++)
    {
        st.insert(st1[i]);
    }
    if(st.size() == 2)
    {
        cout << "Yes" << endl;
    }
    else
    {
        cout << "No" << endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: 'st1' was not declared in this scope; did you mean 'stl'?
    8 |     cin >> st1;
      |            ^~~
      |            stl
Language: C++

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

int main(){
  string S;
  cin >> S;
  
  if(S[0]==S[1] && S[2]==S[3] && S[0]!=S[3]){
    cout << "YES" << endl;
  }
  else if(S[0]==S[2] && S[1]==S[3] && S[0]!=S[3]){
    cout << "YES" << endl;
  }
  else if(S[0]==S[3] && S[1]==S[2] && S[0]!=S[2]){
    cout << "YES" << endl;
  }
  else{
    cout << "NO" << endl;
  }
  return 0;
}

  
  
  return 0;
}

Compiler output:
a.cc:25:3: error: expected unqualified-id before 'return'
   25 |   return 0;
      |   ^~~~~~
a.cc:26:1: error: expected declaration before '}' token
   26 | }
      | ^