Language: C++

#include<iostream>
#include<string>
using namepsace std;
int main()
{
  int state=0;
  string t;
  cin>>t;
  int n=t.size();
  for (int i=0;i<(n-1)/4;i++)
  {
     if (t[i]!=t[(n-1)/4 -i-1])
     {
       state=1;
       break;
     }
  }
  if (state==0)
  {
    for (int i=0;i<(n-1)/2;i++)
  {
     if (t[i]!=t[(n-1)/2 -i-1])
     {
       state=1;
       break;
     }
  }
  }
  if(state)
  {
   cout<<"NO'<<endl; 
  }
  else
  {
    cout<<"YES"<<endl;
}

Compiler output:
a.cc:31:10: warning: missing terminating " character
   31 |    cout<<"NO'<<endl;
      |          ^
a.cc:31:10: error: missing terminating " character
   31 |    cout<<"NO'<<endl;
      |          ^~~~~~~~~~~ 
a.cc:3:7: error: expected nested-name-specifier before 'namepsace'
    3 | using namepsace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'string' was not declared in this scope
    7 |   string t;
      |   ^~~~~~
a.cc:7:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:8:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |   cin>>t;
      |   ^~~
      |   std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:8: error: 't' was not declared in this scope; did you mean 'tm'?
    8 |   cin>>t;
      |        ^
      |        tm
a.cc:31:4: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   31 |    cout<<"NO'<<endl;
      |    ^~~~
      |    std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:32:3: error: expected primary-expression before '}' token
   32 |   }
      |   ^
a.cc:35:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   35 |     cout<<"YES"<<endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:35:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   35 |     cout<<"YES"<<endl;
      |                  ^~~~
      |                  std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:36:2: error: expected '}' at end of input
   36 | }
      |  ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^