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

#include <iostream>
using namespace std;

int main(){
    char string1[20];
    int i, length;
    int flag = 0;
    
    cin >> string1;
    
    length = strlen(string1);
    
    for(i=0;i < length ;i++){
        if(string1[i] != string1[length-i-1]){
            flag = 1;
            break;
   }
}
    
    if (flag) {
        cout << "YES" << endl; 
    }    
    else {
        cout << "NO" << endl; 
    }
    system("pause");
    return 0;
}j

Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: 'strlen' was not declared in this scope
   11 |     length = strlen(string1);
      |              ^~~~~~
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 | using namespace std;
a.cc: At global scope:
a.cc:28:2: error: 'j' does not name a type
   28 | }j
      |  ^
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main()
{
  string s ;
  flag = 0 ;
  cin>>s;
  int long long n = s.size();
  for(int long long i=0;i<=n/2;i++)
  {
    if(s[i] != s[n-i-1])
    {
      cout<<"No";
      flag=1;
      break
    }
  }
  if(flag==0)
    cout<<"Yes";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'flag' was not declared in this scope
    7 |   flag = 0 ;
      |   ^~~~
a.cc:16:12: error: expected ';' before '}' token
   16 |       break
      |            ^
      |            ;
   17 |     }
      |     ~
Language: C

#include<stdio.h>
void main()
{
  char s[100],i,j;
  gets(s);
  j=strlen(s)-1;
  if(j%2!=0)
  	printf("No");  
  for(i=0;i<j;i++)
  {
    if(s[i]!=s[j])
    {
      printf("No");
      break;
    }
    j--;
  }
  if(s[i]=='\0')
  {
    for(i=0,j=(n-1)/2;i<j;i++,j--)
    {
      if(s[i]!=s[j])
      {
        printf("No");
        break;
      }
    }
    if(i==(n-1)/4)
    {
      for(i=(n+1)/2,j=strlen(s)-1;i<j;i++,j--)
      {
        if(s[i]!=s[j])
        {
          printf("No");
          break;
        }
      }
      if(i==j)
        printf("Yes");
    }
    return;
  }
      
      


Compiler output:
main.c: In function 'main':
main.c:5:3: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    5 |   gets(s);
      |   ^~~~
      |   fgets
main.c:6:5: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
    6 |   j=strlen(s)-1;
      |     ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen'
    1 | #include<stdio.h>
  +++ |+#include <string.h>
    2 | void main()
main.c:6:5: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
    6 |   j=strlen(s)-1;
      |     ^~~~~~
main.c:6:5: note: include '<string.h>' or provide a declaration of 'strlen'
main.c:20:16: error: 'n' undeclared (first use in this function)
   20 |     for(i=0,j=(n-1)/2;i<j;i++,j--)
      |                ^
main.c:20:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:42:3: error: expected declaration or statement at end of input
   42 |   }
      |   ^
Language: C++

#include<string>
using namespace std;

int main()
{
	string s;	//文字列
	int N;		//長さ
	cin >> s;

	N = s.size();
	string use_string_Data = s;
	while(N >= 3)
	{
		if (N % 2 == 0) {
			cout << "No" << endl;
			return 0;
		}
		for (int i = 0; i < (N - 1)  / 2; i++) 
		{
			//最後の文字から　＝＝　最初の文字			
			if (use_string_Data[N - 1 - i] != use_string_Data[i])
			{
				cout << "No";
				return 0;
			}
		}
		string buf = "";
		for (int i = 0; i < (N - 1) / 2; i++)
			buf += use_string_Data[i];
		use_string_Data = buf;
		N = use_string_Data.size();
	}
	cout << "Yes" << endl;
	return 0;


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope
    8 |         cin >> s;
      |         ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<string>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:15:25: error: 'cout' was not declared in this scope
   15 |                         cout << "No" << endl;
      |                         ^~~~
a.cc:15:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:41: error: 'endl' was not declared in this scope
   15 |                         cout << "No" << endl;
      |                                         ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include<string>
  +++ |+#include <ostream>
    2 | using namespace std;
a.cc:23:33: error: 'cout' was not declared in this scope
   23 |                                 cout << "No";
      |                                 ^~~~
a.cc:23:33: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:33:9: error: 'cout' was not declared in this scope
   33 |         cout << "Yes" << endl;
      |         ^~~~
a.cc:33:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:33:26: error: 'endl' was not declared in this scope
   33 |         cout << "Yes" << endl;
      |                          ^~~~
a.cc:33:26: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:34:18: error: expected '}' at end of input
   34 |         return 0;
      |                  ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include<iostream>
#include<vector>
#include<string>
#include<cmath>
#include<sstream>
#pragma GCC optimize ("Ofast")
using namespace std;

int main(){
    ios_base::sync_with_stdio(0); cin.tie(0);
    string s;
    cin>>s;
    int n=s.size();
    if (n%2==0) cout <<"No";
    for(int j=0;j<n;j++){
        if(s[j]!=s[n-1-i]) cout<<"No";
        else{
            if (s[j]!=s[((n-1)/2)-i-1]) cout<<"No";
            else{
                if(s[((n+3)/2)-1-i]!=s[n-1-i]) cout <<"No";
                else cout << "Yes";
            }
        }
    }
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:24: error: 'i' was not declared in this scope
   16 |         if(s[j]!=s[n-1-i]) cout<<"No";
      |                        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
	int n;
	string s;
	if allt s=all s;
	else
	break;
	do
	n-1/2=sus s;
	cout<<sus s;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: expected '(' before 'allt'
    7 |         if allt s=all s;
      |            ^~~~
      |            (
a.cc:8:9: error: 'else' without a previous 'if'
    8 |         else
      |         ^~~~
a.cc:9:9: error: break statement not within loop or switch
    9 |         break;
      |         ^~~~~
a.cc:11:15: error: 'sus' was not declared in this scope
   11 |         n-1/2=sus s;
      |               ^~~
a.cc:12:9: error: expected 'while' before 'cout'
   12 |         cout<<sus s;
      |         ^~~~
a.cc:12:9: error: expected '(' before 'cout'
   12 |         cout<<sus s;
      |         ^~~~
      |         (
a.cc:12:15: error: 'sus' was not declared in this scope
   12 |         cout<<sus s;
      |               ^~~
a.cc:12:18: error: expected ')' before 's'
   12 |         cout<<sus s;
      |         ~~~~     ^~
      |                  )
a.cc:12:18: error: expected ';' before 's'
   12 |         cout<<sus s;
      |                  ^~
      |                  ;
Language: C++

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

int main() {

	string S,str;

	bool x = false;
	bool y = false;

	cin >> S;

	str = reverse(S.bigin(), S.end());
	
	if (S == str) {
		cout << "Yes" << endl;
	}
	else {
		cout << "No" << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:25: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'bigin'; did you mean 'begin'?
   13 |         str = reverse(S.bigin(), S.end());
      |                         ^~~~~
      |                         begin
Language: C++

#include <bits/stdc++.h>
#include <algorithm>
using namespace std;
 
int main() {
  string S;
  cin >> S;
  int N =str.size() ;
  string SR = reverse(S.begin(), S.end());
  string S1 = str.substr(1,(N-1)/2);
  string S1R = reverse(S1.begin(), S.end());
  string S2 = str.substr((N+3)/2,N); 
  string S2R = reverse(S2.begin(), S.end());  
 
  if ((S == SR) && (S1 == S1R) && (S2 == S2R){
    cout << "Yes" << endl;
  }
  
  else {
    cout << "No" << endl;
  }
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: 'str' was not declared in this scope; did you mean 'std'?
    8 |   int N =str.size() ;
      |          ^~~
      |          std
a.cc:9:22: error: conversion from 'void' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    9 |   string SR = reverse(S.begin(), S.end());
      |               ~~~~~~~^~~~~~~~~~~~~~~~~~~~
a.cc:11:23: error: conversion from 'void' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   11 |   string S1R = reverse(S1.begin(), S.end());
      |                ~~~~~~~^~~~~~~~~~~~~~~~~~~~~
a.cc:13:23: error: conversion from 'void' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   13 |   string S2R = reverse(S2.begin(), S.end());
      |                ~~~~~~~^~~~~~~~~~~~~~~~~~~~~
a.cc:15:46: error: expected ')' before '{' token
   15 |   if ((S == SR) && (S1 == S1R) && (S2 == S2R){
      |      ~                                       ^
      |                                              )
a.cc:23:1: error: expected primary-expression before '}' token
   23 | }
      | ^
Language: C++

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


bool palincheck(string &test, int i, int j)
{
  while(i<=j)
  {
    if(test[i] != test[j])
    {
      return false;
    }
    i++;
    j--;
  }
  return true;
}
int main()
{
  string test;
  cin>>test;
  int l = test.length();
  int i = 0;
  int j = test.lenght() - 1;
  if(palincheck(test,i,j) && palincheck(test,0,2) && palincheck(test,(((l+3)/2) -1),(l-1)))
    {
       cout<<"Yes";
       return 0;
    }
    else
    {
        cout<<"No";
        return 0;
    }
         
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:16: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'lenght'; did you mean 'length'?
   24 |   int j = test.lenght() - 1;
      |                ^~~~~~
      |                length
Language: C

#include<stdio.h>
#include<conio.h>
void main()
{
  char s[100],i,j;
  gets(s);
  j=strlen(s)-1;
  if(j%2!=0)
  	printf("No");  
  for(i=0;i<j;i++)
  {
    if(s[i]!=s[j])
    {
      printf("No");
      break;
    }
    j--;
  }
  if(s[i]=='\0')
  {
    for(i=0,j=(n-1)/2;i<j;i++,j--)
    {
      if(s[i]!=s[j])
      {
        printf("No");
        break;
      }
    }
    if(i==(n-1)/4)
    {
      for(i=(n+1)/2,j=strlen(s)-1;i<j;i++,j--)
      {
        if(s[i]!=s[j])
        {
          printf("No");
          break;
        }
      }
      if(i==j)
        printf("Yes");
    }
    return;
  }
      
      

Compiler output:
main.c:2:9: fatal error: conio.h: No such file or directory
    2 | #include<conio.h>
      |         ^~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
#define endl '\n'
using namespace std;
 
 
bool check(string a){
        for(int i=0; i<a.length()/2; i++){
                if(a[i] == a[a.length() - i - 1]){
                        continue;
                }else{
                        return false;
                }
 
        }
        return true;
 
}
 
int main(){
         ios::sync_with_stdio(false);    
        cin.tie(0);
        string s;
        cin>>s;
        int l = s.length();
        // cout<<l;
        if(check(s) && check(s.substr(0,(l-1)/2)) && check(s.substr((l+3)/2-1,(l-1)/2))){
                
                cout<<"Yes";
        }else{
                // cout<<check(s) <<check(s.substr(0,(l-1)/2-1))<< check(s.substr((l+3)/2-1,l-1));
                cout<<"No";
        }

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

#define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i,N) for(int i = 0;i < (int)(N);i++)
int main(){
string s;
cin>>s;
  int n=s.size;
  string t="Yes";
  rep(i,n){
   if( a[i]!=a[n-i]){
     t="No";
     break;
   }
  }
   rep(i,(n-1)/2){
   if( a[i]!=a[(n-1)/2-1-i]){
     t="No";
     break;
   }
  }
   rep(i,(n-1)/2){
   if( a[(n-1)/2-1-i]!=a[n-i]){
     t="No";
     break;
   }
  }
  cout<<t<<endl;
}
    
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: cannot convert 'std::__cxx11::basic_string<char>::size' 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'
    9 |   int n=s.size;
      |           ^~~~
a.cc:12:8: error: 'a' was not declared in this scope
   12 |    if( a[i]!=a[n-i]){
      |        ^
a.cc:18:8: error: 'a' was not declared in this scope
   18 |    if( a[i]!=a[(n-1)/2-1-i]){
      |        ^
a.cc:24:8: error: 'a' was not declared in this scope
   24 |    if( a[(n-1)/2-1-i]!=a[n-i]){
      |        ^
Language: C

#include <stdio.h>
int main()
{
char a[256],b[256];
int i,j,s;

scanf("%s",a);
for(i=0;a[i]!=0x00;i++)
{
j=i;
}
for(i=0;i<j;i++)
{
    b[r]=a[n-1-i];
}
r[j]=0;

printf("%s",a);
printf(%s",b);

s=0;
for(i=0;i<j-1;i++)
{
if(a[i]!=b[i] {s++})    
}
if(s)
{

if(s)
{
printf("Yes\n");
else
{
  printf("No\n");
}

}
}
}

Compiler output:
main.c: In function 'main':
main.c:14:7: error: 'r' undeclared (first use in this function)
   14 |     b[r]=a[n-1-i];
      |       ^
main.c:14:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:12: error: 'n' undeclared (first use in this function)
   14 |     b[r]=a[n-1-i];
      |            ^
main.c:19:8: error: expected expression before '%' token
   19 | printf(%s",b);
      |        ^
main.c:19:10: warning: missing terminating " character
   19 | printf(%s",b);
      |          ^
main.c:19:10: error: missing terminating " character
   19 | printf(%s",b);
      |          ^~~~~
main.c:38:2: error: expected ';' before '}' token
   38 | }
      |  ^
      |  ;
   39 | }
      | ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string s;
  cin>>s;
  int x=0,y=0;
   int N=s.size();
  if(N==3){
    if(s.at(0)==s.at(2)){
      x=1;
      y=1;
    }
  }
  else{
  for(int i=0;i<(N-1)/2;i++){
    if(s.at(i)==s.at(N-1-i)){
      x++;
    }
    else 
      x=0;
      break;
  }
  if((N-1)%4==0){
    for(int i=0;i<(N-1)/4;i++){
    if(s.at(i)==s.at((N-1)/2-1-i)
       &&s.at((N+3)/2-1+i)==s.at(N-1-i)){
      y++;
    }
    else
      y=0;
      break;
    }
  }
    else((N-1)%4==1){
    for(int i=0;i<(N-1)/4-1;i++){
    if(s.at(i)==s.at((N-1)/2-1-i)
       &&s.at((N+3)/2-1+i)==s.at(N-1-i)){
      y++;
    }
    else
      y=0;
      break;
    }
  }
  }
  if(x*y>=1) cout<<"Yes"<<endl;
  else if(x*y==0) cout<<"No"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:21: error: expected ';' before '{' token
   34 |     else((N-1)%4==1){
      |                     ^
      |                     ;
Language: C

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

int main()
{
  char str[100],str1[50],str2[50];
  scanf("%s",str);
  if(str == strrev(str))
  {
    for(int i = 0; i <  strlen(str)/2;i++)
      str1[i] = str[i];
    str1[i+1] = '\0';
         if(str1 == strrev(str1))
            {
               for(int k = strlen(str)/2 +1 , j = 0; k <=strlen(str);k++,j++)
                 str2[j] = str[k];
           		str2[j+1] = '\0';
           		if(str2 == strrev(str2))
                {
                  printf("Yes");
                }
           else
             printf("No");
           
            }
    else
      printf("No");
  }
  else
     printf("No");
  return 0;  
}

Compiler output:
main.c: In function 'main':
main.c:8:13: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration]
    8 |   if(str == strrev(str))
      |             ^~~~~~
      |             strsep
main.c:8:10: warning: comparison between pointer and integer
    8 |   if(str == strrev(str))
      |          ^~
main.c:12:10: error: 'i' undeclared (first use in this function)
   12 |     str1[i+1] = '\0';
      |          ^
main.c:12:10: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:18: warning: comparison between pointer and integer
   13 |          if(str1 == strrev(str1))
      |                  ^~
main.c:17:30: error: 'j' undeclared (first use in this function)
   17 |                         str2[j+1] = '\0';
      |                              ^
main.c:18:33: warning: comparison between pointer and integer
   18 |                         if(str2 == strrev(str2))
      |                                 ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ub upper_bound
#define int long long
#define vbe(sdk) sdk.begin(),sdk.end()
#define pb push_back
#define loop(i,a,b) for(int i=a;i<b;++i)
#define rloop(i,a,b) for(int i=a;i>=b;--i)
#define mp make_pair
#define mod 1000000007
#define endl '\n'
#define vvll vector<vector<int> >
#define vll vector<int>
#define mint map<int,int> 
#define sz(x) (int)x.size()
#define sll set<int>
#define pll pair<int,int>
#define F first
#define S second
#define pi 3.14159265358979323846
using namespace std;

bool isPalindrome(char str[]) 
{ 
    // Start from leftmost and rightmost corners of str 
    int l = 0; 
    int h = strlen(str) - 1; 
  
    // Keep comparing characters while they are same 
    while (h > l) 
    { 
        if (str[l++] != str[h--]) 
        { 
            return false;
        } 
    } 
    return true;
} 

signed main()
{
    string s;
    cin>>s;
    int n=s.length();
    if(isPalindrome(s))
    {
        string p=s.substr(0,((n-1)/2));
        string q=s.substr((n+3)/2,n-1);
        if(isPalindrome(p) && isPalindrome(q))
        {
            cout<<"Yes\n";
        }
        else
        {
            cout<<"No\n";
        }
        
    }
    else
    {
        cout<<"No\n";
    }
    
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:46:21: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'char*'
   46 |     if(isPalindrome(s))
      |                     ^
      |                     |
      |                     std::string {aka std::__cxx11::basic_string<char>}
a.cc:24:24: note:   initializing argument 1 of 'bool isPalindrome(char*)'
   24 | bool isPalindrome(char str[])
      |                   ~~~~~^~~~~
a.cc:50:25: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'char*'
   50 |         if(isPalindrome(p) && isPalindrome(q))
      |                         ^
      |                         |
      |                         std::string {aka std::__cxx11::basic_string<char>}
a.cc:24:24: note:   initializing argument 1 of 'bool isPalindrome(char*)'
   24 | bool isPalindrome(char str[])
      |                   ~~~~~^~~~~
a.cc:50:44: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'char*'
   50 |         if(isPalindrome(p) && isPalindrome(q))
      |                                            ^
      |                                            |
      |                                            std::string {aka std::__cxx11::basic_string<char>}
a.cc:24:24: note:   initializing argument 1 of 'bool isPalindrome(char*)'
   24 | bool isPalindrome(char str[])
      |                   ~~~~~^~~~~
Language: C++

#include <bits/stdc++.h>
#define endl '\n'
using namespace std;
 
 
bool check(string a){
        for(int i=0; i<a.length()/2; i++){
                if(a[i] == a[a.length() - i - 1]){
                        continue;
                }else{
                        return false;
                }
 
        }
        return true;
 
}
 
 
 
int main(){
         ios::sync_with_stdio(false);    
        cin.tie(0);
        string s;
        cin>>s;
        int l = s.length();
        // cout<<l;
        if(check(s) && check(s.substr(0,(l-1)/2)) && check(s.substr((l+3)/2-1,(l-1)/2))){
                
                cout<<"Yes";
        }else{
                // cout<<check(s) <<check(s.substr(0,(l-1)/2-1))<< check(s.substr((l+3)/2-1,l-1));
                cout<<"No";
        }

Compiler output:
a.cc: In function 'int main()':
a.cc:34:10: error: expected '}' at end of input
   34 |         }
      |          ^
a.cc:21:11: note: to match this '{'
   21 | int main(){
      |           ^
Language: Java

public class Main {

	public static void main(String[] args) {

		// 読み込み
		Boolean flag1 = false;
		Boolean flag2 = false;
		Boolean flag3 = false;
		
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int N = S.length();

		// 条件1
		StringBuffer sb = new StringBuffer(S);
		sb.reverse();
		if(S.toString().equals(sb.toString())) {
			flag1 = true;
		}
		
		// 条件2
		String parse = S.substring(0, (N -1)/2);
		sb = new StringBuffer(parse);
		sb.reverse();
		if(parse.toString().equals(sb.toString())) {
			flag2 = true;
		}
		//System.out.println(parse + " " + sb);
	
		// 条件3
		parse = S.substring((N+3)/2-1, N);
		sb = new StringBuffer(parse);
		sb.reverse();
		if(parse.toString().equals(sb.toString())) {
			flag3 = true;
		}
		//System.out.println(parse + " " + sb);
		
		if(flag1 == true && flag2 == true && flag3 == true) {
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}
	}
}

Compiler output:
Main.java:10: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:10: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

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

int main(){
  string S;
  cin >> S;
  
  int a,b,c,d,N;
  N = S.size();
  a = 0;
  b = (N-3)/2;
  c = (N+1)/2;
  d = N-1;
  
  int result = 1;
  

  if(N == 3){
    if(S.at(0)!=S.at(2)){
      result = 0;
    }
  }
  
  for (int i = 0; i < (N-1)/4 ; i++) {
    if(!(S.at(a+i)==S.at(b-i)&&S.at(b-i)==S.at(c+i)&&S.at(c+i)==S.at(d-i))){
      result = 0;
      break;
    }
  }
  
  if((N+1)%4 == 0){
    if(S.at((N+1)/4))!=S.at((3*(N+1))/4)){
      result = 0;
    }
  }
  
  if(result == 1){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:22: error: expected primary-expression before '!=' token
   32 |     if(S.at((N+1)/4))!=S.at((3*(N+1))/4)){
      |                      ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define flash ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define pb push_back
#define ff first
#define ss second
signed main()
{
    flash
  char str[99];
  cin>>str;
  int n=strlen(str),flag=0,glag=0;  
  //cout<<n;
    for(int i=0;i<n;i++)
        {
            if(str[i]!=str[n-i-1])
            {
                flag= 1;break;
            }
        }    
        if(f) {cout<<"No"; return 0;}
        else glag++;
        int k=(n-3)/2+1;
        for(int i=0;i<k;i++)
        {
            if(str[i]!=str[k-i-1])
            {
                flag=1; break;
            }
        }
        if(f) {cout<<"No"; return 0;}
        else glag++;
        int j=(n+1)/2;
        for(int i=j;i<n;i++)
        {
            if(str[i]!=str[n-i-1])
            {
                flag=1;break;
            }
        }
        //cout<<f;
        if(f) {cout<<"No"; return 0;}
        else glag++;
        if(glag==3) cout<<"Yes";
} 


Compiler output:
a.cc: In function 'int main()':
a.cc:22:12: error: 'f' was not declared in this scope
   22 |         if(f) {cout<<"No"; return 0;}
      |            ^
a.cc:32:12: error: 'f' was not declared in this scope
   32 |         if(f) {cout<<"No"; return 0;}
      |            ^
a.cc:43:12: error: 'f' was not declared in this scope
   43 |         if(f) {cout<<"No"; return 0;}
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
	int n;
	string s;
	if allt s=all s;
	else
	break;
	do
	n-1/2=sus s;
	cout<<sun s;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: expected '(' before 'allt'
    7 |         if allt s=all s;
      |            ^~~~
      |            (
a.cc:8:9: error: 'else' without a previous 'if'
    8 |         else
      |         ^~~~
a.cc:9:9: error: break statement not within loop or switch
    9 |         break;
      |         ^~~~~
a.cc:11:15: error: 'sus' was not declared in this scope
   11 |         n-1/2=sus s;
      |               ^~~
a.cc:12:9: error: expected 'while' before 'cout'
   12 |         cout<<sun s;
      |         ^~~~
a.cc:12:9: error: expected '(' before 'cout'
   12 |         cout<<sun s;
      |         ^~~~
      |         (
a.cc:12:15: error: 'sun' was not declared in this scope; did you mean 'sin'?
   12 |         cout<<sun s;
      |               ^~~
      |               sin
a.cc:12:18: error: expected ')' before 's'
   12 |         cout<<sun s;
      |         ~~~~     ^~
      |                  )
a.cc:12:18: error: expected ';' before 's'
   12 |         cout<<sun s;
      |                  ^~
      |                  ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int len,i,j,len1,len2,count=0,count1=0,count2=0;
    char s[99];
    cin>>s;
    len=strlen(s);
    char s1[(len-1)/2],s2[len-((len+3)/2)+1];
    for(i=0;i<(len-1)/2;i++)
    {
        if(s[i]==s[len-1-i])
        count++;
    }
    for(i=0;i<(len-1)/2;i++)
    s1[i]=s[i];
    len1=((len-1)/2);
    for(i=0;i<(len1-1)/2;i++)
    {
        if(s1[i]==s1[len1-1-i])
        count1++;
    }
    j=0;
    for(i=(len+3)/2-1;i<len;i++)
    {
        s2[j]=s[i];
        j++;
    }
    len2=j-1;
    for(i=0;i<(len2-1)/2;i++)
    {
        if(s2[i]==s2[len2-1-i])
        count2++;
    }
     if((count==(len-1)/2)&&(count1==(len1-1)/2)&&(count2==(len2-1)/2)
    cout<<"Yes";
    else
    cout<<"No";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:71: error: expected ';' before 'cout'
   35 |      if((count==(len-1)/2)&&(count1==(len1-1)/2)&&(count2==(len2-1)/2)
      |                                                                       ^
      |                                                                       ;
   36 |     cout<<"Yes";
      |     ~~~~                                                               
a.cc:37:5: error: expected primary-expression before 'else'
   37 |     else
      |     ^~~~
a.cc:36:17: error: expected ')' before 'else'
   36 |     cout<<"Yes";
      |                 ^
      |                 )
   37 |     else
      |     ~~~~         
a.cc:35:8: note: to match this '('
   35 |      if((count==(len-1)/2)&&(count1==(len1-1)/2)&&(count2==(len2-1)/2)
      |        ^
Language: C++

#include<iostream>
using namespace std;
int main()
{ char s[100];
   cin>>s;
 int flag=0;
 for(int i=0;i<strlen(s)/2;i++){
   if(s[i]!=s[strlen(s)-i-1]){
   flag=1;
     break;
   }
 }
 if(flag==0){
   cout<<"Yes";
 }
 else{
   cout<<"No";}
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: 'strlen' was not declared in this scope
    7 |  for(int i=0;i<strlen(s)/2;i++){
      |                ^~~~~~
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 | using namespace std;
Language: C++

s = input()

def is_kaibun(kaibun):
    for i in range(len(kaibun)//2):
        if kaibun[i] != kaibun[-i-1]:
            return False
    return True

n =len(s)
s1 = s[0:(n-1)//2]
s2 = s[(n+1)//2:n]

if is_kaibun(s) and is_kaibun(s1) and is_kaibun(s2):
	print("Yes")
else:
	print("No")

Compiler output:
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;
  bool judge=true;
  
  for(int i=0;i<S.size();i++){
    if(S.at(i)!=S.at(S.size()-i) ){
      judge=false;
    }
  }
  
  for(int i=0;i<(S.size()-1)/2;i++){
    if(S.at(i)!=S.at((S.size()-1)/2-i) ){
      judge=false;
    }
  }
  
  for(int i=0;i<(S.size()-3)/2;i++){
      if(S.at(S.size()+3)/2+i==S.at(S.size()-i) )
        judge=false;
    }
  }
  
  if(judge==true){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
  
}

Compiler output:
a.cc:27:3: error: expected unqualified-id before 'if'
   27 |   if(judge==true){
      |   ^~
a.cc:30:3: error: expected unqualified-id before 'else'
   30 |   else{
      |   ^~~~
a.cc:34:1: error: expected declaration before '}' token
   34 | }
      | ^
Language: C++

#include <stdlib.h>
#include <iostream>
 
using namespace std;
 
int main()
{
    string s;
    cin>>s;
    int l=s.size();
    int t=(l-1)/2;
    for(int i=0;i<t;i++)
    {
      if(s[i]==s[t-i-1])
      {
        continue;
      }
      else
      {
        cout<<"NA";
        return 0;
      }
    }
  String s2=s.substring(0,t-1);
  string s3=s.subbstring(t+1,t-1);
  if(s2==s3)
  {
    cout<<"YES";
  }
  else
  {
    cout<<"NA";
  }
  return 0;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:3: error: 'String' was not declared in this scope
   24 |   String s2=s.substring(0,t-1);
      |   ^~~~~~
a.cc:25:15: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'subbstring'; did you mean 'substr'?
   25 |   string s3=s.subbstring(t+1,t-1);
      |               ^~~~~~~~~~
      |               substr
a.cc:26:6: error: 's2' was not declared in this scope; did you mean 's3'?
   26 |   if(s2==s3)
      |      ^~
      |      s3
Language: C++

#include <bits/stdc++.h>

using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
typedef long long ll;


int main(){
  string s;
  cin >> s;
  int n = s.size();
  int x = (n-1)/2;
  int y = (n+3)/2;
  int count = 0;
  rep(i,n/2){
    if(s[i]==s[n-1-i]){
      count++;
      break;
    }
  }
  rep(i,n/4){
    if(s[y-1-i]==s[n-1-i]){
      count++;
      break;
    }a
  }
  rep(i,n/4){
    if(s[i]==s[x-1-i]){
      count++;
      break;
    }
  }
  cout << count << endl;
  if(count==3)cout << "Yes" << endl;
  else if(n==3 || count==1)cout << "Yes" << endl;
  else cout << "No" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:6: error: 'a' was not declared in this scope
   26 |     }a
      |      ^
Language: C++

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

bool judge(char str[])
{
	int len=strlen(str);
	
	for(int i=0;i<len/2;i++)
	   if(str[i]!=str[len-1-i])
	     return false;
	   
	return true;
	
}

int main()
{
    char str[105],str1[105],str2[105]; 
	int i,len;
	
	while(gets(str));
	
    len=strlen(str);
    
    for(i=0;i<=(len-1)/2;i++)
       str1[i]=str[i];
    
    for(i=(len+3)/2;i<=len;i++)
       str2[i]=str[i];
    
    bool flag,flag1;
	flag=judge(str1);
	flag1=judge(str2);
	if(flag==true&&flag1==true)
      cout<<"Yes";
	else
	  cout<<"No";;
	  	  
	return 0;
	
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:21:15: error: 'gets' was not declared in this scope; did you mean 'getw'?
   21 |         while(gets(str));
      |               ^~~~
      |               getw
Language: Java

public class Main 
{

	public static void main(String[] args) 
	{
		Scanner sc = new Scanner(System.in);
		
		String s = 		sc.next();
		
		String firstCheck = s.substring(0,(s.length()-1)/2);
		System.out.println("firstCheck is: "+firstCheck);
		
		String seconCheck = s.substring((s.length()+3)/2 - 1, s.length());
		System.out.println("seconCheck is: "+seconCheck);
		
		if(checkPalindrome(s) && checkPalindrome(firstCheck) && checkPalindrome(seconCheck))
		{
			System.out.println("Yes");
		}
		else
		{
			System.out.println("No");
		}
		
		
		
		

	}
	
	public static boolean checkPalindrome(String a)
	{
		String b = "";
		
		for(int i=a.length()-1; i>=0; i-- )
		{
			b += a.charAt(i);
		}
		
		//System.out.println("a is: "+a);
		//System.out.println("b is: "+b);
		
		if(a.equals(b))
		{
			return true;
		}
		
		return false;
	}

}


Compiler output:
Main.java:6: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:6: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
	string S;
  	cin >> S;
  	int N;
  	S.size() == N;
  	for(int i = 0; i <= (N-1)/4;i++){
    	if(S[i] == S[(N-1)/2-i]){
        	for(int j= (N+3)/2-1;(N+3)/2 < j < (3*N + 5)/4 ;j++){
            	if(S[j]==S[(N+1)/2])
                else {
                  cout << "NO" << endl;
                  break;
                }
            }
          
        }
      	else {
      		cout << "NO" << endl;
       		break;
      	}
    }
  	cout << "YES" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: expected primary-expression before 'else'
   12 |                 else {
      |                 ^~~~
Language: C++

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

bool judge(char str[])
{
	int len=strlen(str);
	
	for(int i=0;i<len/2;i++)
	   if(str[i]!=str[len-1-i])
	     return false;
	   
	return true;
	
}

int main()
{
    char str[105],str1[105],str2[105]; 
	int i,len;
	
	gets(str);
    len=strlen(str);
    
    for(i=0;i<=(len-1)/2;i++)
       str1[i]=str[i];
    
    for(i=(len+3)/2;i<=len;i++)
       str2[i]=str[i];
    
    bool flag,flag1;
	flag=judge(str1);
	flag1=judge(str2);
	if(flag==true&&flag1==true)
      cout<<"Yes";
	else
	  cout<<"No";;
	  	  
	return 0;
	
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:21:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   21 |         gets(str);
      |         ^~~~
      |         getw
Language: C++

#include <bits/stdc++.h>
#define fast() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define ll long long int
using namespace std;
 
int main() {
    fast();
    string s;
    cin >> s;
    int flag=0;
    ll n = s.length();
    for(ll i=0;i<n;i++){
        if(s[i] != s[n-1-i])
        	flag=1;
    }
    int j = (s.length()+3)/2-1;
    int i = 0;
    for(; j < s.length() && i < s.length(); j++, i++){
        if(s[j]!=s[s.length()-1-i]){
            flag=1;
        }
    }
    if(flag)
    	cout<<"No";
    else
    	cout<<"Yes";
  	return 0
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:17: error: expected ';' before '}' token
   27 |         return 0
      |                 ^
      |                 ;
   28 | }
      | ~
Language: C++

    if(A != B){
      cout << "No"<<endl;
      break;
    }
    char C = S.at(N/2-i-1);
    if(A != C){
      cout <<"No"<<endl;
      break;
    }
    char D = S.at(N/2+1+i);
    char E = S.at(N-i-1);
    if(D != E){
      cout <<"No"<<endl;
      break;
    }
    if(i = (N/2)-1){
    cout <<"Yes"<<endl;
    }
  }


}

Compiler output:
a.cc:1:5: error: expected unqualified-id before 'if'
    1 |     if(A != B){
      |     ^~
a.cc:5:14: error: 'S' was not declared in this scope
    5 |     char C = S.at(N/2-i-1);
      |              ^
a.cc:5:19: error: 'N' was not declared in this scope
    5 |     char C = S.at(N/2-i-1);
      |                   ^
a.cc:5:23: error: 'i' was not declared in this scope
    5 |     char C = S.at(N/2-i-1);
      |                       ^
a.cc:6:5: error: expected unqualified-id before 'if'
    6 |     if(A != C){
      |     ^~
a.cc:10:14: error: 'S' was not declared in this scope
   10 |     char D = S.at(N/2+1+i);
      |              ^
a.cc:10:19: error: 'N' was not declared in this scope
   10 |     char D = S.at(N/2+1+i);
      |                   ^
a.cc:10:25: error: 'i' was not declared in this scope
   10 |     char D = S.at(N/2+1+i);
      |                         ^
a.cc:11:14: error: 'S' was not declared in this scope
   11 |     char E = S.at(N-i-1);
      |              ^
a.cc:11:19: error: 'N' was not declared in this scope
   11 |     char E = S.at(N-i-1);
      |                   ^
a.cc:11:21: error: 'i' was not declared in this scope
   11 |     char E = S.at(N-i-1);
      |                     ^
a.cc:12:5: error: expected unqualified-id before 'if'
   12 |     if(D != E){
      |     ^~
a.cc:16:5: error: expected unqualified-id before 'if'
   16 |     if(i = (N/2)-1){
      |     ^~
a.cc:19:3: error: expected declaration before '}' token
   19 |   }
      |   ^
a.cc:22:1: error: expected declaration before '}' token
   22 | }
      | ^
Language: Java

import java.util.*;

 public class MyClass {
     
    static boolean isPalindrome(char str[], int l, int h) 
    { 
        while (h > l) 
        { 
            if (str[l++] != str[h--]) 
            { 
                return false; 
            } 
        } 
        return true; 
    } 

    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        int n = s.length();
        if(n%2==0) {
            System.out.println("NO");
        }
        else {
            if( isPalindrome(s.toCharArray(), 0, (n-3)/2) && isPalindrome(s.toCharArray(), (n+1)/2, n-1) ) System.out.println("YES");
            else System.out.println("NO");
        }
    }
}

Compiler output:
Main.java:3: error: class MyClass is public, should be declared in a file named MyClass.java
 public class MyClass {
        ^
1 error
Language: C++

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

int main() {
    string S;
    cin >> S;
    int len = S.size();
    for(int i = 0; i < (len-1)/2; i++){
        if(S.at(i) != S.at(((len-2)/2)-i) {
              cout << "No" << endl;
          break;
        }       
           else{
             continue;
           }
           }
    for(int j = 0; j < (len+1)/2; j++){
      if(S.at(j) != S.at(len-1-j) {
        cout << "No" << endl;
          break;
    }
         else{
           cout << "Yes" << endl;
           }
}
         }

Compiler output:
a.cc: In function 'int main()':
a.cc:9:42: error: expected ')' before '{' token
    9 |         if(S.at(i) != S.at(((len-2)/2)-i) {
      |           ~                              ^~
      |                                          )
a.cc:16:12: error: expected primary-expression before '}' token
   16 |            }
      |            ^
a.cc:18:34: error: expected ')' before '{' token
   18 |       if(S.at(j) != S.at(len-1-j) {
      |         ~                        ^~
      |                                  )
a.cc:25:1: error: expected primary-expression before '}' token
   25 | }
      | ^
Language: C++

#include <algorithm>
#include <string>
using namespace std;
int main(){
    string s;
    cin>>s;
    int n=s.size();
    string s1=s,s2=s,s3=s;
    s1=s1.erase((n-1)/2);
    s2=s2.substr((n+1)/2);
    string s4=s1,s5=s2;
    reverse(s3.begin(), s3.end());
    reverse(s4.begin(), s4.end());
    reverse(s5.begin(), s5.end());
    if(s==s3&&s1==s4&&s2==s5){
        cout<<"Yes"<<endl;
    }
    else{
        cout<<"No"<<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope
    6 |     cin>>s;
      |     ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <string>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:16:9: error: 'cout' was not declared in this scope
   16 |         cout<<"Yes"<<endl;
      |         ^~~~
a.cc:16:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:22: error: 'endl' was not declared in this scope
   16 |         cout<<"Yes"<<endl;
      |                      ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <string>
  +++ |+#include <ostream>
    3 | using namespace std;
a.cc:19:9: error: 'cout' was not declared in this scope
   19 |         cout<<"No"<<endl;
      |         ^~~~
a.cc:19:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:19:21: error: 'endl' was not declared in this scope
   19 |         cout<<"No"<<endl;
      |                     ^~~~
a.cc:19:21: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  string s;
  cin>>s;int found=0;
  int l=s.size();
  int n1=(l-1)/2;
  int n2=(l+3)/2;
  for(int i=0;i<n1/2;i++ )
  {  if(s[i]!=s[n1-i-1])
        {found=1;break;}
  } int k=1;
  for(int i=n2-1;i<l;i++ )
  {  if(s[i]!=s[l-k])
        {found=1;break;}k++;
  }
  for(int i=0;i<l/2;i++ )
  {  if(s[i]!=s[l-i-1])
        {found=1;break;}
  } 
   if(found==1)
   {cout<<"Yes";}
  else
  {cout<<"No":}
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:14: error: expected ';' before ':' token
   25 |   {cout<<"No":}
      |              ^
      |              ;
Language: C++

#include <iostream>
#include <string>

using namespace std;

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

	int full_size = str.size();
	
	string str_f_half = str.substr(0, (full_size - 1) / 2);
	string str_b_half = str.substr((full_size + 1) / 2, (full_size + 3) / 2);
	reverse(str_b_half.begin(), str_b_half.end());

	bool flag = false;

	if (str_f_half == str_b_half) {
		int half_size = str_f_half.size();
		string str_ff_quorter = str_f_half.substr(0, (half_size - 1) / 2);
		string str_fb_quorter = str_f_half.substr((half_size + 1) / 2, (half_size + 3) / 2);
		reverse(str_fb_quorter.begin(), str_fb_quorter.end());

		string str_bf_quorter = str_b_half.substr(0, (half_size - 1) / 2);
		string str_bb_quorter = str_b_half.substr((half_size + 1) / 2, (half_size + 3) / 2);
		reverse(str_bb_quorter.begin(), str_bb_quorter.end());

		if (str_ff_quorter == str_fb_quorter && str_bf_quorter == str_bb_quorter) {
			flag = true;
		}
	}
	if (flag) {
		cout << "Yes" << endl;
	}
	else {
		cout << "No" << endl;
	}
}


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

#include<bits/stdc++.h>
#define endl '\n'
using namespace std;
class A
{
public:
    void isPalindrome();
};
void isPalindrome(string str[]) 
{
  	bool flag = false;
    int l = 0; 
    int h = strlen(str) - 1; 
    while (h > l) 
    { 
        if (str[l++] != str[h--]) 
        { 
            flag = true;  
        } 
    }
}
int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    string S,a,b;
  	cin >> S;
  	for(int i = 0; i < (S.length()-1)/2-1; i++) {
        a += S[i];
    }
	for(int i = (S.length()+3)/2-1; i < S.length(); i++){
      	b += S[i];
    }
    isPalindrome(S);
    isPalindrome(a);
    isPalindrome(b);
  	if(flag == false) cout << "Yes";
  	else cout << "No";
}

Compiler output:
a.cc: In function 'void isPalindrome(std::string*)':
a.cc:13:20: error: cannot convert 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'const char*'
   13 |     int h = strlen(str) - 1;
      |                    ^~~
      |                    |
      |                    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:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
a.cc: In function 'int main()':
a.cc:33:18: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'std::string*' {aka 'std::__cxx11::basic_string<char>*'}
   33 |     isPalindrome(S);
      |                  ^
      |                  |
      |                  std::string {aka std::__cxx11::basic_string<char>}
a.cc:9:26: note:   initializing argument 1 of 'void isPalindrome(std::string*)'
    9 | void isPalindrome(string str[])
      |                   ~~~~~~~^~~~~
a.cc:34:18: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'std::string*' {aka 'std::__cxx11::basic_string<char>*'}
   34 |     isPalindrome(a);
      |                  ^
      |                  |
      |                  std::string {aka std::__cxx11::basic_string<char>}
a.cc:9:26: note:   initializing argument 1 of 'void isPalindrome(std::string*)'
    9 | void isPalindrome(string str[])
      |                   ~~~~~~~^~~~~
a.cc:35:18: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'std::string*' {aka 'std::__cxx11::basic_string<char>*'}
   35 |     isPalindrome(b);
      |                  ^
      |                  |
      |                  std::string {aka std::__cxx11::basic_string<char>}
a.cc:9:26: note:   initializing argument 1 of 'void isPalindrome(std::string*)'
    9 | void isPalindrome(string str[])
      |                   ~~~~~~~^~~~~
a.cc:36:12: error: 'flag' was not declared in this scope
   36 |         if(flag == false) cout << "Yes";
      |            ^~~~
Language: Java

import java.util.*;
import java.io.*;
public class Main{
  public static void main(String[] args) throws Exception{
Scanner sc = new Scanner(System.in);
    String s = sc.nextLine();
    int length = s.length();
    int i = (length-1)/2-1;
    int j = (length+3)/2-1;
    if(isPalindrome(s,0,length-1) && isPalindrome(s,0,i) && isPalindrome(s,j,length-1)){
      System.out.println("Yes");
      
      System.out.println("No");
  
  
  
  }
    public boolean isPalindrome(String s,int i,int j){
      while(i<=j){
        if(s.charAt(i)!=s.charAt(j)){
          return false;
        }
        i++;
        j--;
      
    }
      if(i>j){
        return true;
      }
    return false;
      
}
  }

Compiler output:
Main.java:18: error: illegal start of expression
    public boolean isPalindrome(String s,int i,int j){
    ^
1 error
Language: C++

#include <iostream>
using namespace std;
 
int main()
{
  string S;
  
  cin >> S;
  int N = S.size();
 
  int N1 = N;
  int N2 = (N - 1)/2;
  int N3start = (N + 3)/2;
 
  // 条件１
  for(int i = 0; i < (N1 - 1)/2; ++i)
  {
    if(S[i] != S[N-1-i])
    {
      cout << "No" << endl;
      return 0;
    }
  }
  
  // 条件2
  string S2 = S.substr(0, N2);
  for(int i = 0; i < (N2 - 1)/2; ++i)
  {
    if(S2[i] != S2[N-1-i])
    {
      cout << "No" << endl;
      return 0;
    }
  }
  
  // 条件3
  string S3 = S.substr(0, N3start);
  for(int i = N3start; i < (N + N3start)/2; ++i)
  {
    if(S3[i] != S3[N-1-i])
    {
      cout << "No" << endl;
      return 0;
    }
  }
 
  cout << "Yes" << endl;
 
  return 0;
}
#include <iostream>
using namespace std;
 
int main()
{
  string S;
  
  cin >> S;
  int N = S.size();
 
  int N1 = N;
  int N2 = (N - 1)/2;
  int N3start = (N + 3)/2;
 
  // 条件１
  for(int i = 0; i < (N1 - 1)/2; ++i)
  {
    if(S[i] != S[N-1-i])
    {
      cout << "No" << endl;
      return 0;
    }
  }
  
  // 条件2
  string S2 = S.substr(0, N2);
  for(int i = 0; i < (N2 - 1)/2; ++i)
  {
    if(S2[i] != S2[N-1-i])
    {
      cout << "No" << endl;
      return 0;
    }
  }
  
  // 条件3
  string S3 = S.substr(N3start);
  for(int i = N3start; i < (N + N3start)/2; ++i)
  {
    if(S3[i] != S3[N-1-i])
    {
      cout << "No" << endl;
      return 0;
    }
  }
 
  cout << "Yes" << endl;
 
  return 0;
}

Compiler output:
a.cc:54:5: error: redefinition of 'int main()'
   54 | int main()
      |     ^~~~
a.cc:4:5: note: 'int main()' previously defined here
    4 | int main()
      |     ^~~~