Language: C++

#include <bits/stdc++.h>
#include<vector>
using namespace std;
#define rep(i, n)        for(int i=0; i<(int)(n); ++i)
int main() {
  map<char,int>a;
  a[a]=0;
  a[c]=0;
  a[b]=0;
  char b;
  cin>>b;
  a[b]++;
  cin>>b;
  a[b]++;
  cin>>b;
  a[b]++;
  if(a[a]==1&&a[b]==1)cout<<"Yes";
  else cout<<"No";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:4: error: no match for 'operator[]' (operand types are 'std::map<char, int>' and 'std::map<char, int>')
    7 |   a[a]=0;
      |    ^
In file included from /usr/include/c++/14/map:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_map.h:504:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = char; _Tp = int; _Compare = std::less<char>; _Alloc = std::allocator<std::pair<const char, int> >; mapped_type = int; key_type = char]'
  504 |       operator[](const key_type& __k)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_map.h:504:34: note:   no known conversion for argument 1 from 'std::map<char, int>' to 'const std::map<char, int>::key_type&' {aka 'const char&'}
  504 |       operator[](const key_type& __k)
      |                  ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_map.h:524:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](key_type&&) [with _Key = char; _Tp = int; _Compare = std::less<char>; _Alloc = std::allocator<std::pair<const char, int> >; mapped_type = int; key_type = char]'
  524 |       operator[](key_type&& __k)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_map.h:524:29: note:   no known conversion for argument 1 from 'std::map<char, int>' to 'std::map<char, int>::key_type&&' {aka 'char&&'}
  524 |       operator[](key_type&& __k)
      |                  ~~~~~~~~~~~^~~
a.cc:8:5: error: 'c' was not declared in this scope
    8 |   a[c]=0;
      |     ^
a.cc:9:5: error: 'b' was not declared in this scope
    9 |   a[b]=0;
      |     ^
a.cc:17:7: error: no match for 'operator[]' (operand types are 'std::map<char, int>' and 'std::map<char, int>')
   17 |   if(a[a]==1&&a[b]==1)cout<<"Yes";
      |       ^
/usr/include/c++/14/bits/stl_map.h:504:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = char; _Tp = int; _Compare = std::less<char>; _Alloc = std::allocator<std::pair<const char, int> >; mapped_type = int; key_type = char]'
  504 |       operator[](const key_type& __k)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_map.h:504:34: note:   no known conversion for argument 1 from 'std::map<char, int>' to 'const std::map<char, int>::key_type&' {aka 'const char&'}
  504 |       operator[](const key_type& __k)
      |                  ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_map.h:524:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](key_type&&) [with _Key = char; _Tp = int; _Compare = std::less<char>; _Alloc = std::allocator<std::pair<const char, int> >; mapped_type = int; key_type = char]'
  524 |       operator[](key_type&& __k)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_map.h:524:29: note:   no known conversion for argument 1 from 'std::map<char, int>' to 'std::map<char, int>::key_type&&' {aka 'char&&'}
  524 |       operator[](key_type&& __k)
      |                  ~~~~~~~~~~~^~~