Language: C++

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

int main() {
  int N;
  string S;
  cin >> N;
  cin >> S;
  
  if (N == 1) {
    string ans == "Yes"
  }
  else if (N%2 == 0) {
    string ans = "No";
    int M = N/2;
    if (S.subsr(0,M) == S.subsr(M,M)) ans == "Yes"
  }
  else {
    string ans = "No";
    int M = (N-1)/2;
    if (S.subsr(0,M) == S.subsr(M+1,M)) ans == "Yes"
  }
  
  cout << ans << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: expected initializer before '==' token
   11 |     string ans == "Yes"
      |                ^~
a.cc:16:11: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'subsr'; did you mean 'substr'?
   16 |     if (S.subsr(0,M) == S.subsr(M,M)) ans == "Yes"
      |           ^~~~~
      |           substr
a.cc:16:27: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'subsr'; did you mean 'substr'?
   16 |     if (S.subsr(0,M) == S.subsr(M,M)) ans == "Yes"
      |                           ^~~~~
      |                           substr
a.cc:16:51: error: expected ';' before '}' token
   16 |     if (S.subsr(0,M) == S.subsr(M,M)) ans == "Yes"
      |                                                   ^
      |                                                   ;
   17 |   }
      |   ~                                                
a.cc:16:43: warning: ignoring return value of 'bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*) [with _CharT = char; _Traits = char_traits<char>; _Alloc = allocator<char>]', declared with attribute 'nodiscard' [-Wunused-result]
   16 |     if (S.subsr(0,M) == S.subsr(M,M)) ans == "Yes"
      |                                       ~~~~^~~~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:3772:5: note: declared here
 3772 |     operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
a.cc:21:11: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'subsr'; did you mean 'substr'?
   21 |     if (S.subsr(0,M) == S.subsr(M+1,M)) ans == "Yes"
      |           ^~~~~
      |           substr
a.cc:21:27: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'subsr'; did you mean 'substr'?
   21 |     if (S.subsr(0,M) == S.subsr(M+1,M)) ans == "Yes"
      |                           ^~~~~
      |                           substr
a.cc:21:53: error: expected ';' before '}' token
   21 |     if (S.subsr(0,M) == S.subsr(M+1,M)) ans == "Yes"
      |                                                     ^
      |                                                     ;
   22 |   }
      |   ~                                                  
a.cc:21:45: warning: ignoring return value of 'bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*) [with _CharT = char; _Traits = char_traits<char>; _Alloc = allocator<char>]', declared with attribute 'nodiscard' [-Wunused-result]
   21 |     if (S.subsr(0,M) == S.subsr(M+1,M)) ans == "Yes"
      |                                         ~~~~^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3772:5: note: declared here
 3772 |     operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
a.cc:24:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   24 |   cout << ans << endl;
      |           ^~~
      |           abs