Language: C++

#include <iostream>
#include <stdio.h>
#include <vector> 
#include <math.h> 
using namespace std;
string zip(string s) {
   int counter = 1; 
   int i = 1;
   string S = "";
   while (i < s.size()) {
       if (s[i] == s[i-1]) {
           counter += 1;
       } else {
           S += to_string(counter);
           counter = 1;
       }
       i++;
   }
   if (counter != 1) S += to_string(counter);
   return S;
}

int main(void){
    string s,t; cin >> s >> t;
    vector<char> st;
    vector<char> tt;

    int i = 0;
    string answer = "Yes";
    while (i < s.size()) {
        if (find(st.begin(), st.end(), s[i]) == st.end()) {
            st.push_back(s[i]);
        }
        i++;
    }
    i = 0;
    while (i < s.size()) {
        if (find(tt.begin(), tt.end(), t[i]) == tt.end()) {
            tt.push_back(t[i]);
        }
        i++;
    }
    if (st.size() != tt.size()) answer = "No";
    if (zip(s) != zip(t)) answer = "No";

    cout << answer << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:17: error: no matching function for call to 'find(std::vector<char>::iterator, std::vector<char>::iterator, __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   31 |         if (find(st.begin(), st.end(), s[i]) == st.end()) {
      |             ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:31:17: note:   '__gnu_cxx::__normal_iterator<char*, std::vector<char> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   31 |         if (find(st.begin(), st.end(), s[i]) == st.end()) {
      |             ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:38:17: error: no matching function for call to 'find(std::vector<char>::iterator, std::vector<char>::iterator, __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   38 |         if (find(tt.begin(), tt.end(), t[i]) == tt.end()) {
      |             ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:38:17: note:   '__gnu_cxx::__normal_iterator<char*, std::vector<char> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   38 |         if (find(tt.begin(), tt.end(), t[i]) == tt.end()) {
      |             ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~