Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  string str;
  cin >> str;
  int N = str.size()
  bool finish = false;
  
  for(int i = 0; i < (N-1)/2; i++){
    if(str.at(i) != str.at(N-1)){
      finish = true;
   }else if(str.at(i) != str.at((N-1)/2)){
      finish = true;
   }else if(str.at() != str.at()){
      finish = true;
    }
  }
  if(finish){
    cout << "No" << endl;
  }else
    cout << "Yes" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: expected ',' or ';' before 'bool'
    7 |   bool finish = false;
      |   ^~~~
a.cc:11:7: error: 'finish' was not declared in this scope; did you mean 'finite'?
   11 |       finish = true;
      |       ^~~~~~
      |       finite
a.cc:13:7: error: 'finish' was not declared in this scope; did you mean 'finite'?
   13 |       finish = true;
      |       ^~~~~~
      |       finite
a.cc:14:19: error: no matching function for call to 'std::__cxx11::basic_string<char>::at()'
   14 |    }else if(str.at() != str.at()){
      |             ~~~~~~^~
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:1287:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::at(size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; const_reference = const char&; size_type = long unsigned int]'
 1287 |       at(size_type __n) const
      |       ^~
/usr/include/c++/14/bits/basic_string.h:1287:7: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/basic_string.h:1309:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::at(size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]'
 1309 |       at(size_type __n)
      |       ^~
/usr/include/c++/14/bits/basic_string.h:1309:7: note:   candidate expects 1 argument, 0 provided
a.cc:14:31: error: no matching function for call to 'std::__cxx11::basic_string<char>::at()'
   14 |    }else if(str.at() != str.at()){
      |                         ~~~~~~^~
/usr/include/c++/14/bits/basic_string.h:1287:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::at(size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; const_reference = const char&; size_type = long unsigned int]'
 1287 |       at(size_type __n) const
      |       ^~
/usr/include/c++/14/bits/basic_string.h:1287:7: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/basic_string.h:1309:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::at(size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]'
 1309 |       at(size_type __n)
      |       ^~
/usr/include/c++/14/bits/basic_string.h:1309:7: note:   candidate expects 1 argument, 0 provided
a.cc:15:7: error: 'finish' was not declared in this scope; did you mean 'finite'?
   15 |       finish = true;
      |       ^~~~~~
      |       finite
a.cc:18:6: error: 'finish' was not declared in this scope; did you mean 'finite'?
   18 |   if(finish){
      |      ^~~~~~
      |      finite