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

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

int main(){
    int s;
    cin >> s;
    if (s[1]==s[2]&& s[3]==S[4]) cout << "Yes"<<endl;
    else if (s[1]==s[3]&&s[2]==s[4]) cout << "Yes"<<endl;
    else if (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:8:10: error: invalid types 'int[int]' for array subscript
    8 |     if (s[1]==s[2]&& s[3]==S[4]) cout << "Yes"<<endl;
      |          ^
a.cc:8:16: error: invalid types 'int[int]' for array subscript
    8 |     if (s[1]==s[2]&& s[3]==S[4]) cout << "Yes"<<endl;
      |                ^
a.cc:8:23: error: invalid types 'int[int]' for array subscript
    8 |     if (s[1]==s[2]&& s[3]==S[4]) cout << "Yes"<<endl;
      |                       ^
a.cc:8:28: error: 'S' was not declared in this scope
    8 |     if (s[1]==s[2]&& s[3]==S[4]) cout << "Yes"<<endl;
      |                            ^
a.cc:9:15: error: invalid types 'int[int]' for array subscript
    9 |     else if (s[1]==s[3]&&s[2]==s[4]) cout << "Yes"<<endl;
      |               ^
a.cc:9:21: error: invalid types 'int[int]' for array subscript
    9 |     else if (s[1]==s[3]&&s[2]==s[4]) cout << "Yes"<<endl;
      |                     ^
a.cc:9:27: error: invalid types 'int[int]' for array subscript
    9 |     else if (s[1]==s[3]&&s[2]==s[4]) cout << "Yes"<<endl;
      |                           ^
a.cc:9:33: error: invalid types 'int[int]' for array subscript
    9 |     else if (s[1]==s[3]&&s[2]==s[4]) cout << "Yes"<<endl;
      |                                 ^
a.cc:10:15: error: invalid types 'int[int]' for array subscript
   10 |     else if (s[1]==s[4]&&s[2]==s[3]) cout <<"Yes"<<endl;
      |               ^
a.cc:10:21: error: invalid types 'int[int]' for array subscript
   10 |     else if (s[1]==s[4]&&s[2]==s[3]) cout <<"Yes"<<endl;
      |                     ^
a.cc:10:27: error: invalid types 'int[int]' for array subscript
   10 |     else if (s[1]==s[4]&&s[2]==s[3]) cout <<"Yes"<<endl;
      |                           ^
a.cc:10:33: error: invalid types 'int[int]' for array subscript
   10 |     else if (s[1]==s[4]&&s[2]==s[3]) cout <<"Yes"<<endl;
      |                                 ^
Language: C++

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

int main(){
  string s;
  cin >> s;
  sort(s.begin(),s.end());
  if((s[0] == s[1] && s[2] == s[3]) && s[1] != s[2]) cout << "Yes" << endl;
  else cout << "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 <bits/stdc++.h>
using namespace std;

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

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

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  string s;
  cin >> s;
  int alpha[26];
  for (int i = 0; i < 26; i++) {
    alpha[i] = 0;
  }
  for (int i = 0; i < 4; i++) {
    alpha[s[i] - 65]++;
  }
  sort(alpha,alpha + 26);
  if (S[24] == 2 && S[25] == 2) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:7: error: 'S' was not declared in this scope
   15 |   if (S[24] == 2 && S[25] == 2) {
      |       ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:4: error: expected '}' at end of input
   15 |   }
      |    ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
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[1] == a[3])|| (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:7:37: error: expected primary-expression before '||' token
    7 |   if (a[0] == a[1] && a[2] == a[3]) || (a[0] == a[2] && a[1] == a[3])|| (a[0] == a[3] && a[1] == a[2]) cout << "Yes" << endl;
      |                                     ^~
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[1] == a[3])
    || (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:8:5: error: expected primary-expression before '||' token
    8 |     || (a[0] == a[2] && a[1] == a[3])
      |     ^~
Language: C++

#include <iostream>
using namespace std;
int main()
{
	string s;
	cin>>s;
	int a=0;
	if(s[0]==s[1]==s[2]==s[3]||s[0]==s[1]==s[2]||s[1]==s[2]==s[3]||s[0]==s[2]==s[3]||s[0]==s[1]==s[3])
	{
		cout<<"No"<<endl
	}
	else
	{
    	for(int i=0;i<2;i++)
    	{
    		for(int f=i+1;f<=3;f++)
    			
    		{
    			if(s[i]==s[f])
    			{
    				a++;
    			}
    		}
    	}
    	if(a>=2)
    	{
    		cout<<"Yes"<<endl;
    	}
    	else
    	{
    		cout<<"No"<<endl;
    	}
	}
	return 0;
}

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

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

int main(){
  string a;
  int i,j,co,d;
  d=0;
  co=0;
  cin>> a;
  
  for(i=0;i<3;i++){
    for(j=1;i+j<4;j++){
      if(a.at(i)==a.at(i+j)){
        co++;
      }
      else{
        d++;
      }
    }
  }
  
  if((co==2)&&(d==4)){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
  return 0:
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:11: error: expected ';' before ':' token
   28 |   return 0:
      |           ^
      |           ;
a.cc:28:11: error: expected primary-expression before ':' token
Language: C++

using namespace std;

int main()
{
    
    string S;
    cin >> S;
    
    bool flag = false;
    if (S[0] == S[1]) {
        if (S[2] == S[3]) {
            flag = true;
        }
    }
    if (S[1] == S[2]) {
        if (S[0] == S[3]) {
            flag = true;
        }
    }
    if (S[0] == S[2]) {
        if (S[1] == S[3]) {
            flag = true;
        }
    }
    if (S[2] == S[3]) {
        if (S[1] == S[4]) {
            flag = true;
        }
    }
    
    if (flag) {
        cout << "Yes" << endl;
    }else{
        cout << "No" << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'string' was not declared in this scope
    6 |     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:7:5: error: 'cin' was not declared in this scope
    7 |     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:7:12: error: 'S' was not declared in this scope
    7 |     cin >> S;
      |            ^
a.cc:32:9: error: 'cout' was not declared in this scope
   32 |         cout << "Yes" << endl;
      |         ^~~~
a.cc:32:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:32:26: error: 'endl' was not declared in this scope
   32 |         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:34:9: error: 'cout' was not declared in this scope
   34 |         cout << "No" << endl;
      |         ^~~~
a.cc:34:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:34:25: error: 'endl' was not declared in this scope
   34 |         cout << "No" << endl;
      |                         ^~~~
a.cc:34:25: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include <string>
#include <array>
#include <cmath>
#include <queue>
#include <stack>
#include <numeric>
#include <type_traits>

using namespace std;

int main() {
	string s;
	cin >> s;

	cout << s << endl;
	sort(s.begin(), s.end());
	cout << s << endl;

	if (s.at(0) == s.at(1) && s.at(2) == s.at(3) && s.at(0) != s.at(2)) cout << "Yes" << endl;
	else cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 'cin' was not declared in this scope
   13 |         cin >> s;
      |         ^~~
a.cc:7:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    6 | #include <numeric>
  +++ |+#include <iostream>
    7 | #include <type_traits>
a.cc:15:9: error: 'cout' was not declared in this scope
   15 |         cout << s << endl;
      |         ^~~~
a.cc:15:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:22: error: 'endl' was not declared in this scope
   15 |         cout << s << endl;
      |                      ^~~~
a.cc:7:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    6 | #include <numeric>
  +++ |+#include <ostream>
    7 | #include <type_traits>
a.cc:16:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   16 |         sort(s.begin(), s.end());
      |         ^~~~
      |         sqrt
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(s,i, n) for (int i = (int)s; i < (int)(n); i++)
#define pb push_back
typedef long long ll;
  
int main(){
    string s;
    cin>>s;
    int l=4;
    bool ans=false;
    if(s[0]==s[1]){
        if(s[2]==s[3] &&s[0]!=s[2])ans=true;
    }else if(s[0]==s[2]){
        if(s[1]==s[3] &&s[0]!=s[1])ans=true;
    }else if(s[0]==s[3]){
        if(s[1]==s[2] &&s[0]!=s[1])ans=true;
    }

    string answer=(ans)?"Yes""No";

    cout<<answer<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:34: error: expected ':' before ';' token
   21 |     string answer=(ans)?"Yes""No";
      |                                  ^
      |                                  :
a.cc:21:34: error: expected primary-expression before ';' token
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'elsecout' was not declared in this scope
    8 |   elsecout << "No" << endl;
      |   ^~~~~~~~
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<iomanip>
#include<algorithm>
#include<queue>
#include<stack>
#include<list>
#include<map>
#include<deque>
#include<math.h>
using namespace std;
#define ll long long
int main(){
    string S;
    cin >> S:
    ll i,j;
    if(S[0]==S[1]&&S[2]==S[3]&&S[3]!=S[1]){cout << "Yes";return 0;}
    if(S[0]==S[2]&&S[1]==S[3]&&S[1]!=S[2]){cout << "Yes";return 0;}
    if(S[0]==S[3]&&S[2]==S[1]&&S[0]!=S[1]){cout << "Yes";return 0;}
    cout << "No";
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: expected ';' before ':' token
   16 |     cin >> S:
      |             ^
      |             ;
Language: C++

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

int main(){
  char s[4]; scanf("%s",s);
  for(i=0;i<5;++i)cin >> s[i];
  sort(s,s+4);
  bool yes = false;
  if(s[0]==s[1] && s[1]!=s[2] && s[2]==s[3]) yes = true;
  
  if(yes)
    cout << ("Yes");
  else
    cout << ("No");
    
}

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

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

int main() {
    string s;
    cin >> s;

    if (s.at(0) == a.at(1) && s.at(2) == s.at(3) && s.at(0) != s.at(2)){
        cout << "Yes" << endl;
    }
    else if (s.at(0) == s.at(2) && s.at(1) == s.at(3) && s.at(0) != s.at(1)){
        cout << "Yes" << endl;
    }
    else if (s.at(0) == s.at(3) && s.at(1) == s.at(2) && s.at(0) != s.at(1)){
        cout << "Yes" << endl;
    }
    else{
        cout << "No" << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: 'a' was not declared in this scope
    8 |     if (s.at(0) == a.at(1) && s.at(2) == s.at(3) && s.at(0) != s.at(2)){
      |                    ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:26: error: expected ';' before ':' token
   11 |     cout << "Yes" << endl:
      |                          ^
      |                          ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(ll i = 0; i < (ll)(n); i++)
#define rep2(i, a, n) for(ll i = a; i < (ll)(n); i++)
#define memi cout << endl
#define kono(n) cout << fixed << setprecision(n)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define hina cout << ' '
#define in(n) cin >> n
#define in2(n, m) cin >> n >> m
#define in3(n, m, l) cin >> n >> m >> l
#define out(n) cout << n
const ll mei = (ll)1e9 + 7;

int main(){
  string s;
  in(s);
  if(s[0] == s[1] && s[2] == s[3]){
    if(s[1] != s[2])
      out("Yes");
    else
      out("No");
  else if(s[0] == s[2] && s[1] == s[3]){
    if(s[1] != s[2])
      out("Yes");
    else
      out("No");
  else if(s[0] == s[3] && s[1] == s[2]){
    if(s[0] != s[1])
      out("Yes");
    else
      out("No");
  else
    out("No");
  memi;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:3: error: expected '}' before 'else'
   25 |   else if(s[0] == s[2] && s[1] == s[3]){
      |   ^~~~
a.cc:20:35: note: to match this '{'
   20 |   if(s[0] == s[1] && s[2] == s[3]){
      |                                   ^
a.cc:30:3: error: expected '}' before 'else'
   30 |   else if(s[0] == s[3] && s[1] == s[2]){
      |   ^~~~
a.cc:25:40: note: to match this '{'
   25 |   else if(s[0] == s[2] && s[1] == s[3]){
      |                                        ^
a.cc:35:3: error: expected '}' before 'else'
   35 |   else
      |   ^~~~
a.cc:30:40: note: to match this '{'
   30 |   else if(s[0] == s[3] && s[1] == s[2]){
      |                                        ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:18:25: error: expected '}' at end of input
   18 |     cout << "No"<< endl;
      |                         ^
a.cc:17:7: note: to match this '{'
   17 |   else{
      |       ^
a.cc:18:25: error: expected '}' at end of input
   18 |     cout << "No"<< endl;
      |                         ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <iostream>
#include <string>
#include <iomanip>
#include <math.h>
#include <vector>
#include <map>

using namespace std;

int main()
{
  string S;
  cin >> S;

  map<char, int> mp;
  for (int i = 0; i < (int)S.size(); ++i)
  {
    if (mp.count(S[i]) == 0) mp.insert(make_pair(S[i], 1));
    else ++mp[S[i]];

    if (mp.size > 2) break;
    if (mp[S[i]] > 2) break;

    if (i == (int)S.size - 1)
    {
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:12: error: invalid use of member function 'std::map<_Key, _Tp, _Compare, _Alloc>::size_type std::map<_Key, _Tp, _Compare, _Alloc>::size() const [with _Key = char; _Tp = int; _Compare = std::less<char>; _Alloc = std::allocator<std::pair<const char, int> >; size_type = long unsigned int]' (did you forget the '()' ?)
   21 |     if (mp.size > 2) break;
      |         ~~~^~~~
      |                ()
a.cc:24:21: 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 '()' ?)
   24 |     if (i == (int)S.size - 1)
      |                   ~~^~~~
      |                         ()
Language: C++

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

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

Compiler output:
a.cc:10:4: error: expected unqualified-id before 'else'
   10 |   }else{
      |    ^~~~
a.cc:13:1: error: expected declaration before '}' token
   13 | }
      | ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'count'
    8 |     if(S.count(S.at(0))==4){
      |          ^~~~~
Language: C++

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

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

Compiler output:
a.cc:7:44: error: extended character 　 is not valid in an identifier
    7 |     if(s.at(0)==s.at(1) && s.at(2)==s.at(3)　&& s.at(0)==s.at(2)) cout << "Yes" << endl;
      |                                            ^
a.cc: In function 'int main()':
a.cc:7:44: error: expected ')' before '\U00003000'
    7 |     if(s.at(0)==s.at(1) && s.at(2)==s.at(3)　&& s.at(0)==s.at(2)) cout << "Yes" << endl;
      |       ~                                    ^~
      |                                            )
Language: Java

import java.util.*;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    String S1 = S.substring(0,1);
    String S2 = S.substring(1,2);
    String S3 = S.substring(2,3);
    String S4 = S.substring(3,4);
    if (S1.equals(S2) && S3.equals(S4) && !(S1.equals(S3))){
      System.out.println("Yes");
    }else if(S1.equals(S3) && S2.equals(S4) && !(S1.equals(S2)){
      System.out.println("Yes");
    }else if(S1.equals(S4) && S2.equals(S3) && !(S1.equals(S2)){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  }
}

Compiler output:
Main.java:12: error: ')' expected
    }else if(S1.equals(S3) && S2.equals(S4) && !(S1.equals(S2)){
                                                               ^
Main.java:14: error: ')' expected
    }else if(S1.equals(S4) && S2.equals(S3) && !(S1.equals(S2)){
                                                               ^
2 errors
Language: C++

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

int main () {
  string S;
  cin >> S;
  int N = S.size();
  int twoans = 0;
  for(int i = 0; i < N; i++){
    for(int i = 0; i < N; i++){
      if(i != j && S.at(i) == S.at(j)){
        twoans++;
      }
    }
  }
  if(twoans == 4){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: 'j' was not declared in this scope
   11 |       if(i != j && S.at(i) == S.at(j)){
      |               ^
Language: C++

#include <bits/stdc++.h>
#define ll long long int
#define MOD 1000000007
#define INF 1e18
#define PI 3.14159265358979

using namespace std;

ll power(ll n, ll k);
ll inv(ll n);
ll genfact(ll n, ll k);
ll fact(ll n);
ll nck(ll n, ll k);

int main(void){
  string s;
  cin >> s;
  int ok = 0;

  int alph[26] = {};

  alph[s[0] - 'A'];
  alph[s[1] - 'A'];
  alph[s[2] - 'A'];
  alph[s[3] - 'A'];
  int ok = 1;
  for (int i = 0; i < 26; i++){
    if (alph[i] != 0 || alph[i] != 2)
      ok = 0;
  }

  cout << ok ? "Yes" : "No" << endl;

  return 0;
}


ll power(ll n, ll k){
  ll res = 1;
  while(k > 0){
    if (k & 1) 
      res = res * n % MOD;
    n = n * n % MOD;
    k >>= 1;
  }
  return res;
}

ll genfact(ll n, ll k){

  ll res = 1;
  while (k >= 0){
    res = (res * (n - k)) % MOD;
    k--;
  }

  return res;
}

ll inv(ll n){
  return power(n, MOD - 2);
}

ll fact(ll n){
  return genfact(n, n - 1);
}

ll nck(ll n, ll k){
  if (k == 0)
    return 1;

  return ((genfact(n, k) % MOD) * inv(fact(k))) % MOD;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:7: error: redeclaration of 'int ok'
   26 |   int ok = 1;
      |       ^~
a.cc:18:7: note: 'int ok' previously declared here
   18 |   int ok = 0;
      |       ^~
a.cc:32:29: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<'
   32 |   cout << ok ? "Yes" : "No" << endl;
      |                        ~~~~~^~~~~~~
Language: C++

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

int main() {
  string s;
  cin >> s;
  for (int i = 0; i < s.size(); i++)
  	a[s[i] - 'A']++;
  for (int i = 0; i < 26; i++)
    if ((a[i] ^ 0) && (a[i] ^ 2))
 		return cout << "No" << '\n', 0;
  cout << "Yes" << '\n';
      return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'a' was not declared in this scope
    8 |         a[s[i] - 'A']++;
      |         ^
a.cc:10:10: error: 'a' was not declared in this scope
   10 |     if ((a[i] ^ 0) && (a[i] ^ 2))
      |          ^
Language: C++

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

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  string S;
  bool ans=false;
  vector<string> s={S.at(0),S.at(1),S.at(2),S.at(3)};
  sort(s.begin(),s.end());
  if(s.at(0)==s.at(1)&&s.at(1)!=s.at(2)&&s.at(2)==s.at(3)){ 
    cout << "Yes" <<endl;
  }else(cout << "No" << endl;)
                                                           
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:52: error: could not convert '{S.std::__cxx11::basic_string<char>::at(0), S.std::__cxx11::basic_string<char>::at(1), S.std::__cxx11::basic_string<char>::at(2), S.std::__cxx11::basic_string<char>::at(3)}' from '<brace-enclosed initializer list>' to 'std::vector<std::__cxx11::basic_string<char> >'
   10 |   vector<string> s={S.at(0),S.at(1),S.at(2),S.at(3)};
      |                                                    ^
      |                                                    |
      |                                                    <brace-enclosed initializer list>
a.cc:14:29: error: expected ')' before ';' token
   14 |   }else(cout << "No" << endl;)
      |        ~                    ^
      |                             )
a.cc:14:30: error: expected primary-expression before ')' token
   14 |   }else(cout << "No" << endl;)
      |                              ^
Language: C++

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

int main(){
string s; cin>>s;
sort(s.begin(),s.end());
if(s.at(0) == s.at(1) && s.at(1) != s.at(2) && s.at(2) == s.at(3) ) cout << “Yes” ; else cout<< “No”;
}


Compiler output:
a.cc:7:77: error: extended character “ is not valid in an identifier
    7 | if(s.at(0) == s.at(1) && s.at(1) != s.at(2) && s.at(2) == s.at(3) ) cout << “Yes” ; else cout<< “No”;
      |                                                                             ^
a.cc:7:77: error: extended character ” is not valid in an identifier
a.cc:7:97: error: extended character “ is not valid in an identifier
    7 | if(s.at(0) == s.at(1) && s.at(1) != s.at(2) && s.at(2) == s.at(3) ) cout << “Yes” ; else cout<< “No”;
      |                                                                                                 ^
a.cc:7:97: error: extended character ” is not valid in an identifier
a.cc: In function 'int main()':
a.cc:7:77: error: '\U0000201cYes\U0000201d' was not declared in this scope
    7 | if(s.at(0) == s.at(1) && s.at(1) != s.at(2) && s.at(2) == s.at(3) ) cout << “Yes” ; else cout<< “No”;
      |                                                                             ^~~~~
a.cc:7:97: error: '\U0000201cNo\U0000201d' was not declared in this scope
    7 | if(s.at(0) == s.at(1) && s.at(1) != s.at(2) && s.at(2) == s.at(3) ) cout << “Yes” ; else cout<< “No”;
      |                                                                                                 ^~~~
Language: C++

#include<stdio.h>
int main()
{
    char a[4],p;
    int i,y=1,e=1;
    scanf("%s",a);
    for(i=1;i<strlen(a);i++){
        if(a[0]==a[i]){
           y++;
        }
        else if(a[1]==a[i]){
            e++;
        }
    }
    if(y==2&&e==2){
        printf("Yes\n");
    }
    else{
        printf("No\n");
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: 'strlen' was not declared in this scope
    7 |     for(i=1;i<strlen(a);i++){
      |               ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<stdio.h>
  +++ |+#include <cstring>
    2 | int main()
Language: C++

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

int main(){
  string s;
  cin >> s;
  bool ans = false;
  if (s[0] == s[1] && s[2] == s[3] && s[0] != s[2]) ans true;
  if (s[0] == s[2] && s[1] == s[3] && s[0] != s[1]) ans true;
  if (s[0] == s[3] && s[2] == s[1] && s[0] != s[1]) ans true;
  if (ans) puts("Yes");
  else puts("No");
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:56: error: expected ';' before 'true'
    9 |   if (s[0] == s[1] && s[2] == s[3] && s[0] != s[2]) ans true;
      |                                                        ^~~~~
      |                                                        ;
a.cc:10:56: error: expected ';' before 'true'
   10 |   if (s[0] == s[2] && s[1] == s[3] && s[0] != s[1]) ans true;
      |                                                        ^~~~~
      |                                                        ;
a.cc:11:56: error: expected ';' before 'true'
   11 |   if (s[0] == s[3] && s[2] == s[1] && s[0] != s[1]) ans true;
      |                                                        ^~~~~
      |                                                        ;
Language: C++

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

int main(){
  string s;
  cin >> s;
  if (s[0] == s[1] && s[2] == s[3] && s[0] != s[2]) ans true;
  if (s[0] == s[2] && s[1] == s[3] && s[0] != s[1]) ans true;
  if (s[0] == s[3] && s[2] == s[1] && s[0] != s[1]) ans true;
  if (ans) puts("Yes");
  else puts("No");
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:53: error: 'ans' was not declared in this scope; did you mean 'abs'?
    8 |   if (s[0] == s[1] && s[2] == s[3] && s[0] != s[2]) ans true;
      |                                                     ^~~
      |                                                     abs
a.cc:9:53: error: 'ans' was not declared in this scope; did you mean 'abs'?
    9 |   if (s[0] == s[2] && s[1] == s[3] && s[0] != s[1]) ans true;
      |                                                     ^~~
      |                                                     abs
a.cc:10:53: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 |   if (s[0] == s[3] && s[2] == s[1] && s[0] != s[1]) ans true;
      |                                                     ^~~
      |                                                     abs
a.cc:11:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |   if (ans) puts("Yes");
      |       ^~~
      |       abs
Language: C++

int main(){
  str s;
  cin >> s;
  bool ans = false;
  sort(s.bigin(), s.end());
  if (s[0] == s[1] && s[2] == s[3] && s[0] != s[2]) ans true;
  if (ans) puts("Yes");
  else puts("No");
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:3: error: 'str' was not declared in this scope; did you mean 'std'?
    2 |   str s;
      |   ^~~
      |   std
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin >> s;
      |   ^~~
a.cc:3:10: error: 's' was not declared in this scope
    3 |   cin >> s;
      |          ^
a.cc:5:3: error: 'sort' was not declared in this scope; did you mean 'short'?
    5 |   sort(s.bigin(), s.end());
      |   ^~~~
      |   short
a.cc:6:56: error: expected ';' before 'true'
    6 |   if (s[0] == s[1] && s[2] == s[3] && s[0] != s[2]) ans true;
      |                                                        ^~~~~
      |                                                        ;
a.cc:7:12: error: 'puts' was not declared in this scope
    7 |   if (ans) puts("Yes");
      |            ^~~~
a.cc:8:8: error: 'puts' was not declared in this scope
    8 |   else puts("No");
      |        ^~~~
Language: C++

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

int main(){
  str s;
  cin >> s;
  if (s[0] == s[1] && s[2] == s[3] && s[0] != s[2]) ans true;
  if (s[0] == s[2] && s[1] == s[3] && s[3] != s[2]) ans true;
  if (s[0] == s[3] && s[2] == s[1] && s[0] != s[2]) ans true;
  if (ans) puts("Yes");
  else puts("No");
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'str' was not declared in this scope; did you mean 'std'?
    6 |   str s;
      |   ^~~
      |   std
a.cc:7:10: error: 's' was not declared in this scope
    7 |   cin >> s;
      |          ^
a.cc:8:53: error: 'ans' was not declared in this scope; did you mean 'abs'?
    8 |   if (s[0] == s[1] && s[2] == s[3] && s[0] != s[2]) ans true;
      |                                                     ^~~
      |                                                     abs
a.cc:9:53: error: 'ans' was not declared in this scope; did you mean 'abs'?
    9 |   if (s[0] == s[2] && s[1] == s[3] && s[3] != s[2]) ans true;
      |                                                     ^~~
      |                                                     abs
a.cc:10:53: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 |   if (s[0] == s[3] && s[2] == s[1] && s[0] != s[2]) ans true;
      |                                                     ^~~
      |                                                     abs
a.cc:11:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |   if (ans) puts("Yes");
      |       ^~~
      |       abs
Language: C++

#iinclude<bits/stdc++.h>
using namespace std;
int main()
{
  string s;
  int count1=0,count2=0;
  cin>>s;
  for(int i=0;i<4;i++)
  {
    if(i>=1)
    {
      if(s[i]==s[i-1])
      {
        count1++;
      }
      else
      {
        count2++;
      }
    else
    {
      count1++;
    }
   }
    if(count1==count2)
    {
      cout<<"Yes"<<endl;
    }
    else
    {
      cout<<"No"<<endl;
    }
    return 0;
  }
    
        

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #iinclude; did you mean #include?
    1 | #iinclude<bits/stdc++.h>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   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 | #iinclude<bits/stdc++.h>
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   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 | #iinclude<bits/stdc++.h>
a.cc:7:8: error: 's' was not declared in this scope
    7 |   cin>>s;
      |        ^
a.cc:20:5: error: expected '}' before 'else'
   20 |     else
      |     ^~~~
a.cc:11:5: note: to match this '{'
   11 |     {
      |     ^
a.cc:27:7: error: 'cout' was not declared in this scope
   27 |       cout<<"Yes"<<endl;
      |       ^~~~
a.cc:27:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:27:20: error: 'endl' was not declared in this scope
   27 |       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 | #iinclude<bits/stdc++.h>
a.cc:31:7: error: 'cout' was not declared in this scope
   31 |       cout<<"No"<<endl;
      |       ^~~~
a.cc:31:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:31:19: error: 'endl' was not declared in this scope
   31 |       cout<<"No"<<endl;
      |                   ^~~~
a.cc:31:19: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:11:8: error: expected expression before ']' token
   11 |   if(A[]==A[i+1])
      |        ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:5:1: error: expected declaration specifiers before 'scanf'
    5 | scanf("%s",&A);
      | ^~~~~
main.c:6:1: error: expected declaration specifiers before 'for'
    6 | for(i=0;i<=2;i++)
      | ^~~
main.c:6:9: error: expected declaration specifiers before 'i'
    6 | for(i=0;i<=2;i++)
      |         ^
main.c:6:14: error: expected declaration specifiers before 'i'
    6 | for(i=0;i<=2;i++)
      |              ^
main.c:11:1: error: expected declaration specifiers before 'if'
   11 | if(j==0)
      | ^~
main.c:13:1: error: expected declaration specifiers before 'else'
   13 | else
      | ^~~~
main.c:15:1: error: expected declaration specifiers before '}' token
   15 | }
      | ^
main.c:4:7: error: declaration for parameter 'j' but no such parameter
    4 | int i,j;
      |       ^
main.c:4:5: error: declaration for parameter 'i' but no such parameter
    4 | int i,j;
      |     ^
main.c:3:8: error: declaration for parameter 'A' but no such parameter
    3 |   char A[1000];
      |        ^
main.c:16: error: expected '{' at end of input
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string 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:11:40: error: expected ')' before '{' token
   11 |   if(s.at(0)==s.at(2)&&s.at(1)==s.at(3){
      |     ~                                  ^
      |                                        )
a.cc:20:1: error: expected primary-expression before '}' token
   20 | }
      | ^
Language: C++

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

long long n,a,m,k,q,b,c=1;
string ss,s1,s2;
int main(){
    cin>>ss;
    set<char>s;
    for (int i=0; i<4; i++){
        s.insert(s[i]);
    }
    if (s.size()<4){
        cout<<"Yes"<<endl;
    }
    else{
        cout<<"No"<<endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: no match for 'operator[]' (operand types are 'std::set<char>' and 'int')
   11 |         s.insert(s[i]);
      |                   ^
Language: C++

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

long long n,a,m,k,q,b,c=1;
string ss,s1,s2;
int main(){
    cin>>ss;
    set<char>s;
    for (int i=0; i<4; i++){
        s.insert(s[i];)
    }
    if (s.size()<4){
        cout<<"Yes"<<endl;
    }
    else{
        cout<<"No"<<endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: no match for 'operator[]' (operand types are 'std::set<char>' and 'int')
   11 |         s.insert(s[i];)
      |                   ^
a.cc:11:23: error: expected primary-expression before ')' token
   11 |         s.insert(s[i];)
      |                       ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:129: error: expected ';' before '{' token
    9 |   else if((S.at(0)==S.at(1) && S.at(2)==S.at(3)) || S.at(0)==S.at(2) && S.at(1)==S.at(3) || S.at(0)==S.at(3) && S.at(1)==S.at(2){
      |                                                                                                                                 ^
      |                                                                                                                                 ;
a.cc:12:11: error: expected primary-expression before 'else'
   12 |           else {
      |           ^~~~
a.cc:11:4: error: expected ')' before 'else'
   11 |   }
      |    ^
      |    )
   12 |           else {
      |           ~~~~
a.cc:9:10: note: to match this '('
    9 |   else if((S.at(0)==S.at(1) && S.at(2)==S.at(3)) || S.at(0)==S.at(2) && S.at(1)==S.at(3) || S.at(0)==S.at(3) && S.at(1)==S.at(2){
      |          ^
Language: C++

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

//#define int long long
#define fi first
#define se second
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rep1(i, n) for (int i = 1; i <= (int)(n); ++i)
#define rep11(i, n) for (int i = 1; i < (int)(n); ++i)
#define repo(i, o, n) for (int i = o; i < (int)(n); ++i)
#define repm(i, n) for (int i = (int)(n)-1; i >= 0; --i)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define pb(n) push_back(n)
#define mp make_pair
#define MOD 1002000007
#define INF LONG_LONG_MAX

int main(){
    string S;
    cin>>S;
    int c=0;
    if (S[0]==S[1]==S[2]==S[3]){
        c=1;
    }
    if (S[0]==S[1] && S[2]==S[3]){
        c=1;
    }
    else if(S[0]==S[2] && S[1]==S[3]){
        c=1
    }
    else if(S[0]==S[3] && S[1]==S[2]){
        c=1;
    }
    else{ c=0;

}
    if (S[0]==S[1]==S[2]==S[3]){
        c=0;
    }
    if (c==1){
        cout << "Yes" <<endl;
    }
    else{
        cout << "No" <<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:12: error: expected ';' before '}' token
   30 |         c=1
      |            ^
      |            ;
   31 |     }
      |     ~
Language: C++

#include<bits/stcd++.h>
#define all(A) begin(A), end(A)
#define rall(A) rbegin(A), rend(A)
#define sz(A) int(A.size())
#define pb push_back;
#define mp push_back;
using namespace std;
typedef long long ll;
typedef pair <int,int> pii;
int main(){
ios::sync_with_stdio(false);cin.tie)(0);
string s;
cin>>s;
sort(all(s));
if(s[0]==s[1]&&s[2]==s[3]&&s[1]!=s[2]){
	cout<<"Yes";
	else{
		cout<<"No";
	}
}	
	
	

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:47: error: 'veec' was not declared in this scope; did you mean 'vec'?
   15 |     if(vec.at(0) == vec.at(1) && vec.at(2) == veec.at(3)){
      |                                               ^~~~
      |                                               vec
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'vector' was not declared in this scope
    9 |     vector<char> vec(4);
      |     ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include <algorithm>
  +++ |+#include <vector>
    3 | #include <string>
a.cc:9:12: error: expected primary-expression before 'char'
    9 |     vector<char> vec(4);
      |            ^~~~
a.cc:11:9: error: 'vec' was not declared in this scope
   11 |         vec.at(i) = s.at(i);
      |         ^~~
a.cc:13:10: error: 'vec' was not declared in this scope
   13 |     sort(vec.begin(), vec.end());
      |          ^~~
a.cc:14:47: error: 'veec' was not declared in this scope
   14 |     if(vec.at(0) == vec.at(1) && vec.at(2) == veec.at(3)){
      |                                               ^~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <sstream>
#include <vector>
#include <string>
#include <cmath>

using namespace std;

#define CIN(a, b) cin >> a >> b
#define CIN(a) cin >> a
#define rep(i, n) for (int i = 0; i < n; i++)
#define COUT(a) cout << a << endl;
#define vec(n) vector<char> vect(n)

int main(){
    string s;
    CIN(s);
    vec(4);
    rep(i,3) {
        CIN(vect.at(i));
    }
    sort(vect);
    if(vect.at(0) == vect.at(1) && vect.at(2) == vect.at(3)){
        COUT("Yes");
    }
    else
    {
        COUT("No");
    }
}

Compiler output:
a.cc:11:9: warning: "CIN" redefined
   11 | #define CIN(a) cin >> a
      |         ^~~
a.cc:10:9: note: this is the location of the previous definition
   10 | #define CIN(a, b) cin >> a >> b
      |         ^~~
a.cc: In function 'int main()':
a.cc:23:9: error: no matching function for call to 'sort(std::vector<char>&)'
   23 |     sort(vect);
      |     ~~~~^~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/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:   candidate expects 2 arguments, 1 provided
/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, 1 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, 1 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, 1 provided