Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; ++i)
#define rrep(i, n) for(int i = n-1; i >= 0; --i)
#define fi first
#define se second
using namespace std;
using lint = long long;
using uint = unsigned int;
using ulint = unsigned long long;
using ldouble = long double;
using pii = pair<int, int>;
using pli = pair<lint, lint>;
using pdd = pair<double, double>;
using pld = pair<ldouble, ldouble>;
using v1i = vector<int>;
using v1li = vector<lint>;
using v2i = vector<vector<int>>;
using v2li = vector<vector<lint>>;
using v3i = vector<vector<vector<int>>>;
using v3li = vector<vector<vector<lint>>>;
using v1b = vector<bool>;
using v2b = vector<vector<bool>>;
using v3b = vector<vector<vector<bool>>>;
using v1c = vector<char>;
using v2c = vector<vector<char>>;
using v3c = vector<vector<vector<char>>>;
constexpr lint mod1 = 1e9+7;

int main() {
  string s, t;
  cin >> s >> t;
  v2c v(26);
  unordered_set<char> a, b;
  vector<pair<char, char>> e;
  bool c = 1;
  rep(i, s.size()){
    bool d = 1;
    rep(j, v[s[i]-'a'].size()){
      if(v[s[i]-'a'][j] == t[i]){
        d = 0;
        break;
      }
    }
    if(d) v[s[i]-'a'].push_back(t[i]);
  }
  rep(i, 26){
    if(v[i].size() > 1){
      b = 0;
      break;
    }
  }
  if(b){
    rep(i, 26) if(v[i].size() > 0) e.push_back(v[i][0], (char)('a'+i));
    sort(e.begin(), e.end());
    int f = 1;
    rep(i, e.size()){
      if(i < e.size()-1 && e[i].fi == e[i+1].fi) ++f;
      else f = 1;
      if(a.count(e[i].fi)) --f;
      if(f > 1){
        b = 0;
        break;
      }
    }
  }
  if(b) cout << "Yes" << endl;
  else cout << "No" << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:48:11: error: no match for 'operator=' (operand types are 'std::unordered_set<char>' and 'int')
   48 |       b = 0;
      |           ^
In file included from /usr/include/c++/14/unordered_set:41,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:189,
                 from a.cc:1:
/usr/include/c++/14/bits/unordered_set.h:273:7: note: candidate: 'std::unordered_set<_Value, _Hash, _Pred, _Alloc>& std::unordered_set<_Value, _Hash, _Pred, _Alloc>::operator=(const std::unordered_set<_Value, _Hash, _Pred, _Alloc>&) [with _Value = char; _Hash = std::hash<char>; _Pred = std::equal_to<char>; _Alloc = std::allocator<char>]'
  273 |       operator=(const unordered_set&) = default;
      |       ^~~~~~~~
/usr/include/c++/14/bits/unordered_set.h:273:17: note:   no known conversion for argument 1 from 'int' to 'const std::unordered_set<char>&'
  273 |       operator=(const unordered_set&) = default;
      |                 ^~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/unordered_set.h:277:7: note: candidate: 'std::unordered_set<_Value, _Hash, _Pred, _Alloc>& std::unordered_set<_Value, _Hash, _Pred, _Alloc>::operator=(std::unordered_set<_Value, _Hash, _Pred, _Alloc>&&) [with _Value = char; _Hash = std::hash<char>; _Pred = std::equal_to<char>; _Alloc = std::allocator<char>]'
  277 |       operator=(unordered_set&&) = default;
      |       ^~~~~~~~
/usr/include/c++/14/bits/unordered_set.h:277:17: note:   no known conversion for argument 1 from 'int' to 'std::unordered_set<char>&&'
  277 |       operator=(unordered_set&&) = default;
      |                 ^~~~~~~~~~~~~~~
/usr/include/c++/14/bits/unordered_set.h:291:7: note: candidate: 'std::unordered_set<_Value, _Hash, _Pred, _Alloc>& std::unordered_set<_Value, _Hash, _Pred, _Alloc>::operator=(std::initializer_list<typename std::_Hashtable<_Value, _Value, _Alloc, std::__detail::_Identity, _Pred, _Hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<std::__not_<std::__and_<std::__is_fast_hash<_Hash>, std::__is_nothrow_invocable<const _Hash&, const _Tp&> > >::value, true, true> >::value_type>) [with _Value = char; _Hash = std::hash<char>; _Pred = std::equal_to<char>; _Alloc = std::allocator<char>; typename std::_Hashtable<_Value, _Value, _Alloc, std::__detail::_Identity, _Pred, _Hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<std::__not_<std::__and_<std::__is_fast_hash<_Hash>, std::__is_nothrow_invocable<const _Hash&, const _Tp&> > >::value, true, true> >::value_type = char]'
  291 |       operator=(initializer_list<value_type> __l)
      |       ^~~~~~~~
/usr/include/c++/14/bits/unordered_set.h:291:46: note:   no known conversion for argument 1 from 'int' to 'std::initializer_list<char>'
  291 |       operator=(initializer_list<value_type> __l)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:52:6: error: could not convert 'b' from 'std::unordered_set<char>' to 'bool'
   52 |   if(b){
      |      ^
      |      |
      |      std::unordered_set<char>
a.cc:53:47: error: no matching function for call to 'std::vector<std::pair<char, char> >::push_back(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&, char)'
   53 |     rep(i, 26) if(v[i].size() > 0) e.push_back(v[i][0], (char)('a'+i));
      |                                    ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53:
/usr/include/c++/14/bits/stl_vector.h:1283:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::pair<char, char>; _Alloc = std::allocator<std::pair<char, char> >; value_type = std::pair<char, char>]'
 1283 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_vector.h:1300:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = std::pair<char, char>; _Alloc = std::allocator<std::pair<char, char> >; value_type = std::pair<char, char>]'
 1300 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1300:7: note:   candidate expects 1 argument, 2 provided
a.cc:61:13: error: no match for 'operator=' (operand types are 'std::unordered_set<char>' and 'int')
   61 |         b = 0;
      |             ^
/usr/include/c++/14/bits/unordered_set.h:273:7: note: candidate: 'std::unordered_set<_Value, _Hash, _Pred, _Alloc>& std::unordered_set<_Value, _Hash, _Pred, _Alloc>::operator=(const std::unordered_set<_Value, _Hash, _Pred, _Alloc>&) [with _Value = char; _Hash = std::hash<char>; _Pred = std::equal_to<char>; _Alloc = std::allocator<char>]'
  273 |       operator=(const unordered_set&) = default;
      |       ^~~~~~~~
/usr/include/c++/14/bits/unordered_set.h:273:17: note:   no known conversion for argument 1 from 'int' to 'const std::unordered_set<char>&'
  273 |       operator=(const unordered_set&) = default;
      |                 ^~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/unordered_set.h:277:7: note: candidate: 'std::unordered_set<_Value, _Hash, _Pred, _Alloc>& std::unordered_set<_Value, _Hash, _Pred, _Alloc>::operator=(std::unordered_set<_Value, _Hash, _Pred, _Alloc>&&) [with _Value = char; _Hash = std::hash<char>; _Pred = std::equal_to<char>; _Alloc = std::allocator<char>]'
  277 |       operator=(unordered_set&&) = default;
      |       ^~~~~~~~
/usr/include/c++/14/bits/unordered_set.h:277:17: note:   no known conversion for argument 1 from 'int' to 'std::unordered_set<char>&&'
  277 |       operator=(unordered_set&&) = default;
      |                 ^~~~~~~~~~~~~~~
/usr/include/c++/14/bits/unordered_set.h:291:7: note: candidate: 'std::unordered_set<_Value, _Hash, _Pred, _Alloc>& std::unordered_set<_Value, _Hash, _Pred, _Alloc>::operator=(std::initializer_list<typename std::_Hashtable<_Value, _Value, _Alloc, std::__detail::_Identity, _Pred, _Hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<std::__not_<std::__and_<std::__is_fast_hash<_Hash>, std::__is_nothrow_invocable<const _Hash&, const _Tp&> > >::value, true, true> >::value_type>) [with _Value = char; _Hash = std::hash<char>; _Pred = std::equal_to<char>; _Alloc = std::allocator<char>; typename std::_Hashtable<_Value, _Value, _Alloc, std::__detail::_Identity, _Pred, _Hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<std::__not_<std::__and_<std::__is_fast_hash<_Hash>, std::__is_nothrow_invocable<const _Hash&, const _Tp&> > >::value, true, true> >::value_type = char]'
  291 |       operator=(initializer_list<value_type> __l)
      |       ^~~~~~~~
/usr/include/c++/14/bits/unordered_set.h:291:46: note:   no known conversion for argument 1 from 'int' to 'std::initializer_list<char>'
  291 |       operator=(initializer_list<value_type> __l)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:66:6: error: could not convert 'b' from 'std::unordered_set<char>' to 'bool'
   66 |   if(b) cout << "Yes" << endl;
      |      ^
      |      |
      |      std::unordered_set<char>