Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using vi = vector<int>;
using vvi =vector<vi>;

int main(){
  string s;
  cin >>s;
  vector<char>A(s.size());
  vector<char>B(s.size());
  bool ans = 1;
  
  for(int i=0 ;i<s.size() ;i++) A[i]=s[i];
  B=reverse(A.begin(),A.end());
  for(int i=0 ;i<n ;i++) if(A[i]!=B[i]) ans = 0;
  
  vector<char>C((s.size()-1)/2);
  vector<char>D((s.size()-1)/2);
  
  for(int i=0 ;i<C.size() ;i++) C[i]=s[i];
  D=reverse(C.begin(),C.end());
  for(int i=0 ;i<n ;i++) if(C[i]!=D[i]) ans = 0;
  
  vector<char>E(s.size()-(s.size()+3)/2+1);
  vector<char>F(s.size()-(s.size()+3)/2+1);
  
  for(int i=0 ;i<E.size() ;i++) E[i]=s[i];
  F=reverse(E.begin(),E.end());
  for(int i=0 ;i<n ;i++) if(E[i]!=F[i]) ans = 0;
  
  if(ans) cout <<"Yes"<< endl;
  else cout <<"No"<<endl;
}
  
  
  
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:15:30: error: no match for 'operator=' (operand types are 'std::vector<char>' and 'void')
   15 |   B=reverse(A.begin(),A.end());
      |                              ^
In file included from /usr/include/c++/14/vector:72,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/vector.tcc:210:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = char; _Alloc = std::allocator<char>]'
  210 |     vector<_Tp, _Alloc>::
      |     ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/vector.tcc:211:42: note:   no known conversion for argument 1 from 'void' to 'const std::vector<char>&'
  211 |     operator=(const vector<_Tp, _Alloc>& __x)
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/14/vector:66:
/usr/include/c++/14/bits/stl_vector.h:766:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = char; _Alloc = std::allocator<char>]'
  766 |       operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:766:26: note:   no known conversion for argument 1 from 'void' to 'std::vector<char>&&'
  766 |       operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
      |                 ~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:788:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = char; _Alloc = std::allocator<char>]'
  788 |       operator=(initializer_list<value_type> __l)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:788:46: note:   no known conversion for argument 1 from 'void' to 'std::initializer_list<char>'
  788 |       operator=(initializer_list<value_type> __l)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:16:18: error: 'n' was not declared in this scope
   16 |   for(int i=0 ;i<n ;i++) if(A[i]!=B[i]) ans = 0;
      |                  ^
a.cc:22:30: error: no match for 'operator=' (operand types are 'std::vector<char>' and 'void')
   22 |   D=reverse(C.begin(),C.end());
      |                              ^
/usr/include/c++/14/bits/vector.tcc:210:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = char; _Alloc = std::allocator<char>]'
  210 |     vector<_Tp, _Alloc>::
      |     ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/vector.tcc:211:42: note:   no known conversion for argument 1 from 'void' to 'const std::vector<char>&'
  211 |     operator=(const vector<_Tp, _Alloc>& __x)
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:766:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = char; _Alloc = std::allocator<char>]'
  766 |       operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:766:26: note:   no known conversion for argument 1 from 'void' to 'std::vector<char>&&'
  766 |       operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
      |                 ~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:788:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = char; _Alloc = std::allocator<char>]'
  788 |       operator=(initializer_list<value_type> __l)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:788:46: note:   no known conversion for argument 1 from 'void' to 'std::initializer_list<char>'
  788 |       operator=(initializer_list<value_type> __l)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:23:18: error: 'n' was not declared in this scope
   23 |   for(int i=0 ;i<n ;i++) if(C[i]!=D[i]) ans = 0;
      |                  ^
a.cc:29:30: error: no match for 'operator=' (operand types are 'std::vector<char>' and 'void')
   29 |   F=reverse(E.begin(),E.end());
      |                              ^
/usr/include/c++/14/bits/vector.tcc:210:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = char; _Alloc = std::allocator<char>]'
  210 |     vector<_Tp, _Alloc>::
      |     ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/vector.tcc:211:42: note:   no known conversion for argument 1 from 'void' to 'const std::vector<char>&'
  211 |     operator=(const vector<_Tp, _Alloc>& __x)
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:766:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = char; _Alloc = std::allocator<char>]'
  766 |       operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:766:26: note:   no known conversion for argument 1 from 'void' to 'std::vector<char>&&'
  766 |       operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
      |                 ~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:788:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = char; _Alloc = std::allocator<char>]'
  788 |       operator=(initializer_list<value_type> __l)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:788:46: note:   no known conversion for argument 1 from 'void' to 'std::initializer_list<char>'
  788 |       operator=(initializer_list<value_type> __l)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:30:18: error: 'n' was not declared in this scope
   30 |   for(int i=0 ;i<n ;i++) if(E[i]!=F[i]) ans = 0;
      |                  ^