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

#include <iostream>
using namespace std;

int main(int argc, char* argv[]){
        string S = "";
        while(1){
                cin >> S;
                if(S.length() != 4){
                        cout << "No\n";
                        continue;
                }
                string c1 = S.substr(0,1);
                string c2;
                int c1_num = 1;
                int c2_num = 0;
                for(int i=1; i < 4; i++){
                        if(S.compare(i,1,c1) == 0){
                                c1_num++;
                        }
                        else if(c2.length() == 0){
                                c2 = S.substr(i,1);
                                c2_num = 1;
                        }
                        else if(S.compare(i,1,c2) == 0){
                                c2_num++;
                        }
                }
                if(c1_num == 2 && c2_num == 2 && c1.compare(c2) != 0){
                        cout << "Yes\n";
                }
                else{
                        cout << "No\n";
                }
        }

        return 0;
}
~         

Compiler output:
a.cc:38:2: error: expected class-name at end of input
   38 | ~
      |  ^
Language: C++

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

int main() {

  string S;
  cin >> S;
  sort(S.begin(),A.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:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'string' was not declared in this scope
    6 |   string S;
      |   ^~~~~~
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> S;
      |   ^~~
a.cc:7:10: error: 'S' was not declared in this scope
    7 |   cin >> S;
      |          ^
a.cc:8:18: error: 'A' was not declared in this scope
    8 |   sort(S.begin(),A.end())
      |                  ^
a.cc:8:3: error: 'sort' was not declared in this scope; did you mean 'short'?
    8 |   sort(S.begin(),A.end())
      |   ^~~~
      |   short
a.cc:11:4: error: 'else' without a previous 'if'
   11 |   }else{
      |    ^~~~
a.cc:12:7: error: 'cout' was not declared in this scope
   12 |       cout << "No" << endl;
      |       ^~~~
a.cc:12:23: error: 'endl' was not declared in this scope
   12 |       cout << "No" << endl;
      |                       ^~~~
Language: C++

#include<stdio.h>

int main (int argc, char **argv){
	int n = 0;
	int p[20] = {0};
	int check = 0;
	scanf(%d,&n);
	for(int i=0;i<n;i++){
		scanf(%d,&p[i]);
	}
	for(int i=1;i<n-1;i++){
		if(p[i-1]>p[i+1]){
			if(p[i]>=p[i+1]&&p[i]<p[i-1])
				check++;
		}
		else if(p[i-1]<p[i+1]){
			if(p[i]<p[i+1]&&p[i]<=p[i-1])
				check++;
		}
		
		else if(p[i-1]==p[i+1]){
			if(p[i]<p[i+1])
				check++;
		}
	}
	printf("%d",check);
	return 0;
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:7:15: error: expected primary-expression before '%' token
    7 |         scanf(%d,&n);
      |               ^
a.cc:7:16: error: 'd' was not declared in this scope
    7 |         scanf(%d,&n);
      |                ^
a.cc:9:23: error: expected primary-expression before '%' token
    9 |                 scanf(%d,&p[i]);
      |                       ^
Language: Java

public class Main {
  public static void main(String [] args) {
    char [] s = System.console().readLine().toCharArray();
    Arrays.sort(s);
    System.out.println(((s[0] == s[1]) && (s[1] != s[2]) && (s[2] == s[3])) ? "Yes" : "No");
  }
}

Compiler output:
Main.java:4: error: cannot find symbol
    Arrays.sort(s);
    ^
  symbol:   variable Arrays
  location: class Main
1 error
Language: Java

public class Main {
  public void static main(String [] args) {
    char [] s = System.console().readLine().toCharArray();
    Arrays.sort(s);
    System.out.println(((s[0] == s[1]) && (s[1] != s[2]) && (s[2] == s[3])) ? "Yes" : "No");
  }
}

Compiler output:
Main.java:2: error: <identifier> expected
  public void static main(String [] args) {
             ^
Main.java:2: error: '(' expected
  public void static main(String [] args) {
              ^
Main.java:2: error: invalid method declaration; return type required
  public void static main(String [] args) {
                     ^
3 errors
Language: Java




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

public class A {
    String filename = "";

    final int INF = 1_000_000_000;

    void solve() {
        char[] a = readString().toCharArray();
        Arrays.sort(a);
        out.print(a[0] == a[1] && a[2] == a[3] ? "Yes" : "No");
    }

    public static void main(String[] args) throws FileNotFoundException {
        new A().run();
    }
    void run() throws FileNotFoundException {
        init();
        solve();
        out.close();
    }
    BufferedReader in;
    PrintWriter out;

    StringTokenizer tok = new StringTokenizer("");

    void init() throws FileNotFoundException {
        if(!filename.equals("")) {
            in = new BufferedReader(new FileReader(new File(filename + ".in")));
            out = new PrintWriter(new File(filename + ".out"));
            return;
        }

        in = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
    }

    String readLine(){
        try{
            return in.readLine();
        }catch (Exception e){
            throw new RuntimeException(e);
        }
    }

    String readString(){
        while(!tok.hasMoreTokens()){
            String nextLine = readLine();
            if(nextLine == null) return null;
            tok = new StringTokenizer(nextLine);
        }
        return tok.nextToken();
    }

    int readInt(){
        return Integer.parseInt(readString());
    }
    long readLong(){
        return Long.parseLong(readString());
    }
    int[] readIntArray(int n){
        int[] a = new int[n];
        for(int i = 0;i<n;i++){
            a[i] = readInt();
        }
        return a;
    }
    int[] castInt(List<Integer> list){
        int[] a = new int[list.size()];
        for(int i = 0;i<a.length;i++){
            a[i] = list.get(i);
        }
        return a;
    }
}

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

#include<bits/stdc++.h>
using namespace std;
int main(){
  char sc[4]
  string s;
  cin>>s;
  for(int i=0;i<4;i++) sc[i]=s[i];
  sort(sc,sc+4);
  if(sc[0]==sc[1]&&sc[2]==sc[3]) puts("Yes");
  else puts("No");
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: expected initializer before 'string'
    5 |   string s;
      |   ^~~~~~
a.cc:6:8: error: 's' was not declared in this scope
    6 |   cin>>s;
      |        ^
a.cc:7:24: error: 'sc' was not declared in this scope
    7 |   for(int i=0;i<4;i++) sc[i]=s[i];
      |                        ^~
a.cc:8:8: error: 'sc' was not declared in this scope
    8 |   sort(sc,sc+4);
      |        ^~
Language: C++

line = gets.chomp
str_list = line.chars.sort
puts ((str_list[0] == str_list[1]) && (str_list[2] == str_list[3])) ? "Yes" : "No"

Compiler output:
a.cc:1:1: error: 'line' does not name a type
    1 | line = gets.chomp
      | ^~~~
Language: C

int main(void){
        int i,j=0,tmp;
        char str[32];
        scanf("%s",str);
        for(i=1;i<4;i++){
                if(str[0]==str[i]){
                        j++;
                        tmp=str[1];
                        str[1]=str[i];
                        str[i]=tmp;
                }
        if(j==1){
                if(str[2]==str[3]){
                        printf("Yes");
                }
                else{
                        printf("No");

                }
        }
        else{
                printf("No");
        }
        return 0;
        }


Compiler output:
main.c: In function 'main':
main.c:4:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |         scanf("%s",str);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void){
main.c:4:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |         scanf("%s",str);
      |         ^~~~~
main.c:4:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:14:25: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   14 |                         printf("Yes");
      |                         ^~~~~~
main.c:14:25: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:14:25: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:14:25: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:17:25: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   17 |                         printf("No");
      |                         ^~~~~~
main.c:17:25: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:22:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   22 |                 printf("No");
      |                 ^~~~~~
main.c:22:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:25:9: error: expected declaration or statement at end of input
   25 |         }
      |         ^
Language: C

int main(void){
        int i,j=0,tmp;
        char str[32];
        scanf("%s",str);
        for(i=1;i<4;i++){
                if(str[0]=str[i]){
                        j++;
                        tmp=str[1];
                        str[1]=str[i];
                        str[i]=tmp;
                }
        if(j==1){
                if(str[2]==str[3]){
                        printf("Yes");
                }
                else{
                        printf("No");

                }
        }
        else{
                printf("No");
        }
        return 0;
        }


Compiler output:
main.c: In function 'main':
main.c:4:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |         scanf("%s",str);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void){
main.c:4:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |         scanf("%s",str);
      |         ^~~~~
main.c:4:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:14:25: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   14 |                         printf("Yes");
      |                         ^~~~~~
main.c:14:25: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:14:25: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:14:25: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:17:25: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   17 |                         printf("No");
      |                         ^~~~~~
main.c:17:25: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:22:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   22 |                 printf("No");
      |                 ^~~~~~
main.c:22:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:25:9: error: expected declaration or statement at end of input
   25 |         }
      |         ^
Language: C

int main(void){
        int i,j=0,tmp;
        char str[32];
        scanf("%s",str);
        for(i=1;i<4;i++){
                if(str[0]=str[i]){
                        j++;
                        tmp=str[1];
                        str[1]=str[i];
                        str[i]=tmp;
                }
        if(j==1){
                if(str[2]==str[3]){
                        printf("Yes");
                }
                else{
                        printf("No");

                }
        }
        else{
                printf("No");
        }
          return 0;
        }
                                                              19,0-1        16%


Compiler output:
main.c: In function 'main':
main.c:4:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |         scanf("%s",str);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void){
main.c:4:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |         scanf("%s",str);
      |         ^~~~~
main.c:4:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:14:25: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   14 |                         printf("Yes");
      |                         ^~~~~~
main.c:14:25: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:14:25: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:14:25: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:17:25: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   17 |                         printf("No");
      |                         ^~~~~~
main.c:17:25: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:22:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   22 |                 printf("No");
      |                 ^~~~~~
main.c:22:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:26:69: error: expected ';' before numeric constant
   26 |                                                               19,0-1        16%
      |                                                                     ^       ~~
      |                                                                     ;
main.c:26:63: error: expected declaration or statement at end of input
   26 |                                                               19,0-1        16%
      |                                                               ^~
Language: C

#include<stdio.h>
int main(void){
        int i,j=0,tmp;
        char str[32];
        scanf("%s",str);
        for(i=1;i<4;i++){
                if(str[0]=str[i]){
                        j++;
                        tmp=str[1];
                        str[1]=str[i];
                        str[i]=tmp;
                }
        if(j==1){
                if(str[2]==str[3]){
                        printf("Yes");
                }
                else{
                        printf("No");

                }
        }
        else{
                printf("No");
        }
        return 0;
        }
                                                              7,3-17       先頭


Compiler output:
main.c: In function 'main':
main.c:27:69: error: expected ';' before '\U00005148\U0000982d'
   27 |                                                               7,3-17       先頭
      |                                                                     ^      ~~~~
      |                                                                     ;
main.c:27:63: error: expected declaration or statement at end of input
   27 |                                                               7,3-17       先頭
      |                                                               ^
Language: C

    #incldue<stdio.h>
     
    int main(){
      int i, j, count=0;
      char str[4];
      
      scanf("%s", str);
      
      for(i=0; i<=3; i++){
        for(j=1; j<=3; j++){
          if(str[i] == str[j]){
            count++;
          }
        }
      }
      
      if(count == 3){
        printf("Yes");
      }else{
        printf("No");
      }
      
      return 0;
      
    }

Compiler output:
main.c:1:6: error: invalid preprocessing directive #incldue; did you mean #include?
    1 |     #incldue<stdio.h>
      |      ^~~~~~~
      |      include
main.c: In function 'main':
main.c:7:7: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    7 |       scanf("%s", str);
      |       ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 |     #incldue<stdio.h>
main.c:7:7: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    7 |       scanf("%s", str);
      |       ^~~~~
main.c:7:7: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:18:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   18 |         printf("Yes");
      |         ^~~~~~
main.c:18:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:18:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:18:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:20:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   20 |         printf("No");
      |         ^~~~~~
main.c:20:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#incldue<stdio.h>

int main(){
  int i, j, count=0;
  char str[4];
  
  scanf("%s", str);
  
  for(i=0; i<=3; i++){
    for(j=1; j<=3; j++){
      if(str[i] == str[j]){
        count++;
      }
    }
  }
  
  if(count == 2){
    printf("Yes");
  }else{
    printf("No");
  }
  
  return 0;
  
}

Compiler output:
main.c:1:2: error: invalid preprocessing directive #incldue; did you mean #include?
    1 | #incldue<stdio.h>
      |  ^~~~~~~
      |  include
main.c: In function 'main':
main.c:7:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    7 |   scanf("%s", str);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #incldue<stdio.h>
main.c:7:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    7 |   scanf("%s", str);
      |   ^~~~~
main.c:7:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:18:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   18 |     printf("Yes");
      |     ^~~~~~
main.c:18:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:18:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:18:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:20:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   20 |     printf("No");
      |     ^~~~~~
main.c:20:5: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

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

Compiler output:
main.c:1:6: error: invalid preprocessing directive #inlucde; did you mean #include?
    1 |     #inlucde<stdio.h>
      |      ^~~~~~~
      |      include
main.c: In function 'main':
main.c:6:7: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    6 |       scanf("%s", str);
      |       ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 |     #inlucde<stdio.h>
main.c:6:7: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    6 |       scanf("%s", str);
      |       ^~~~~
main.c:6:7: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:10:11: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   10 |           printf("Yes");
      |           ^~~~~~
main.c:10:11: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:10:11: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:10:11: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:14:11: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   14 |           printf("Yes");
      |           ^~~~~~
main.c:14:11: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:18:11: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   18 |           printf("Yes");
      |           ^~~~~~
main.c:18:11: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:21:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   21 |         printf("No");
      |         ^~~~~~
main.c:21:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: Java

public class Main {

	public static void main(String[] args) throws Exception {
		int[] charArray = readLine().chars().sorted().toArray();
		if (charArray[0] == charArray[1] && charArray[2] == charArray[3] && charArray[0] != charArray[2]) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
	
	private static String readLine() throws IOException {
		return new BufferedReader(new InputStreamReader(System.in)).readLine();
	}
}


Compiler output:
Main.java:12: error: cannot find symbol
	private static String readLine() throws IOException {
	                                        ^
  symbol:   class IOException
  location: class Main
Main.java:13: error: cannot find symbol
		return new BufferedReader(new InputStreamReader(System.in)).readLine();
		           ^
  symbol:   class BufferedReader
  location: class Main
Main.java:13: error: cannot find symbol
		return new BufferedReader(new InputStreamReader(System.in)).readLine();
		                              ^
  symbol:   class InputStreamReader
  location: class Main
3 errors
Language: C++

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

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inlucde; did you mean #include?
    1 | #inlucde<stdio.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: error: 'scanf' was not declared in this scope
    6 |   scanf("%s", str);
      |   ^~~~~
a.cc:10:7: error: 'printf' was not declared in this scope
   10 |       printf("Yes");
      |       ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | #inlucde<stdio.h>
a.cc:14:7: error: 'printf' was not declared in this scope
   14 |       printf("Yes");
      |       ^~~~~~
a.cc:14:7: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:18:7: error: 'printf' was not declared in this scope
   18 |       printf("Yes");
      |       ^~~~~~
a.cc:18:7: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:21:5: error: 'printf' was not declared in this scope
   21 |     printf("No");
      |     ^~~~~~
a.cc:21:5: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include<stdio.h>
#include<stdbool.h>
 
bool judge(char a, char b, char c, char d){  
  if(a == b){
    if(c == d){
      return true;
    }
  }
  return false;
}
 
int main(){
  char str[4];
  bool yesFlag;
  int i;
  
  scanf("%s", str);
  
  yesFlag = judge(str[0], str[1], str[2], str[3]);
  if(yesFlag == true){
    printf("Yes");
    return 0;
  }
  yesFlag = judge(str[0], str[2], str[3], str[1]);
  if(yesFlag == true){
    printf("Yes");
    return 0;
  }
  yesFlag = judge(str[0], str[3], str[1], str[2]);
  if(yesFlag == true){
    printf("Yes");
    return 0;
  }
  
  if(yesFlag == false){
    printf("No")
  }
 
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:17: error: expected ';' before '}' token
   37 |     printf("No")
      |                 ^
      |                 ;
   38 |   }
      |   ~
Language: C++

#inlucde<stdio.h>

int main(){
  char str[4];

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

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inlucde; did you mean #include?
    1 | #inlucde<stdio.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: error: 'scanf' was not declared in this scope
    6 |   scanf("%s", str);
      |   ^~~~~
a.cc:10:7: error: 'printf' was not declared in this scope
   10 |       printf("Yes");
      |       ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | #inlucde<stdio.h>
a.cc:14:7: error: 'printf' was not declared in this scope
   14 |       printf("Yes");
      |       ^~~~~~
a.cc:14:7: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:18:7: error: 'printf' was not declared in this scope
   18 |       printf("Yes");
      |       ^~~~~~
a.cc:18:7: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:21:5: error: 'printf' was not declared in this scope
   21 |     printf("No");
      |     ^~~~~~
a.cc:21:5: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#inlucde<stdio.h>

int main(){
  char str[4];
  
  scanf("%s", str);
  
  if(str[0] == str[1]){
    if(str[2] == str[3]){
      printf("Yes");
    }
  }else if(str[0] == str[2]){
    if(str[1] == str[3]){
      printf("Yes");
    }
  }else if(str[0] == str[3]){
    if(str[1] == str[2]){
      printf("Yes");
    }
  }else{
    printf("No");
  }

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inlucde; did you mean #include?
    1 | #inlucde<stdio.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: error: 'scanf' was not declared in this scope
    6 |   scanf("%s", str);
      |   ^~~~~
a.cc:10:7: error: 'printf' was not declared in this scope
   10 |       printf("Yes");
      |       ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | #inlucde<stdio.h>
a.cc:14:7: error: 'printf' was not declared in this scope
   14 |       printf("Yes");
      |       ^~~~~~
a.cc:14:7: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:18:7: error: 'printf' was not declared in this scope
   18 |       printf("Yes");
      |       ^~~~~~
a.cc:18:7: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:21:5: error: 'printf' was not declared in this scope
   21 |     printf("No");
      |     ^~~~~~
a.cc:21:5: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:22:4: error: expected '}' at end of input
   22 |   }
      |    ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<iostream>
#include<map>
using namespace std;
int main(){
  map<char,int> mp;
  char[5] s;
  cin>>s;
  for(int i=0;i<4;i++)
    mp[s[i]]++;
  bool flag=false;
  if(mp.size()==2){
    for(auto o: mp){
      if(o.second==2) flag=true;
    }
  }
  if(flag) cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: expected identifier before numeric constant
    6 |   char[5] s;
      |        ^
a.cc:6:8: error: expected ']' before numeric constant
    6 |   char[5] s;
      |        ^
      |        ]
a.cc:6:7: error: structured binding declaration cannot have type 'char'
    6 |   char[5] s;
      |       ^
a.cc:6:7: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:6:7: error: empty structured binding declaration
a.cc:6:11: error: expected initializer before 's'
    6 |   char[5] s;
      |           ^
a.cc:7:8: error: 's' was not declared in this scope
    7 |   cin>>s;
      |        ^
Language: Java

import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
		
      	String str = sc.next();
        
        if ((str[0].equals(str[1]) && str[2].equals(str[3]) && !str[1].equals(str[2]))
           || (str[0].equals(str[2]) && str[1].equals(str[3]) && !str[0].equals(str[1]))
           || (str[0].equals(str[3]) && str[1].equals(str[2]) && !str[0].equals(str[1]))) {
            System.out.print("Yes");
        else {
            System.out.print("No");
        } 
    }
}

Compiler output:
Main.java:13: error: 'else' without 'if'
        else {
        ^
Main.java:17: error: reached end of file while parsing
}
 ^
2 errors
Language: Java

import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
		
      	String str = sc.nextString();
        
        if ((str[0].equals(str[1] && str[2].equals(str[3]) && !str[1].equals(str[2]))
           || (str[0].equals(str[2] && str[1].equals(str[3]) && !str[0].equals(str[1]))
           || (str[0].equals(str[3] && str[1].equals(str[2]) && !str[0].equals(str[1]))) {
            System.out.print("Yes");
        else {
            System.out.print("No");
        } 
    }
}

Compiler output:
Main.java:11: error: ')' expected
           || (str[0].equals(str[3] && str[1].equals(str[2]) && !str[0].equals(str[1]))) {
                                                                                        ^
Main.java:13: error: 'else' without 'if'
        else {
        ^
Main.java:17: error: reached end of file while parsing
}
 ^
3 errors
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:44: error: expected ')' before '!' token
    8 |    if (s[0] == s[1] && s[2] == s[3] && s[0] ! = s[2]){
      |       ~                                    ^~
      |                                            )
a.cc:11:49: error: expected ')' before '!' token
   11 |    else if (s[0] == s[2] && s[1] == s[3] && s[0] ! = s[1]){
      |            ~                                    ^~
      |                                                 )
a.cc:14:49: error: expected ')' before '!' token
   14 |    else if (s[0] == s[3] && s[1] == s[2] && s[0] ! = s[1]){
      |            ~                                    ^~
      |                                                 )
a.cc:19:5: error: expected '}' at end of input
   19 |    }
      |     ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:44: error: expected ')' before '!' token
    8 |    if (s[0] == s[1] && s[2] == s[3] && s[0] ! = s[2]){
      |       ~                                    ^~
      |                                            )
a.cc:11:49: error: expected ')' before '!' token
   11 |    else if (s[0] == s[2] && s[1] == s[3] && s[0] ! = s[1]){
      |            ~                                    ^~
      |                                                 )
a.cc:14:49: error: expected ')' before '!' token
   14 |    else if (s[0] == s[3] && s[1] == s[2] && s[0] ! = s[1]){
      |            ~                                    ^~
      |                                                 )
Language: C++

#include <iostream>
#include <string>
using namespace std;
 
int main() {
  string a;
  cin >> a;
  if(a[0]==a[1] && a[2] == a[3] && a[0] != a[2]){
    cout  << "Yes" << endl;
  }
  else if (a[0] == a[2] && a[1] == a[3] && a[0] != a[1]){
  }
  else if (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:18:4: error: expected '}' at end of input
   18 |   }
      |    ^
a.cc:5:12: note: to match this '{'
    5 | int main() {
      |            ^
Language: C++

#include <iostream>
#include <string>
using namespace std;
 
int main() {
  string  a;
  cin >> a;
  if (a[0] == a[1] && a[2] == a[3] && a[0] != a[2]){
    cout << "Yes" << endl;
  }
  else if (a[0] == a[2] && a[1] == a[3] && a[0] != a[1]){
    cout << "Yes" << endl;
  }
  else if 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:14:11: error: expected '(' before 'a'
   14 |   else if a[0] == a[3] && a[1] == a[2] && a[0] != a[1]){
      |           ^
      |           (
a.cc:17:3: error: 'else' without a previous 'if'
   17 |   else{
      |   ^~~~
a.cc:19:4: error: expected '}' at end of input
   19 |   }
      |    ^
a.cc:5:12: note: to match this '{'
    5 | int main() {
      |            ^
Language: C++

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

Compiler output:
a.cc:2:20: error: expected ';' before 'int'
    2 | using namespace std
      |                    ^
      |                    ;
    3 | 
    4 | int main(){
      | ~~~                 
a.cc: In function 'int main()':
a.cc:7:44: error: expected ')' before '!' token
    7 |    if (s[0] == s[1] && s[2] == s[3] && s[0] ! = s[2]){
      |       ~                                    ^~
      |                                            )
a.cc:10:49: error: expected ')' before '!' token
   10 |    else if (s[0] == s[2] && s[1] == s[3] && s[0] ! = s[1]){
      |            ~                                    ^~
      |                                                 )
a.cc:13:49: error: expected ')' before '!' token
   13 |    else if (s[0] == s[3] && s[1] == s[2] && s[0] ! = s[1]){
      |            ~                                    ^~
      |                                                 )
Language: C++

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

Compiler output:
a.cc:2:20: error: expected ';' before 'int'
    2 | using namespace std
      |                    ^
      |                    ;
    3 | 
    4 | int main(){
      | ~~~                 
a.cc: In function 'int main()':
a.cc:7:44: error: expected ')' before '!' token
    7 |    if (s[0] == s[1] && s[2] == s[3] && s[0] ! = s[2]){
      |       ~                                    ^~
      |                                            )
a.cc:10:49: error: expected ')' before '!' token
   10 |    else if (s[0] == s[2] && s[1] == s[3] && s[0] ! = s[1]){
      |            ~                                    ^~
      |                                                 )
a.cc:13:49: error: expected ')' before '!' token
   13 |    else if (s[0] == s[3] && s[1] == s[2] && s[0] ! = s[1]){
      |            ~                                    ^~
      |                                                 )
a.cc:18:5: error: expected '}' at end of input
   18 |    }
      |     ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

Compiler output:
a.cc:3:20: error: expected ';' before 'int'
    3 | using namespace std
      |                    ^
      |                    ;
    4 | int main(){
      | ~~~
Language: C++

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

Compiler output:
a.cc:3:20: error: expected ';' before 'int'
    3 | using namespace std
      |                    ^
      |                    ;
    4 | int main(){
      | ~~~
Language: C++

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

int main(){
  string a;
  cin >> a;
  if(a[0]==a[1] && a[2] == a[3] && a[0] != a[2]){
    cout  << "Yes" << endl;
  }
  else if (a[0] == a[2] && a[1] == a[3] && a[0] != a[1]){
  }
  else if (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:18:4: error: expected '}' at end of input
   18 |   }
      |    ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

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

Compiler output:
a.cc:3:20: error: expected ';' before 'int'
    3 | using namespace std
      |                    ^
      |                    ;
    4 | int main(){
      | ~~~                 
a.cc: In function 'int main()':
a.cc:15:4: error: expected '}' before 'else'
   15 |    else{
      |    ^~~~
a.cc:13:54: note: to match this '{'
   13 |    else if (a[0]==a[3] && a[1]==a[2] && a[0] != a[1]){
      |                                                      ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:37: error: expected '}' at end of input
   14 |   cout << (flag?"Yes":"No") << endl;
      |                                     ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

Compiler output:
a.cc:3:20: error: expected ';' before 'int'
    3 | using namespace std
      |                    ^
      |                    ;
    4 | int main() {
      | ~~~                 
a.cc: In function 'int main()':
a.cc:7:3: error: expected initializer before 'cin'
    7 |   cin >> s;
      |   ^~~
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:3: error: 'flag' was not declared in this scope
    9 |   flag = (s[0]==s[1])&(s[1]!=s[2])&(s[2]==s[3]);
      |   ^~~~
Language: C++

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

Compiler output:
a.cc:3:20: error: expected ';' before 'int'
    3 | using namespace std
      |                    ^
      |                    ;
    4 | int main() {
      | ~~~                 
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.begin(),s.end());
      |   ^~~~
      |   short
a.cc:8:3: error: 'flag' was not declared in this scope
    8 |   flag = (s[0]==s[1])&(s[1]!=s[2])&(s[2]==s[3]);
      |   ^~~~
Language: C++

using namespace std;
 int main() {
    string s;
    cin >> s;
    set<char> a;
    a.insert(s[0]);
    int c1 = 1;
    for(int i=1; i<4; i++){
        a.insert(s[i]);
    if(s[0] == s[i]) c1++;
    }
    if(a.size() == 2 && c1 == 2){
        cout << "Yes" << endl;
    }
    else{
        cout << "No" << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'string' was not declared in this scope
    3 |     string s;
      |     ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | using namespace std;
a.cc:4:5: error: 'cin' was not declared in this scope
    4 |     cin >> s;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:4:12: error: 's' was not declared in this scope
    4 |     cin >> s;
      |            ^
a.cc:5:5: error: 'set' was not declared in this scope
    5 |     set<char> a;
      |     ^~~
a.cc:1:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>'
  +++ |+#include <set>
    1 | using namespace std;
a.cc:5:9: error: expected primary-expression before 'char'
    5 |     set<char> a;
      |         ^~~~
a.cc:6:5: error: 'a' was not declared in this scope
    6 |     a.insert(s[0]);
      |     ^
a.cc:13:9: error: 'cout' was not declared in this scope
   13 |         cout << "Yes" << endl;
      |         ^~~~
a.cc:13:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:26: error: 'endl' was not declared in this scope
   13 |         cout << "Yes" << endl;
      |                          ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
a.cc:16:9: error: 'cout' was not declared in this scope
   16 |         cout << "No" << endl;
      |         ^~~~
a.cc:16:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:25: error: 'endl' was not declared in this scope
   16 |         cout << "No" << endl;
      |                         ^~~~
a.cc:16:25: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include<iostream>
#include<cmath>
#include<numeric>
#include<string>

using namespace std;

int main(){

    char s[4];
    string res = "No";
    bool flg1 = false, flg2 = false;

    cin >> s;

    sort(s, s + 4);

    if(count(s, s + 2, s[0]) == 2){
        flg1 = true;
    }
    if(count(s + 3, s + 4, s[2]) == 2){
        flg2 = true;
    }

    if(flg1 && flg2){

        res = "Yes";
    }


    cout << res << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   16 |     sort(s, s + 4);
      |     ^~~~
      |     sqrt
a.cc:18:8: error: 'count' was not declared in this scope
   18 |     if(count(s, s + 2, s[0]) == 2){
      |        ^~~~~
a.cc:21:8: error: 'count' was not declared in this scope
   21 |     if(count(s + 3, s + 4, s[2]) == 2){
      |        ^~~~~
Language: C++

#include<iostream>
#include<cmath>
#include<numeric>
#include<string>

using namespace std;

int main(){

    char s[4];
    string res = "No";
    bool flg1 = false, flg2 = false;

    cin >> s;

    sort(s, s + 4);

    if(count(s, s + 2, s[0])){
        flg1 = true;
    }
    if(count(s + 3, s + 4, s[2])){
        flg2 = true;
    }

    if(flg1 && flg2){

        res = "Yes";
    }


    cout << res << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   16 |     sort(s, s + 4);
      |     ^~~~
      |     sqrt
a.cc:18:8: error: 'count' was not declared in this scope
   18 |     if(count(s, s + 2, s[0])){
      |        ^~~~~
a.cc:21:8: error: 'count' was not declared in this scope
   21 |     if(count(s + 3, s + 4, s[2])){
      |        ^~~~~
Language: C++

#include<iostream>
#include<cmath>
#include<numeric>
#include<string>

using namespace std;

int main(){

    char s[4];
    string res = "No";

    cin >> s;

    sort(s, s + 3);

    if(count(s, s + 1, *(s)) == count(s + 2, s + 3, *(s + 2))){

        res = "Yes";
    }

    cout << res << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   15 |     sort(s, s + 3);
      |     ^~~~
      |     sqrt
a.cc:17:8: error: 'count' was not declared in this scope
   17 |     if(count(s, s + 1, *(s)) == count(s + 2, s + 3, *(s + 2))){
      |        ^~~~~
Language: C++

#include<iostream>
#include<cmath>
#include<numeric>
#include<string>

using namespace std;

int main(){

    char s[4];
    string res = "No";

    cin >> s;

    sort(s, s + 3);

    if(count(s, s + 1, *s) == count(s + 2, s + 3, *(s + 2))){

        res = "Yes";
    }

    cout << res << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   15 |     sort(s, s + 3);
      |     ^~~~
      |     sqrt
a.cc:17:8: error: 'count' was not declared in this scope
   17 |     if(count(s, s + 1, *s) == count(s + 2, s + 3, *(s + 2))){
      |        ^~~~~
Language: C++

#include<iostream>
#include<cmath>
#include<numeric>
#include<string>

using namespace std;

int main(){

    char s[4];
    string res = "No";

    cin >> s;

    sort(s, s + 4);

    if(count(s, s + 2, *s) == count(s + 2, s + 4, *(s + 2))){

        res = "Yes";
    }

    cout << res << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   15 |     sort(s, s + 4);
      |     ^~~~
      |     sqrt
a.cc:17:8: error: 'count' was not declared in this scope
   17 |     if(count(s, s + 2, *s) == count(s + 2, s + 4, *(s + 2))){
      |        ^~~~~