criyle/codenet-compile-errors huggingface dataset:
Language: C++

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

bool palin(string str)
{
    string temp = str;
    reverse(temp.begin(),temp.end());
    
    return(temp == str);
}

bool fun(string str)
{
    int n=str.length();
    
    string a = str.substr(0,((n-1)/2));
   // cout<<a<<endl;
    
    string b  = str.substr(((n+3)/2)-1);
    
    //cout<<b<<endl;
    if(palin(a)&&palin(b)&&ispalin(str))
    return true;
    
    else
    return false;
    
}

int main()
{
    
    string str;
    cin>>str;
    
    if(fun(str))
    cout<<"Yes"<<endl;
    else
    cout<<"No"<<endl;
    
}

Compiler output:
a.cc: In function 'bool fun(std::string)':
a.cc:22:28: error: 'ispalin' was not declared in this scope; did you mean 'palin'?
   22 |     if(palin(a)&&palin(b)&&ispalin(str))
      |                            ^~~~~~~
      |                            palin
a.cc:28:1: warning: control reaches end of non-void function [-Wreturn-type]
   28 | }
      | ^
Language: C++

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

int main() {
	string s;
  	cin>>s;
  	string r = reverse(s.begin(), s.end());
  	if(s != r) {
    	cout<<"No";
      	return 0;
    }
  	int l1 = (s.size()-1 / 2) - 1;
  	string fh = s.substr(0,l1);
  	string fhr = reverse(fh.begin(), fh.end());
  	if(fh != fhr) {
    	cout<<"No";
      	return 0;
    }
  	string sh = s.substr(l2,l);
  	int l2 = (s.size() + 3)/2 - 1;
  	int l = s.size() - 1;
  	string shr = reverse(sh.begin(), sh.end());
  	if(sh != shr){
    	cout<<"No";
      	return 0;
    }
  	cout<<"Yes";
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:27: error: conversion from 'void' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    9 |         string r = reverse(s.begin(), s.end());
      |                    ~~~~~~~^~~~~~~~~~~~~~~~~~~~
a.cc:16:29: error: conversion from 'void' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   16 |         string fhr = reverse(fh.begin(), fh.end());
      |                      ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
a.cc:21:30: error: 'l2' was not declared in this scope; did you mean 'l1'?
   21 |         string sh = s.substr(l2,l);
      |                              ^~
      |                              l1
a.cc:21:33: error: 'l' was not declared in this scope; did you mean 'l1'?
   21 |         string sh = s.substr(l2,l);
      |                                 ^
      |                                 l1
a.cc:24:29: error: conversion from 'void' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   24 |         string shr = reverse(sh.begin(), sh.end());
      |                      ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
Language: C

#include<stdio.h>
#include<string.h>
int main(void){
  int i,n,count=0;
  char a[100];
  scanf("%s",a);
  n=strlen(a);
  for(i=0;i<n;i++){
    if(a[i]!=a[n-i-1]) count=1;
  }
  for(i=0;i<(n-1)/2;i++){
    if(a[i]!=a[(n-1)/2)] count=1;
  }
  for(i=(n+3)/2;i<n;i++){
    if(a[i]!=a[n-i-1] count=1;
  }
 if(count==0) printf("Yes");
       else printf("No");
       return 0;
       }

Compiler output:
main.c: In function 'main':
main.c:12:23: error: expected ']' before ')' token
   12 |     if(a[i]!=a[(n-1)/2)] count=1;
      |                       ^
      |                       ]
main.c:12:24: error: expected statement before ']' token
   12 |     if(a[i]!=a[(n-1)/2)] count=1;
      |                        ^
main.c:15:22: error: expected ')' before 'count'
   15 |     if(a[i]!=a[n-i-1] count=1;
      |       ~              ^~~~~~
      |                      )
main.c:16:3: error: expected expression before '}' token
   16 |   }
      |   ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  string a,b;
  int i,j,k,l;
  cin>>a;
  b=strrev(a);
  if(strcmp(a,b)==0) cout<<"Yes\n";
  else cout<<"No\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'strrev' was not declared in this scope; did you mean 'strsep'?
    8 |   b=strrev(a);
      |     ^~~~~~
      |     strsep
a.cc:9:13: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
    9 |   if(strcmp(a,b)==0) cout<<"Yes\n";
      |             ^
      |             |
      |             std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/string.h:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
Language: C++

s = input()
n = s.size()
ans=""

half = s[0:(n-1)/2]

if(s==s[::-1] && half==half[::-1]){
	ans = "Yes";
}
else
	ans = "No";
  
print(ans)
}

Compiler output:
a.cc:1:1: error: 's' does not name a type
    1 | s = input()
      | ^
a.cc:10:1: error: expected unqualified-id before 'else'
   10 | else
      | ^~~~
a.cc:13:6: error: expected constructor, destructor, or type conversion before '(' token
   13 | print(ans)
      |      ^
a.cc:14:1: error: expected declaration before '}' token
   14 | }
      | ^
Language: C++

#include <iostream>

using namespace std;

bool check_palindrome(string s){
  int right = 0;
  int left = s.size()-1;
  while(true){
    if(s[right] != s[left]){
      return false;
    }
    if(right > left) break;
    right++;
    left--;
  }
  return true;
}

int main(){
  string s;
  std::cin >> s;

  bool check1 = check_palindrome(s);
  bool check2 = check_palindrome(s.substr(0, s.size() / 2));

  if(check1 && check2 && check3){
    std::cout << "Yes" << '\n';
  }else{
    std::cout << "No" << '\n';
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:26: error: 'check3' was not declared in this scope; did you mean 'check2'?
   26 |   if(check1 && check2 && check3){
      |                          ^~~~~~
      |                          check2
Language: C++

#include <bits/stdc++.h>

using namespace std;

bool check_palindrome(string str) {
	for (int i = 0; i < str.size() / 2; ++i) {
		if (str[i] != str[str.size() - i - 1]) {
			return false;
		}
	}
	return true;
}

int main() {

	string s;
	cin >> s;

	int n = s.size();

	bool is = true;
	is &= check_palindrome(s.substr(0, (n - 1) / 2));
	is &= check_palindrome(s.substr((n + 1) / 2);
	
	cout << (is ? "Yes\n" : "No\n");

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:53: error: expected ')' before ';' token
   23 |         is &= check_palindrome(s.substr((n + 1) / 2);
      |                               ~                     ^
      |                                                     )
Language: C++

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

#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL)
#define nax 200009LL
#define mod 1000000009LL
#define FOR(i,m,n) for(int i = (m); i < (n); i++)
#define REP(i,n) FOR(i,0,n)
#define pb push_back
#define mp make_pair
#define fst first
#define snd second
#define all(v) (v).begin(),(v).end()

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> ii;

/*ll power(ll a, ll b, ll mo){
    int ans = 1;
    while(b){
        if (b&1) ans = (ans*a) % mo;
        b /= 2;
        a = (a*a) % mo;
    }
    return ans;
}*/


int main(){
	
	fastio;

	string s;

	cin>>s;
	int n;
	n=s.size();

	for(int i=0; i<n; i++){
		if(s[i] != s[n-1-i]){
			cout<<"No";
			return 0;
		}
	}

	for(int i=0; i<(n-1)/2; i++){
		//si y solo si: s[i]=s[(n-1)/2-i-1];
		if(s[i] != s[(n-1)/2-1-i]){
			cout<<"No";
			return 0;
		}
	}

	for(int i=0; i<(n-1)/2; i++){
		if(s[i+(n+1)/2] != s[(n-1)/2-1-i+(n+1)/2]){
			cout<<"No";
			return 0;
		}
	}

	cout<<"Yes";

	a k a s a k a
	0 1 2 3 4 5 6

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:64:9: error: 'a' was not declared in this scope
   64 |         a k a s a k a
      |         ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
   string s,r;
   cin>>s;
   r=s;
   reverse(s.begin(),s.end());
   if(r!=s)
     cout<<"No";
   else
   {
      i=0;
      j=(s.size()-1/2)-1;
     while(i<j)
     {
       if(s[i]!=s[j])
       {
          cout<<"No";
          return 0;
       }
       i+=1;
       j-=1;
     }
     cout<<"Yes";
   }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:7: error: 'i' was not declared in this scope
   13 |       i=0;
      |       ^
a.cc:14:7: error: 'j' was not declared in this scope
   14 |       j=(s.size()-1/2)-1;
      |       ^
Language: C++

#include<iostream>
using namespace std;

unsigned char caibun(string *str)
{
  unsigned char result = 0;
  int i = 0;
  size_t len = str->length();
  if(len == 1)
  {
    result = 1;
    return result;
  }
  for(i = 0; i < len; i++)
  {
    if(str[i] != str[(len - 1) - i])
    {
      result = 0;
      return result;
    }
  }
  result = 1;
  return result;
}

void judge(string *str)
{
  string sub0;
  string sub1;
  unsigned char result = 0;
  size_t len = str->length();


  else
  {
    sub0 = str->substr(0, (len-1) / 2);
    sub1 = str->substr((len+3)/2);
    result = caibun(&sub0);
    result += caibun(&sub1);
    if(result == 2)
    {
      cout << "Yes";
    }
    else
    {
      cout << "No";
    }
  }
}


int main(void)
{
  string str;
  
  cin >> str;

  judge(&str);
 
}


Compiler output:
a.cc: In function 'void judge(std::string*)':
a.cc:34:3: error: 'else' without a previous 'if'
   34 |   else
      |   ^~~~
Language: C++

#include<iostream>
using namespace std;
void judge(string *);

unsigned char caibun(string *str)
{
  unsigned char result = 0;
  int i = 0;
  size_t len = str->length();
  
  for(i = 0; i < len; i++)
  {
    if(str[i] != str[(len - 1) - i])
    {
      result = 0;
      return result;
    }
  }
  result = 1;
  return result
}

void judge(string *str)
{
  string sub0;
  string sub1;
  unsigned char result = 0;
  size_t len = str->length();

  if(len == 1)
  {
    cout << "Yes";
  }
  else
  {
    sub0 = str->substr(0, (len - 1) / 2);
    sub1 = str->substr(len / 2, len/2);
    result = caibun(&sub0);
    result += caibun(&sub1);
    if(result == 2)
    {
      cout << "Yes";
    }
    else
    {
      cout << "No";
    }
  }
}


int main(void)
{
  string str;
  
  cin >> str;
  if((str.length() % 2) == 0)
  {
    cout << "No";
  }
  judge(&str);
 
}

Compiler output:
a.cc: In function 'unsigned char caibun(std::string*)':
a.cc:20:16: error: expected ';' before '}' token
   20 |   return result
      |                ^
      |                ;
   21 | }
      | ~
Language: C++

#include<iostream>
using namespace std;
void judge(string *);
void judge(string *str)
{
  string sub0;
  string sub1;
  size_t len = str->length();

  else if(len == 1)
  {
    cout << "Yes";
  }
  else
  {
    sub0 = str->substr(0, (len - 1) / 2);
    sub1 = str->substr((len / 2), len);
    judge(&sub0);
    judge(&sub1);
  }
}


int main(void)
{
  string str;
  
  cin >> str;
  if((str.length() % 2) == 0)
  {
    cout << "No";
  }
  judge(&str);
 
}

Compiler output:
a.cc: In function 'void judge(std::string*)':
a.cc:10:3: error: 'else' without a previous 'if'
   10 |   else if(len == 1)
      |   ^~~~
Language: C++

#include<iostream>
using namespace std;
void judge(string *);
void judge(string *str)
{
  string sub0;
  string sub1;
  size_t len = str->length;
  if((len % 2) == 0)
  {
    cout << "No";
  }
  else if(len == 1)
  {
    cout << "Yes";
  }
  else
  {
    sub0 = str->substr(0, (len - 1) / 2);
    sub1 = str->substr((len / 2), len);
    judge(&sub0);
    judge(&sub1);
  }
}


int main(void)
{
  string str;
  
  cin >> str;
  judge(&str);
 
}

Compiler output:
a.cc: In function 'void judge(std::string*)':
a.cc:8:21: error: cannot convert 'std::__cxx11::basic_string<char>::length' from type 'std::__cxx11::basic_string<char>::size_type (std::__cxx11::basic_string<char>::)() const noexcept' {aka 'long unsigned int (std::__cxx11::basic_string<char>::)() const noexcept'} to type 'size_t' {aka 'long unsigned int'}
    8 |   size_t len = str->length;
      |                     ^~~~~~
Language: C++

#include<iostream>
using namespace std;
void judge(string *);
void judge(string *str)
{
  string sub0;
  string sub1;
  int len = str->length;
  if((len % 2) == 0)
  {
    cout << "No";
  }
  else if(len == 1)
  {
    cout << "Yes";
  }
  else
  {
    sub0 = str->substr(0, (len - 1) / 2);
    sub1 = str->substr((len / 2), len);
    judge(&sub0);
    judge(&sub1);
  }
}


int main(void)
{
  string str;
  
  cin >> str;
  judge(&str);
 
}

Compiler output:
a.cc: In function 'void judge(std::string*)':
a.cc:8:18: error: cannot convert 'std::__cxx11::basic_string<char>::length' from type 'std::__cxx11::basic_string<char>::size_type (std::__cxx11::basic_string<char>::)() const noexcept' {aka 'long unsigned int (std::__cxx11::basic_string<char>::)() const noexcept'} to type 'int'
    8 |   int len = str->length;
      |                  ^~~~~~
Language: C++

#include<iostream>
using namespace std;
void judge(string *);
void judge(string *str)
{
  string sub0;
  string sub1;
  if((str->length % 2) == 0)
  {
    cout << "No";
  }
  else if(str->length == 1)
  {
    cout << "Yes";
  }
  else
  {
    sub0 = str->substr(0, ((str->length - 1) / 2));
    sub1 = str->substr(((str->length) / 2), str->length);
    judge(&sub0);
    judge(&sub1);
  }
}


int main(void)
{
  string str;
  
  cin >> str;
  judge(&str);
 
}

Compiler output:
a.cc: In function 'void judge(std::string*)':
a.cc:8:12: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    8 |   if((str->length % 2) == 0)
      |       ~~~~~^~~~~~
      |                  ()
a.cc:12:16: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   12 |   else if(str->length == 1)
      |           ~~~~~^~~~~~
      |                      ()
a.cc:18:34: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   18 |     sub0 = str->substr(0, ((str->length - 1) / 2));
      |                             ~~~~~^~~~~~
      |                                        ()
a.cc:19:31: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   19 |     sub1 = str->substr(((str->length) / 2), str->length);
      |                         ~~~~~~^~~~~~~
      |                                      ()
Language: C++

#include<iostream>
using namespace std;
void judge(string *);
void judge(string *str)
{
  string sub0;
  string sub1;
  if((str->length % 2) == 0)
  {
    cout << "No";
  }
  else if(str->length == 1)
  {
    cout << "Yes";
  }
  else
  {
    sub0 = str->substr(0, ((str->length - 1) / 2));
    sub1 = str->substr(((str->length) / 2), str->length);
    judge(&sub0);
    judge(&sub1);
  }
}


int main(void)
{
  string str;
  
  cin >> str;
  judge(str);
 
}

Compiler output:
a.cc: In function 'void judge(std::string*)':
a.cc:8:12: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    8 |   if((str->length % 2) == 0)
      |       ~~~~~^~~~~~
      |                  ()
a.cc:12:16: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   12 |   else if(str->length == 1)
      |           ~~~~~^~~~~~
      |                      ()
a.cc:18:34: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   18 |     sub0 = str->substr(0, ((str->length - 1) / 2));
      |                             ~~~~~^~~~~~
      |                                        ()
a.cc:19:31: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   19 |     sub1 = str->substr(((str->length) / 2), str->length);
      |                         ~~~~~~^~~~~~~
      |                                      ()
a.cc: In function 'int main()':
a.cc:31:9: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'std::string*' {aka 'std::__cxx11::basic_string<char>*'}
   31 |   judge(str);
      |         ^~~
      |         |
      |         std::string {aka std::__cxx11::basic_string<char>}
a.cc:4:20: note:   initializing argument 1 of 'void judge(std::string*)'
    4 | void judge(string *str)
      |            ~~~~~~~~^~~
Language: C++

#include<iostream>
namespace std;

void judge(string *str)
{
  string sub0[99];
  string sub1[99];
  if(str.length % 2 == 0)
  {
    cout << "No";
  }
  else if(str.length == 1)
  {
    cout << "Yes";
  }
  else
  {
    sub0 = substr(0, (str.length - 1) / 2);
    sub1 = substr((str.length) / 2, str.length);
    judge(sub0);
    judge(sub1);
  }
}


int main(void)
{
  string str[100];
  
  cin >> str;
  judge(str);
 
}

Compiler output:
a.cc:2:14: error: expected '{' before ';' token
    2 | namespace std;
      |              ^
a.cc:4:6: error: variable or field 'judge' declared void
    4 | void judge(string *str)
      |      ^~~~~
a.cc:4:12: error: 'string' was not declared in this scope
    4 | void judge(string *str)
      |            ^~~~~~
a.cc:4:12: 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:4:20: error: 'str' was not declared in this scope; did you mean 'std'?
    4 | void judge(string *str)
      |                    ^~~
      |                    std
a.cc: In function 'int main()':
a.cc:28:3: error: 'string' was not declared in this scope
   28 |   string str[100];
      |   ^~~~~~
a.cc:28:3: note: suggested alternatives:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:30:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   30 |   cin >> str;
      |   ^~~
      |   std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:30:10: error: 'str' was not declared in this scope; did you mean 'std'?
   30 |   cin >> str;
      |          ^~~
      |          std
a.cc:31:3: error: 'judge' was not declared in this scope
   31 |   judge(str);
      |   ^~~~~
Language: C++

#include<iostream>
namespace std;

void judge(string str)
{
  string sub0[99];
  string sub1[99];
  if(str.length % 2 == 0)
  {
    cout << "No";
  }
  else if(str.length == 1)
  {
    cout << "Yes";
  }
  else
  {
    sub0 = substr(0, (str.length - 1) / 2);
    sub1 = substr((str.length) / 2, str.length);
    judge(sub0);
    judge(sub1);
  }
}


int main(void)
{
  string str[100];
  
  cin >> str;
  judge(str);
 
}

Compiler output:
a.cc:2:14: error: expected '{' before ';' token
    2 | namespace std;
      |              ^
a.cc:4:6: error: variable or field 'judge' declared void
    4 | void judge(string str)
      |      ^~~~~
a.cc:4:12: error: 'string' was not declared in this scope
    4 | void judge(string str)
      |            ^~~~~~
a.cc:4:12: 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: In function 'int main()':
a.cc:28:3: error: 'string' was not declared in this scope
   28 |   string str[100];
      |   ^~~~~~
a.cc:28:3: note: suggested alternatives:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:30:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   30 |   cin >> str;
      |   ^~~
      |   std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:30:10: error: 'str' was not declared in this scope; did you mean 'std'?
   30 |   cin >> str;
      |          ^~~
      |          std
a.cc:31:3: error: 'judge' was not declared in this scope
   31 |   judge(str);
      |   ^~~~~
Language: C++

#include<iostream>
//#include<stack>
#include<string>
#include<bits/stdc++.h>
using namespace std;
int P(string s)
{
  int i=0,n=s.size()-1;
  while(i<n)
  {
    if(s[i]!=s[n])
       return 0;
    i++;
    n--;
  }
  return 1;
}
int main()
{
  string str;
  cin>>str;
  int n=str.size();
  int t=((n-1)/2)-1;
  int k=((n+3)/2)-1
  if(P(str) && P(str.substr(0,t)) && P(str.substr(k,n-1)));
  cout<<"Yes";
  else
    cout<<"No";
    return 0;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:3: error: expected ',' or ';' before 'if'
   25 |   if(P(str) && P(str.substr(0,t)) && P(str.substr(k,n-1)));
      |   ^~
a.cc:27:3: error: 'else' without a previous 'if'
   27 |   else
      |   ^~~~
Language: C++

#include<iostream>
//#include<stack>
#include<string>
#include<bits/stdc++.h>
using namespace std;
int p(string s)
{
  int i=0,n=s.size()-1;
  while(i<n)
  {
    if(s[i]!=s[n])
       return 0;
    i++;
    n--;
  }
  return 1;
}
int main()
{
  string str;
  cin>>str;
  int n=str.size();
  int t=((n-1)/2)-1;
  int k=((n+3)/2)-1;
  if(P(str) && P(str.substr(0,t)) && P(str.substr(k,n-1)))
  cout<<"Yes";
  else
    cout<<"No"
    return 0;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:6: error: 'P' was not declared in this scope
   25 |   if(P(str) && P(str.substr(0,t)) && P(str.substr(k,n-1)))
      |      ^
a.cc:28:15: error: expected ';' before 'return'
   28 |     cout<<"No"
      |               ^
      |               ;
   29 |     return 0;
      |     ~~~~~~
Language: C++

#include<iostream>
//#include<stack>
#include<string>
#include<bits/stdc++.h>
using namespace std;
int p(string s)
{
  int i=0,n=s.size()-1;
  while(i<n)
  {
    if(s[i]!=s[n])
       return 0;
    i++;
    n--;
  }
  return 1;
}
int main()
{
  string str;
  cin>>str;
  int n=str.size();
  int t=((n-1)/2)-1;
  int k=((n+3)/2)-1
  if(P(str) && P(str.substr(0,t)) && P(str.substr(k,n-1)));
  cout<<"Yes";
  else
    cout<<"No"
    return 0;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:3: error: expected ',' or ';' before 'if'
   25 |   if(P(str) && P(str.substr(0,t)) && P(str.substr(k,n-1)));
      |   ^~
a.cc:27:3: error: 'else' without a previous 'if'
   27 |   else
      |   ^~~~
a.cc:28:15: error: expected ';' before 'return'
   28 |     cout<<"No"
      |               ^
      |               ;
   29 |     return 0;
      |     ~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
	string s;cin>>s;
	int n=s.length();
	string s1=s;
	reverse(s1.begin(),s1.end());
	if(s1==s2){
		string s2=s.substr(0,(n-1)/2);
		string s3=s.substr((n+3)/2);
		reverse(s3.begin(),s3.end());
		if(s2==s2){
			cout<<"Yes\n";
			return 0;
		}
	}
	cout<<"No\n";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: 's2' was not declared in this scope; did you mean 's1'?
    9 |         if(s1==s2){
      |                ^~
      |                s1
a.cc:10:24: error: redeclaration of 'std::string s2'
   10 |                 string s2=s.substr(0,(n-1)/2);
      |                        ^~
a.cc:9:16: note: '<typeprefixerror>s2' previously declared here
    9 |         if(s1==s2){
      |                ^~
Language: C++

#include <bits/stdc++.h>
#include <string>
#include <algorithm>
#include <iostream>
 
using namespace std;
 
int main(){
  int n;
  string s="";
  
  cin >> s;
  n = s.size();
  
  string x1 = s.substr(0,(n-1)/2);
  string x2 = s.substr(0,(n-1)/2);
  string y1 = s.substr((n+3)/2,(n-1)/2);
  string y2 = s.substr((n+3)/2,(n-1)/2);
  
  reverse(x2.begin(), x2.end());
  reverse(y2.begin(), y2.end());
  
  if(x1==y2 && x1==x2 && y1==y2){
    ans = "Yes";
  }
  else{
    ans = "No";
  }
  
  cout << ans << endl;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:24:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   24 |     ans = "Yes";
      |     ^~~
      |     abs
a.cc:27:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   27 |     ans = "No";
      |     ^~~
      |     abs
a.cc:30:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   30 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C++

#include <bits/stdc++.h>
#include <string>
#include <algorithm>
#include <iostream>
 
using namespace std;
 
int main(){
  int n;
  string s="", x="", y="", ans="";
  
  cin >> s ;
  
  n = s.size();
  x1 = s.substr(0,(n-1)/2);
  x2 = s.substr(0,(n-1)/2);
  y1 = s.substr((n+3)/2,(n-1)/2);
  y2 = s.substr((n+3)/2,(n-1)/2);
  
  reverse(x2.begin(), x2.end());
  reverse(y2.begin(), y2.end());
  
  if(x1==y2 && x1==x2 && y1==y2){
    ans = "Yes";
  }
  else{
    ans = "No";
  }
  
  cout << ans << endl;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:15:3: error: 'x1' was not declared in this scope; did you mean 'x'?
   15 |   x1 = s.substr(0,(n-1)/2);
      |   ^~
      |   x
a.cc:16:3: error: 'x2' was not declared in this scope; did you mean 'x'?
   16 |   x2 = s.substr(0,(n-1)/2);
      |   ^~
      |   x
a.cc:17:6: error: assignment of function 'double y1(double)'
   17 |   y1 = s.substr((n+3)/2,(n-1)/2);
      |   ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:18:3: error: 'y2' was not declared in this scope; did you mean 'y'?
   18 |   y2 = s.substr((n+3)/2,(n-1)/2);
      |   ^~
      |   y
Language: C++

#include <bits/stdc++.h>
#include <string>
#include <algorithm>
#include <iostream>
 
using namespace std;
 
void main(){
  int n;
  string s="", x="", y="", ans="";
  
  cin >> s ;
  
  n = s.size();
  x = s.substr(0,(n-1)/2);
  y = s.substr((n+3)/2,(n-1)/2);
  
  reverse(x.begin(), x.end());
  if(x == y){
    ans = "Yes";
  }
  else{
    ans = "No";
  }
  
  cout << ans << endl;
}



Compiler output:
a.cc:8:1: error: '::main' must return 'int'
    8 | void main(){
      | ^~~~
Language: C++

#include <bits/stdc++.h>
#include <string>
#include <algorithm>
#include <iostream>
 
using namespace std;
 
int main(){
  int n;
  string s="", x="", y="", ans="";
  
  cin >> s ;
  
  n = s.size();
  x = s.substr(0,(n-1)/2);
  y = s.substr((n+3)/2,(n-1)/2);
  
  if(x == y){
    reverse(x.begin(), x.end());
    if(x == y){
      ans = "Yes";
  }
  else{
    ans = "No";
  }
  
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:2: error: expected '}' at end of input
   28 | }
      |  ^
a.cc:8:11: note: to match this '{'
    8 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
#include <string>
#include <algorithm>
#include <iostream>
 
using namespace std;
 
int main(){
  int n;
  string s="", x="", y="", ans="";
  
  cin >> s ;
  n = s.size();
  
  x = s.substr(0,(n-1)/2);
  y = s.substr((n+3)/2,(n-1)/2);
  
  if(x == y){
    reverse(x.begin(), x.end())
    if(x == y){
      ans = "Yes";
  }
  else{
    ans = "No";
  }
  
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:32: error: expected ';' before 'if'
   19 |     reverse(x.begin(), x.end())
      |                                ^
      |                                ;
   20 |     if(x == y){
      |     ~~                          
a.cc:23:3: error: expected '}' before 'else'
   23 |   else{
      |   ^~~~
a.cc:18:13: note: to match this '{'
   18 |   if(x == y){
      |             ^
Language: C++

#include <bits/stdc++.h>
#include <string>
using namespace std;
 
int main(){
  int n;
  string s="", x="", y="", ans="";
  
  cin >> s ;
  n = s.size();
  
  x = s.substr(0,(n-1)/2);
  y = s.substr((n+3)/2,(n-1)/2)
  
  if(x == y){
    ans = "Yes";
  }
  else{
    ans = "No";
  }
  
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:32: error: expected ';' before 'if'
   13 |   y = s.substr((n+3)/2,(n-1)/2)
      |                                ^
      |                                ;
   14 | 
   15 |   if(x == y){
      |   ~~                            
a.cc:18:3: error: 'else' without a previous 'if'
   18 |   else{
      |   ^~~~
Language: C++

#include <bits/stdc++.h>
 
using namespace std;
 
int main(){
 string s;
  cin >> s;
  string a = s;
  reverse(a.begin(),a.end())
    if(a!=s){cout<<"No";return 0;}
  string b = s.substr(0,(n-1)/2);
  string  c= b;
  reverse(c.begin(),c.end());
  string d = s.substr((n+3)/2 - 1);
  string l = d;
  reverse(l.begin(),l.end());
  if(c==b && l==d) cout << "Yes";
  else cout <<"No";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:29: error: expected ';' before 'if'
    9 |   reverse(a.begin(),a.end())
      |                             ^
      |                             ;
   10 |     if(a!=s){cout<<"No";return 0;}
      |     ~~                       
a.cc:11:26: error: 'n' was not declared in this scope
   11 |   string b = s.substr(0,(n-1)/2);
      |                          ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(){
 string s;
  cin >> s;
  string a = s;
  reverse(a.begin(),a.end())
    if(a!=s){cout<<"No";return 0;}
  string b = s.substr(0,(n-1)/2);
  string  c= b;
  reverse(c.begin(),c.end());
  string d = s.substr(n+3)/2 - 1);
  string l = d;
  reverse(l.begin(),l.end());
  if(c==b && l==d) cout << "Yes";
  else cout <<"No";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:29: error: expected ';' before 'if'
    9 |   reverse(a.begin(),a.end())
      |                             ^
      |                             ;
   10 |     if(a!=s){cout<<"No";return 0;}
      |     ~~                       
a.cc:11:26: error: 'n' was not declared in this scope
   11 |   string b = s.substr(0,(n-1)/2);
      |                          ^
Language: C++

#include <iostream>
#include <string>
using namespace std;

int main()
{
    string  s;
    string  s1;
    string  s2;
    string  rs;
    string  rs1;
    string  rs2;

    cin >> s;
    rs = s;
    s1 = s.substr(0, ((s.size() - 1) / 2));
    s2 = s.substr((s.size() + 2) / 2, s.size() - 1);
    rs1 = s1;
    rs2 = s2;
    //cout << rs1 << " " << rs2 << endl;
    reverse(rs1.begin(), rs1.end());
    reverse(rs2.begin(), rs2.end());
    reverse(rs.begin(), rs.end());
    if (s.compare(rs) == 0 && s1.compare(rs1) == 0 && s2.compare(rs2) == 0)
        cout << "Yes" << endl;
    else
        cout << "No" << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:5: error: 'reverse' was not declared in this scope
   21 |     reverse(rs1.begin(), rs1.end());
      |     ^~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define int           long long
#define	pb            push_back
#define all(a)        (a).begin(),(a).end()
#define sz(x)         (int)x.size()
#define F             first
#define S             second
#define endl          "\n"
#define inf           1000000007
#define FOR(i, a, b)  for(int i=a; i<b; i++)
#define bigboi        1e18
mt19937 RNG(chrono::steady_clock::now().time_since_epoch().count()); 
#define SHUF(v) shuffle(all(v), RNG);
// Use mt19937_64 for 64 bit random numbers. 

bool check(string s){
	int n = sz(s);
	bool c =	1;
	FOR(i, 0, n){
		c&&=(s[i]==s[n-i-1]);
	}
	return c;
}
void solve(){
	string s, a="";
	cin>>s;
	int n = sz(s);
	if(check(s) && check(s.substr(0, (n-1)/2)) && check(s.substr((n+1)/2))){
		cout<<"Yes"<<endl;
	}
	else{
		cout<<"No"<<endl;
	}
}

signed main(){
	ios::sync_with_stdio(false);
	cin.tie(0); 	
	int t=1;
	//cin>>t;
	FOR(i, 1, t+1){	
	//	cout<<"Case #"<<i<<":"<<endl;
		solve();
	}
	cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
	return 0;
 
}


Compiler output:
a.cc: In function 'bool check(std::string)':
a.cc:21:20: error: expected primary-expression before '=' token
   21 |                 c&&=(s[i]==s[n-i-1]);
      |                    ^
Language: C++

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

int main() {
  string S;
  cin >> S;
  int n = S.size();
  
  string answer = "Yes";
  for(int i = 0; i < (n - 1) / 2; i++){
    if(S.at(i) != S.at(n - 1 - i)){
      answer = "No";
      break;
    }
  }
  if(((n - 1) / 2) % 2 == 1){
    for(int i = 0; i < (n - 3) / 4; i++){
      if(S.at(i) != S.at(((n - 3) / 2) - i)){
        answer = "No";
        break;
      }
    }
    for(int i = (n + 1) / 2; i < (3 * n - 1) / 4; i++){
      if(S.at(i) != S.at(((3 * n - 1) / 2) - i)){
        answer = "No";
        break;
      }
    }
  }
  
  else if{
    for(int i = 0; i < (n - 1) / 4; i++){
      if(S.at(i) != S.at(((n - 3) / 2) - i)){
        answer = "No";
        break;
      }
    }
    for(int i = (n + 1) / 2; i < (3 * n + 1) / 4; i++){
      if(S.at(i) != S.at(((3 * n - 1) / 2) - i)){
        answer = "No";
        break;
      }
    }
  }
  cout << answer << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:10: error: expected '(' before '{' token
   31 |   else if{
      |          ^
      |          (
Language: Java

class Main {
   
        
        for(int i=0;i<frase.length();i++){
           for(int x=frase.length()-1;i>=0;i--){
            if(frase.charAt(x)==frase.charAt(i)){
                JOptionPane.showMessageDialog(null,"Yes");
            }else{
                  JOptionPane.showMessageDialog(null,"No");
            }
             break;
        }
             break;
        }

Compiler output:
Main.java:4: error: illegal start of type
        for(int i=0;i<frase.length();i++){
        ^
Main.java:4: error: > or ',' expected
        for(int i=0;i<frase.length();i++){
                                  ^
Main.java:4: error: <identifier> expected
        for(int i=0;i<frase.length();i++){
                                      ^
Main.java:14: error: reached end of file while parsing
        }
         ^
4 errors
Language: Java

public class trabajo {
    public static void primer(String frase){
        
        for(int i=0;i<frase.length();i++){
           for(int x=frase.length()-1;i>=0;i--){
            if(frase.charAt(x)==frase.charAt(i)){
                JOptionPane.showMessageDialog(null,"Yes");
            }else{
                  JOptionPane.showMessageDialog(null,"No");
            }
             break;
        }
             break;
        }

Compiler output:
Main.java:14: error: reached end of file while parsing
        }
         ^
1 error
Language: Java

 class Main {
    
        
        for(int i=0;i<frase.length();i++){
           for(int x=frase.length()-1;i>=0;i--){
            if(frase.charAt(x)==frase.charAt(i)){
                JOptionPane.showMessageDialog(null,"si es palindromo");
            }else{
                  JOptionPane.showMessageDialog(null,"NO es palindromo");
            }
             break;
        }
             break;
        }

Compiler output:
Main.java:4: error: illegal start of type
        for(int i=0;i<frase.length();i++){
        ^
Main.java:4: error: > or ',' expected
        for(int i=0;i<frase.length();i++){
                                  ^
Main.java:4: error: <identifier> expected
        for(int i=0;i<frase.length();i++){
                                      ^
Main.java:14: error: reached end of file while parsing
        }
         ^
4 errors
Language: Java

public class trabajo {
    public static void primer(String frase){
        
        for(int i=0;i<frase.length();i++){
           for(int x=frase.length()-1;i>=0;i--){
            if(frase.charAt(x)==frase.charAt(i)){
                JOptionPane.showMessageDialog(null,"si es palindromo");
            }else{
                  JOptionPane.showMessageDialog(null,"NO es palindromo");
            }
             break;
        }
             break;
        }

Compiler output:
Main.java:14: error: reached end of file while parsing
        }
         ^
1 error
Language: C

#include <stdio.h>
#include <string.h>

int main()
{
	char text[100];
	scanf_s("%s", text,100);

	int text_len = strnlen_s(text,100);

	int is_text_palindrome = 0;
	for (int i = 0; i < text_len / 2; i++)
	{
		if (text[i] != text[text_len - i - 1])
			break;
		else if (i == text_len / 2 - 1)
			is_text_palindrome = 1;
	}

	int is_beforetext_palindrome = 0;
	for (int i = 0; i < ((text_len - 1) / 2 + 1) / 2; i++)
	{
		if (text[i] != text[(text_len - 1) / 2 - i - 1])
			break;
		else if (i == ((text_len - 1) / 2 +1) / 2 - 1)
			is_beforetext_palindrome = 1;
	}

	int is_aftertext_palindrome = 0;
	int count = 0;
	for (int i = (text_len + 3) / 2 - 1; i < text_len - (text_len - 1) / 4 ; i++)
	{
		if (text[i] != text[text_len - count - 1])
			break;
		else if (i == text_len - (text_len -1) / 4 - 1)
			is_aftertext_palindrome = 1;
		else
			count += 1;
	}

	printf("%s", is_text_palindrome && is_beforetext_palindrome && is_aftertext_palindrome
		? "Yes\n" : "No\n");
}

Compiler output:
main.c: In function 'main':
main.c:7:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    7 |         scanf_s("%s", text,100);
      |         ^~~~~~~
      |         scanf
main.c:9:24: error: implicit declaration of function 'strnlen_s'; did you mean 'strnlen'? [-Wimplicit-function-declaration]
    9 |         int text_len = strnlen_s(text,100);
      |                        ^~~~~~~~~
      |                        strnlen
Language: C++

#include<bits/stdc++.h>
#define ll long long int
const ll mod=1e9+7;
const int maxn=2e5+50;
using namespace std;
bool isPalindrome(string s)
{
    bool b=true;
    int n=s.size();
    for(int i=0;i<n/2;i++)
    {
    	if(s[i]!=s[n-i-1])
    	{
    		b=false;
    		break;
		}
	}
	return b;
}
int main()
//int found; found=chaine.find(cara); if (found!=std::string::npos) how to verify if a caracter exists in a chaine
// toupper(caractere) ==> return the majuscule of a caractere
//floor(x) Returns the largest integer smaller than x
//ceil(x) returns  Returns the smallest integer greater
{
   string s;
   cin>>s;
   string s1,s2;
   int n=s.size();
   s1=s.substr(0,(n-1)/2);
   s2=s.substr((n+3)/2-1,n-(n+3)/2+1);//
   if(isPalindrome(s)and(isPalindrome(s1))and(isPalindrome(s3)))
   {
   	cout<<"Yes";
   }
   else
   {
   	cout<<"No";
   }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:32:60: error: 's3' was not declared in this scope; did you mean 's2'?
   32 |    if(isPalindrome(s)and(isPalindrome(s1))and(isPalindrome(s3)))
      |                                                            ^~
      |                                                            s2
Language: C++

#include <iostream>

int main(void){
	char moji[200]={0};
	bool flag=true;
	cin >> moji ;

	int strnum = strlen(moji);
	int i;
	for( i=1; i <= strnum/2; i++)
	{
		if(moji[i-1] != moji[strnum-i]){
			break;
		}
	}
	if( strnum/2+1 != i ){
		flag = false;
	}
	strnum = (strlen(moji) -1) /2;
	for( i=1; i <= strnum/2; i++)
	{
		if(moji[i-1] != moji[strnum-i]){
			break;
		}
	}
	if( strnum/2+1 != i ){
		flag = false;
	}
	strnum = strlen(moji);

	for( i=(strnum+3)/2; i <= (strnum*2+(strnum+3))/4; i++)
	{
		if(moji[i-1] != moji[strnum-i]){
			break;
		}
	}
	if( (strnum*2+(strnum+3))/4+1 != i ){
		flag = false;
	}

	if( flag == true ){


		cout << "Yes" << endl;
	}else{
		cout << "No" << endl;
	}
	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |         cin >> moji ;
      |         ^~~
      |         std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:22: error: 'strlen' was not declared in this scope
    8 |         int strnum = strlen(moji);
      |                      ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | 
a.cc:44:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   44 |                 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:44:34: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   44 |                 cout << "Yes" << endl;
      |                                  ^~~~
      |                                  std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:46:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   46 |                 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:46:33: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   46 |                 cout << "No" << endl;
      |                                 ^~~~
      |                                 std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

S = input()
N = len(S)
T = list(S)
M = ((N-1)/2)-1
i = 0
j = int(M)
while i == j:
    if T[i] != T[j]:
        print('No')
        j = -1
        break
    i += 1
    j -= 1
    
P = int((N+3)/2)-1
i = 0
while P < N:
    if T[i] != T[P]:
        print('No')
        j = -1
        break
    i += 1
    P += 1

if j != -1:
    print('Yes')

Compiler output:
a.cc:9:15: warning: multi-character character constant [-Wmultichar]
    9 |         print('No')
      |               ^~~~
a.cc:19:15: warning: multi-character character constant [-Wmultichar]
   19 |         print('No')
      |               ^~~~
a.cc:26:11: warning: multi-character character constant [-Wmultichar]
   26 |     print('Yes')
      |           ^~~~~
a.cc:1:1: error: 'S' does not name a type
    1 | S = input()
      | ^
Language: C++

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

int main() {
    string S;
    cin >> S;
    int N = S.size();

    bool ok1, ok2, ok3;
    string T = S;
    reverse(T.begin(), T.end());
    ok1 = S == T;
    string U = S.substr(0, N / 2);
    string V = U;
    reverse(V.begin(), V.end());
    ok2 = U == W;
    /* string W = S.substr((N + 1) / 2, U.size());
    string X = W;
    reverse(X.begin(), X.end());
    if (W == X) {
        ok3 = true;
    } */

    if (ok1 && ok2) {
        cout << "Yes" << endl;
    }
    else {
        cout << "No" << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:16: error: 'W' was not declared in this scope
   16 |     ok2 = U == W;
      |                ^
Language: C

#include <stdio.h>
#include <string.h>
int main (){
  char S[100],l;
  scanf("%s",S);
  l=strlen(S);
  
  for(int i=0;i<(l)/2;i++){
    if(S[i]==S[l-i-1]){
    }else{
      printf("No");
      return 0;
    }
  }
  
  l=(l-1)/2;
  for(int i=0;i<l/2;i++){
    if(s[i]==s[l-i-1]){
    }else{
      printf("No");
      return 0;
    }
  }
  printf("Yes");
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:18:8: error: 's' undeclared (first use in this function)
   18 |     if(s[i]==s[l-i-1]){
      |        ^
main.c:18:8: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

int main(){
    int S;
    cin >> S;
    int n = S.size();
    vector<char> S(N);

    for (int i = 0; i < n; i++){
        if(S.at(i) != S.at.(n - i - 1)){
        cout << "No" << endl;
        }
        else cout << "Yes" << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: request for member 'size' in 'S', which is of non-class type 'int'
    7 |     int n = S.size();
      |               ^~~~
a.cc:8:18: error: conflicting declaration 'std::vector<char> S'
    8 |     vector<char> S(N);
      |                  ^
a.cc:5:9: note: previous declaration as 'int S'
    5 |     int S;
      |         ^
a.cc:8:20: error: 'N' was not declared in this scope
    8 |     vector<char> S(N);
      |                    ^
a.cc:11:14: error: request for member 'at' in 'S', which is of non-class type 'int'
   11 |         if(S.at(i) != S.at.(n - i - 1)){
      |              ^~
a.cc:11:25: error: request for member 'at' in 'S', which is of non-class type 'int'
   11 |         if(S.at(i) != S.at.(n - i - 1)){
      |                         ^~
a.cc:11:28: error: expected unqualified-id before '(' token
   11 |         if(S.at(i) != S.at.(n - i - 1)){
      |                            ^