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

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

#define min(a, b) ((a) > (b) ? (b) : (a))
#define max(a, b) ((a) > (b) ? (a) : (b))

bool isPalindrome(string s) {
    string t(s.rbegin(), s.rend());
    return s == t;
}

int main(void) {
    string s;
    cin >> s;
    int n = s.size();
    if(isPalindrome(s) && isPalindrome(s.substr(0, (n - 1) / 2)) && isPalindrome(s.substr(s.substr((n + 1) / 2))))) cout << "Yes" << endl;
    else cout << "No" << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:99: error: cannot convert 'std::__cxx11::basic_string<char>' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
   16 |     if(isPalindrome(s) && isPalindrome(s.substr(0, (n - 1) / 2)) && isPalindrome(s.substr(s.substr((n + 1) / 2))))) cout << "Yes" << endl;
      |                                                                                           ~~~~~~~~^~~~~~~~~~~~~
      |                                                                                                   |
      |                                                                                                   std::__cxx11::basic_string<char>
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:3208:24: note:   initializing argument 1 of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::substr(size_type, size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
 3208 |       substr(size_type __pos = 0, size_type __n = npos) const
      |              ~~~~~~~~~~^~~~~~~~~
a.cc:16:115: error: expected primary-expression before ')' token
   16 |     if(isPalindrome(s) && isPalindrome(s.substr(0, (n - 1) / 2)) && isPalindrome(s.substr(s.substr((n + 1) / 2))))) cout << "Yes" << endl;
      |                                                                                                                   ^
Language: C++

#include <iostream>
#include <algorithm>
#include <string>

bool solve(string s) {
    string t = s;
    reverse(t.begin(), t.end());
    if (t != s) return false;
    reverse(t.begin(), t.begin() + ((int)t.size() - 1) / 2);
    reverse(t.begin() + ((int)t.size() + 3) / 2, t.end());
    return (t == s);
}

int main() {
    ios::sync_with_stdio(false);
    string s;
    cin >> s;
    cout << (solve(s) ? "Yes" : "No") << endl;
}


Compiler output:
a.cc:5:12: error: 'string' was not declared in this scope
    5 | bool solve(string s) {
      |            ^~~~~~
a.cc:5: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:15:5: error: 'ios' has not been declared
   15 |     ios::sync_with_stdio(false);
      |     ^~~
a.cc:16:5: error: 'string' was not declared in this scope
   16 |     string s;
      |     ^~~~~~
a.cc:16:5: 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:17:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   17 |     cin >> s;
      |     ^~~
      |     std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:17:12: error: 's' was not declared in this scope
   17 |     cin >> s;
      |            ^
a.cc:18:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   18 |     cout << (solve(s) ? "Yes" : "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:18:19: error: 'solve' cannot be used as a function
   18 |     cout << (solve(s) ? "Yes" : "No") << endl;
      |              ~~~~~^~~
a.cc:18:42: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   18 |     cout << (solve(s) ? "Yes" : "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++

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

#define min(a, b) ((a) > (b) ? (b) : (a))
#define max(a, b) ((a) > (b) ? (a) : (b))

bool isPalindrome(string s) {
    string t(s.rbegin(), s.rend());
    return s == t;
}

int main(void) {
    string s;
    cin >> s;
    int n = s.size();
    if(isPalindrome(s) && isPalindrome(s.substr(0, (n - 1) / 2) && isPalindrome(s.substr(s.substr((n + 1) / 2))))) cout << "Yes" << endl;
    else cout << "No" << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:98: error: cannot convert 'std::__cxx11::basic_string<char>' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
   16 |     if(isPalindrome(s) && isPalindrome(s.substr(0, (n - 1) / 2) && isPalindrome(s.substr(s.substr((n + 1) / 2))))) cout << "Yes" << endl;
      |                                                                                          ~~~~~~~~^~~~~~~~~~~~~
      |                                                                                                  |
      |                                                                                                  std::__cxx11::basic_string<char>
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:3208:24: note:   initializing argument 1 of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::substr(size_type, size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
 3208 |       substr(size_type __pos = 0, size_type __n = npos) const
      |              ~~~~~~~~~~^~~~~~~~~
Language: C++


#include<bits/stdc++.h>
using namespace std;
#define forr(x,n) for(int x = 0; x < n; ++x)
#define pr pair<int,int>
#define ll long long int
const ll mod=998244353;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    string s;
    cin>>s;
    string ans="Yes";
    int i=0,n=s.length();
    int j=n-1;
    while(i<j)
    {
        if(s[i]!==s[j])
        ans="No";
        i++;
        j--;
    }
    int m=n/2;
    i=0;
    j=m-1;
    while(i<j)
    {
        if(s[i]!==s[j])
        ans="No";
        i++;
        j--;
    }
    i=m+1;
    j=n-1;
    while(i<j)
    {
        if(s[i]!==s[j])
        ans="No";
        i++;
        j--;
    }
    cout<<ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:18: error: expected primary-expression before '=' token
   21 |         if(s[i]!==s[j])
      |                  ^
a.cc:31:18: error: expected primary-expression before '=' token
   31 |         if(s[i]!==s[j])
      |                  ^
a.cc:40:18: error: expected primary-expression before '=' token
   40 |         if(s[i]!==s[j])
      |                  ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    string str;
    cin>>str;
int n=str.length(),flag=1;
for(int i=0;i<((n-1)/2+1)/2;i++){
    if(str[i]!=str[(n-1)/2-i-1])
    {
        flag=0;
     break;
    }
}
if(!flag){
    cout<<"No";
    return 0;
}
for(int i=(n+3)/2;i<=(n+(n+3)/2)/2;i++){
  if(str[i-1]!=str[n+(n+3)/2-i-1abbabb])
    {

        flag=0;
     break;
    }

}
 if(flag)
        cout<<"Yes";
    else cout<<"No";
    return 1;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:32: error: unable to find numeric literal operator 'operator""abbabb'
   19 |   if(str[i-1]!=str[n+(n+3)/2-i-1abbabb])
      |                                ^~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#ifdef LOCAL_DEBUG
  #include "LOCAL_DEBUG.hpp"
#endif
#define int long long

bool kai(string s){
  string t = s;
  reverse(t.begin(),t.end());
  return t == s;
}

signed main(){

  string s; cin >> s;
  if(kai(s) && kai(s.substr(0, n/2))){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:32: error: 'n' was not declared in this scope
   17 |   if(kai(s) && kai(s.substr(0, n/2))){
      |                                ^
Language: C

#include<stdio.h>
int RS(char *s){
	int i=0;
	while(1){
		if(s[i]==0)break;
		i++;
	}
	int k=1;
	for(int j=0;j<(i-1)/2;j++){
		if(s[j]!=s[i-j-1])k=0;
	}
	if(i>1&&k)return 1;
	return 0;
}
int RS2(char *s){
	int i=0;
	while(1){
		if(s[i]==0)break;
		i++;
	}
	i=(i-1)/2;
	int k=1;
	for(int j=0;j<i/2;j++){
		if(s[j]!=s[i-j-1])k=0;
	}
	if(i>1&&k)return 1;
	return 0;
}
int main(){
	char s[100]={0};
	scanf("%s",s);
	if(RS(s)&&RS2(s)/)printf("Yes");
	else printf("No");
}

Compiler output:
main.c: In function 'main':
main.c:32:26: error: expected expression before ')' token
   32 |         if(RS(s)&&RS2(s)/)printf("Yes");
      |                          ^
Language: C++

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


Compiler output:
a.cc: In function 'int32_t main()':
a.cc:9:12: error: 'r' was not declared in this scope
    9 |         if(r!=flag)
      |            ^
Language: C

#include<stdio.h>
#include<string.h>
int main(void){

	char a[100];
	int i, n, k;

	scanf("%s",a);
	n = strlen(a);

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

	n = (n-1)/2;

	for(i=0; i<n-1-i; i++){
		if(a[i] != a[n-1-i]){
			puts("No");
			return 0;
		}
	}
}
	}
	puts("Yes");
	return 0;
}


Compiler output:
main.c:27:9: error: expected identifier or '(' before '}' token
   27 |         }
      |         ^
main.c:28:14: error: expected declaration specifiers or '...' before string constant
   28 |         puts("Yes");
      |              ^~~~~
main.c:29:9: error: expected identifier or '(' before 'return'
   29 |         return 0;
      |         ^~~~~~
main.c:30:1: error: expected identifier or '(' before '}' token
   30 | }
      | ^
Language: C

#include<stdio.h>
int RS(char *s){
	int i=0;
	while(1){
		if(s[i]==0)break;
		i++;
	}
	int k=1;
	for(int j=0;j<(i-1)/2;j++){
		if(s[j]==s[i-j-1]);
	}
	if(i>1&&k)return 1;
	return 0;
}
int RS2(char *s){
	int i=0;
	while(1){
		if(s[i]==0)break;
		i++;
	}
	i=(i-1)/2
	int k=1;
	for(int j=0;j<(i-1)/2;j++){
		if(s[j]==s[i-j-1]);
	}
	if(i>1&&k)return 1;
	return 0;
}
int RS3(char *s){
	int i=0;
	while(1){
		if(s[i]==0)break;
		i++;
	}
	int k=1;
	for(int j=(i+3)/2-1;j<(i-1)/2;j++){
		if(s[j]==s[i-(i+3)/2]);
	}
	if(i>1&&k)return 1;
	return 0;
}
int main(){
	char s[100];
	scanf("%s",s);
	if(RS(s)&&RS2(s)&&RS3(s))printf("Yes");
	else printf("No");
}

Compiler output:
main.c: In function 'RS2':
main.c:21:18: error: expected ';' before 'int'
   21 |         i=(i-1)/2
      |                  ^
      |                  ;
   22 |         int k=1;
      |         ~~~       
main.c:26:17: error: 'k' undeclared (first use in this function)
   26 |         if(i>1&&k)return 1;
      |                 ^
main.c:26:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int RS(char *s){
	int i=0;
	while(1){
		if(s[i]==0)break;
		i++;
	}
	int k=1;
	for(int j=0;j<(i-1)/2;j++){
		if(s[j]==s[i-j-1])
	}
	if(i>1&&k)return 1;
	return 0;
}
int RS2(char *s){
	int i=0;
	while(1){
		if(s[i]==0)break;
		i++;
	}
	i=(i-1)/2
	int k=1;
	for(int j=0;j<(i-1)/2;j++){
		if(s[j]==s[i-j-1])
	}
	if(i>1&&k)return 1;
	return 0;
}
int RS3(char *s){
	int i=0;
	while(1){
		if(s[i]==0)break;
		i++;
	}
	int k=1;
	for(int j=(i+3)/2-1;j<(i-1)/2;j++){
		if(s[j]==s[i-(i+3)/2])
	}
	if(i>1&&k)return 1;
	return 0;
}
int main(){
	char s[100];
	scanf("%s",s);
	if(RS(s)&&RS2(s)&&RS3(s))printf("Yes");
	else printf("No");
}

Compiler output:
main.c: In function 'RS':
main.c:11:9: error: expected expression before '}' token
   11 |         }
      |         ^
main.c: In function 'RS2':
main.c:21:18: error: expected ';' before 'int'
   21 |         i=(i-1)/2
      |                  ^
      |                  ;
   22 |         int k=1;
      |         ~~~       
main.c:25:9: error: expected expression before '}' token
   25 |         }
      |         ^
main.c:26:17: error: 'k' undeclared (first use in this function)
   26 |         if(i>1&&k)return 1;
      |                 ^
main.c:26:17: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'RS3':
main.c:38:9: error: expected expression before '}' token
   38 |         }
      |         ^
Language: C++

#include <iostream>
#include <string.h>
#include<cstdio>
using namespace std;

int main() {
    char s[100];
    int n, i;
    gets(s);
    n = strlen(s);

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

    cout << "Yes" << endl;
    return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
  string str, a, b, ans="Yes";

    cin >> str;
    a = str.substr(0, (str.size()-1)/2);
    b = str.substr((str.size()+3)/2-1, str.size());
    for(int i=0; i<a.size(); i++)
      if(str[str.size()-(i+1)] != a[i]]) ans = "No";

    for(int i=0; i<b.size(); i++)
      if(str[str.size()-(i+1)] != b[i]) ans = "No";


    cout << ans << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:11:39: error: expected ')' before ']' token
   11 |       if(str[str.size()-(i+1)] != a[i]]) ans = "No";
      |         ~                             ^
      |                                       )
a.cc:11:39: error: expected primary-expression before ']' token
a.cc:17:25: error: expected '}' at end of input
   17 |     cout << ans << endl;
      |                         ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
bool pl(char a[]){
	for(int i=0;i<strlen(a);i++)if(a[i]!=a[strlen(a)-i-1])return false;
	return true;
}
int main(){
	char a[10050];
	gets(a);
	char p1[5030],p2[5030];
	int q=(strlen(a)-1)/2;
	for(int i=0;i<q;i++)p1[i]=a[i];
	for(int i=q+1;i<strlen(a);i++)p2[i-q-1]=a[i];
	if(pl(a)&&pl(p1)&&pl(p2))cout<<"Yes";
	else cout<<"No";
	return 0;
}

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

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

int main() {
    char s[100];
//    string s;
//    char* s;
    int n, i;
    gets(s);
//    getline(cin, s);

    n = strlen(s);

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

    cout << "Yes" << endl;
    return 0;
}


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

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (int)n; i++)
using namespace std;

bool is_palindrome(string s) {
    string t(s.rbegin(),s.rend());
    return t == s;
}

int main() {
    string s;
    cin >> s;
    if (is_palindrome(s) && is_palindrome(s.substr(0,(n-1)/2)) && is_palindrome(s.substr((n+1)/2))) {
        cout << "Yes" << endl;
    }
    else cout << "No" << endl;
    return 0;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:13:55: error: 'n' was not declared in this scope
   13 |     if (is_palindrome(s) && is_palindrome(s.substr(0,(n-1)/2)) && is_palindrome(s.substr((n+1)/2))) {
      |                                                       ^
Language: C++

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

bool is_pal(string &s){
  for(int i = 0,j = s.size()-1;i<=j;i+,j--){
    if(s[i]!=s[j])return false;
   return true;
  }
}
void solve(){
  string s;
  cin>>s;
  int n = s.size();
  if(!is_pal(s)){
    cout<<"No\n";
    return;
  }
  s = '#'+s;
  if(!is_pal(s.substr(1,(n-1)/2))){
    cout<<"No\n";
    return;
  }
  if(!is_pal(s.substr((n+3)/2,(n-1)/2))){
    cout<<"No\n";
  }
  cout<<"Yes\n";
}
int main(){
  solve();
}

Compiler output:
a.cc:1:9: fatal error: bits/stdc+.h: No such file or directory
    1 | #include<bits/stdc+.h>
      |         ^~~~~~~~~~~~~~
compilation terminated.
Language: C++

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

int main() {
  string s;
  cin >> s;
  for (int i = 0; i < s.size()-1; i++) {
    if (s.at(i) != s.at(s.size()-1-i)) {
      cout << "No" << endl;
      return 0;
    }
  }
  
  int center = (n-1) / 4;
  for (int i = 0; i < center; i++) {
    if (s.at(i) != s.at(n-1-i)) {
      cout << "No" << endl;
      return 0;
    }
  }
  
  reverse(s.begin,s.end);

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: 'n' was not declared in this scope
   14 |   int center = (n-1) / 4;
      |                 ^
a.cc:22:10: error: no matching function for call to 'reverse(<unresolved overloaded function type>, <unresolved overloaded function type>)'
   22 |   reverse(s.begin,s.end);
      |   ~~~~~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:1083:5: note: candidate: 'template<class _BIter> void std::reverse(_BIter, _BIter)'
 1083 |     reverse(_BidirectionalIterator __first, _BidirectionalIterator __last)
      |     ^~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1083:5: note:   template argument deduction/substitution failed:
a.cc:22:10: note:   couldn't deduce template parameter '_BIter'
   22 |   reverse(s.begin,s.end);
      |   ~~~~~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:249:1: note: candidate: 'template<class _ExecutionPolicy, class _BidirectionalIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::reverse(_ExecutionPolicy&&, _BidirectionalIterator, _BidirectionalIterator)'
  249 | reverse(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __last);
      | ^~~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:249:1: note:   candidate expects 3 arguments, 2 provided
Language: C++

#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <limits.h>
#include <algorithm>
#include <iomanip>a
using namespace std;

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

Compiler output:
a.cc:6:10: fatal error: iomanip>: No such file or directory
    6 | #include <iomanip>a
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

int main() {
  string s;
  cin >> s;
  for (int i = 0; i < s.size()-1; i++) {
    if (s.at(i) != s.at(s.size()-1-i)) {
      cout << "No" << endl;
      return 0;
    }
  }
  
  int center = (s.size()-1) / 4;
  for (int i = 0; i < center; i++) {
    if (s.at(i) != s.at(n-1-i)) {
      cout << "No" << endl;
      return 0;
    }
  }
  
  reverse(s.begin(),s.end());

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

Compiler output:
a.cc: In function 'int main()':
a.cc:2:3: error: 'string' was not declared in this scope
    2 |   string s;
      |   ^~~~~~
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin >> s;
      |   ^~~
a.cc:3:10: error: 's' was not declared in this scope
    3 |   cin >> s;
      |          ^
a.cc:6:7: error: 'cout' was not declared in this scope
    6 |       cout << "No" << endl;
      |       ^~~~
a.cc:6:23: error: 'endl' was not declared in this scope
    6 |       cout << "No" << endl;
      |                       ^~~~
a.cc:13:25: error: 'n' was not declared in this scope
   13 |     if (s.at(i) != s.at(n-1-i)) {
      |                         ^
a.cc:14:7: error: 'cout' was not declared in this scope
   14 |       cout << "No" << endl;
      |       ^~~~
a.cc:14:23: error: 'endl' was not declared in this scope
   14 |       cout << "No" << endl;
      |                       ^~~~
a.cc:19:3: error: 'reverse' was not declared in this scope
   19 |   reverse(s.begin(),s.end());
      |   ^~~~~~~
a.cc:22:25: error: 'n' was not declared in this scope
   22 |     if (s.at(i) != s.at(n-1-i)) {
      |                         ^
a.cc:23:7: error: 'cout' was not declared in this scope
   23 |       cout << "No" << endl;
      |       ^~~~
a.cc:23:23: error: 'endl' was not declared in this scope
   23 |       cout << "No" << endl;
      |                       ^~~~
a.cc:27:3: error: 'cout' was not declared in this scope
   27 |   cout << "Yes" << endl;
      |   ^~~~
a.cc:27:20: error: 'endl' was not declared in this scope
   27 |   cout << "Yes" << endl;
      |                    ^~~~
Language: C++

int main() {
  string s;
  cin >> s;
  for (int i = 0; i < s.size()-1; i++) {
    if (s.at(i) != s.at(s.size()-1-i)) {
      cout << "No" << endl;
      return 0;
    }
  }
  
  int center = (n-1) / 4;
  for (int i = 0; i < center; i++) {
    if (s.at(i) != s.at(n-1-i)) {
      cout << "No" << endl;
      return 0;
    }
  }
  
  reverse(s.begin,s.end);

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

Compiler output:
a.cc: In function 'int main()':
a.cc:2:3: error: 'string' was not declared in this scope
    2 |   string s;
      |   ^~~~~~
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin >> s;
      |   ^~~
a.cc:3:10: error: 's' was not declared in this scope
    3 |   cin >> s;
      |          ^
a.cc:6:7: error: 'cout' was not declared in this scope
    6 |       cout << "No" << endl;
      |       ^~~~
a.cc:6:23: error: 'endl' was not declared in this scope
    6 |       cout << "No" << endl;
      |                       ^~~~
a.cc:11:17: error: 'n' was not declared in this scope
   11 |   int center = (n-1) / 4;
      |                 ^
a.cc:14:7: error: 'cout' was not declared in this scope
   14 |       cout << "No" << endl;
      |       ^~~~
a.cc:14:23: error: 'endl' was not declared in this scope
   14 |       cout << "No" << endl;
      |                       ^~~~
a.cc:19:3: error: 'reverse' was not declared in this scope
   19 |   reverse(s.begin,s.end);
      |   ^~~~~~~
a.cc:23:7: error: 'cout' was not declared in this scope
   23 |       cout << "No" << endl;
      |       ^~~~
a.cc:23:23: error: 'endl' was not declared in this scope
   23 |       cout << "No" << endl;
      |                       ^~~~
a.cc:27:3: error: 'cout' was not declared in this scope
   27 |   cout << "Yes" << endl;
      |   ^~~~
a.cc:27:20: error: 'endl' was not declared in this scope
   27 |   cout << "Yes" << endl;
      |                    ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef long long ll;
const int INF = 1000000000; // 10^9

bool is_p(string x){
    string t = x.reverse(x.begin(), x.end());
    return t == s;
}

int main() {
    // ifstream in("data1.txt");
    // cin.rdbuf(in.rdbuf());
    string S;
    cin >> S;
    int sn = S.size();
    if(!is_p(S)){
        cout << "No" << endl;
        return 0;
    }

    if(!is_p(S.substr(S, S.size()/2))){
        cout << "No" << endl;
        return 0;
    }

    cout << "Yes" << endl;
}


Compiler output:
a.cc: In function 'bool is_p(std::string)':
a.cc:8:18: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'reverse'; did you mean 'reserve'?
    8 |     string t = x.reverse(x.begin(), x.end());
      |                  ^~~~~~~
      |                  reserve
a.cc:9:17: error: 's' was not declared in this scope
    9 |     return t == s;
      |                 ^
a.cc: In function 'int main()':
a.cc:23:23: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
   23 |     if(!is_p(S.substr(S, S.size()/2))){
      |                       ^
      |                       |
      |                       std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:3208:24: note:   initializing argument 1 of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::substr(size_type, size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
 3208 |       substr(size_type __pos = 0, size_type __n = npos) const
      |              ~~~~~~~~~~^~~~~~~~~
Language: C++

#include<iostream>
using namespace std;
#define ll long long
#include<bits/stdc++.h>
int main(){
  string s;
  cin>>s;
  string p=s.substr(0,n/2);
  string r=s.substr((n/2)+1);
  if(p==r)
    cout<<"Yes";
  else
    cout<<"No";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:23: error: 'n' was not declared in this scope
    8 |   string p=s.substr(0,n/2);
      |                       ^
Language: C++

/*starting with the name of almighty ALLAH*/
/*solved by RAKIB JOY*/
#include<bits/stdc++.h>
using namespace std;
int main()
{
    char a[102];
    gets(a);
    int x=strlen(a),i,j;
    for(i=0,j=x-1 ; i<=x/2,j>=x/2 ; i++,j--)
    {
        if(a[i]!=a[j])
        {
            cout<<"No"<<endl;
            return 0;
        }
    }
    for(i=0,j=x/2-1 ; i<=x/2-1,j>=0 ; i++,j--)
    {
        if(a[i]!=a[j])
        {
            cout<<"No"<<endl;
            return 0;
        }
    }
    for(i=x/2+1,j=x-1 ; i<=x-1,j>=x/2+1 ; i++,j--)
    {
        if(a[i]!=a[j])
        {
            cout<<"No"<<endl;
            return 0;
        }
    }

cout<<"Yes"<<endl;
    return 0;
}



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

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

int main() {
  string s;
  cin >> s;
  for (int i = 0; i < s.size()-1; i++) {
    if (s.at(i) != s.at(s.size()-1-i)) {
      cout << "No" << endl;
      return 0;
    }
  }

  string copy = s;
  reverse(s.begin,s.end);
  if (s == copy) cout << "Yes" << endl;
  else cout << "No" << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:10: error: no matching function for call to 'reverse(<unresolved overloaded function type>, <unresolved overloaded function type>)'
   15 |   reverse(s.begin,s.end);
      |   ~~~~~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:1083:5: note: candidate: 'template<class _BIter> void std::reverse(_BIter, _BIter)'
 1083 |     reverse(_BidirectionalIterator __first, _BidirectionalIterator __last)
      |     ^~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1083:5: note:   template argument deduction/substitution failed:
a.cc:15:10: note:   couldn't deduce template parameter '_BIter'
   15 |   reverse(s.begin,s.end);
      |   ~~~~~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:249:1: note: candidate: 'template<class _ExecutionPolicy, class _BidirectionalIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::reverse(_ExecutionPolicy&&, _BidirectionalIterator, _BidirectionalIterator)'
  249 | reverse(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __last);
      | ^~~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:249:1: note:   candidate expects 3 arguments, 2 provided
Language: C++

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

int main() {
  string s;
  cin >> s;
  for (int i = 0; i < s.size()-1; i++) {
    if (s.at(i) != s.at(s.size()-1-i)) {
      cout << "No" << endl;
      return 0;
    }
  }

  string rs = reverse(s.begin(),s.end());
  if (rs == s) cout << "Yes" << endl;
  else cout << "No" << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:22: error: conversion from 'void' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   14 |   string rs = reverse(s.begin(),s.end());
      |               ~~~~~~~^~~~~~~~~~~~~~~~~~~
Language: C++

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

int main() {
  string s;
  cin >> s;
  for (int i = 0; i < s.size()-1; i++) {
    if (s.at(i) != s.at(s.size()-1-i)) {
      cout << "No" << endl;
      return 0;
    }
  }

  string rs = reverse(s.begin,s.end);
  if (rs == s) cout << "Yes" << endl;
  else cout << "No" << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:22: error: no matching function for call to 'reverse(<unresolved overloaded function type>, <unresolved overloaded function type>)'
   14 |   string rs = reverse(s.begin,s.end);
      |               ~~~~~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:1083:5: note: candidate: 'template<class _BIter> void std::reverse(_BIter, _BIter)'
 1083 |     reverse(_BidirectionalIterator __first, _BidirectionalIterator __last)
      |     ^~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1083:5: note:   template argument deduction/substitution failed:
a.cc:14:22: note:   couldn't deduce template parameter '_BIter'
   14 |   string rs = reverse(s.begin,s.end);
      |               ~~~~~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:249:1: note: candidate: 'template<class _ExecutionPolicy, class _BidirectionalIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::reverse(_ExecutionPolicy&&, _BidirectionalIterator, _BidirectionalIterator)'
  249 | reverse(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __last);
      | ^~~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:249:1: note:   candidate expects 3 arguments, 2 provided
Language: C++

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


int main()
{
    char word[100];
    int i,j,k=0,len;

    
    gets(word);

    len=strlen(word);


    for(i=0,j=len-1;i<len/2;i++,j--){


        if(word[i]==word[j]){

            k++;
        }

    }

    if(k==len/2 && k!=0){
        printf("YES\n");
    }
    else  {
        printf("NO\n");
    }
    return 0;
}


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

   bool check(string s)
 {
     string s1=s;
     reverse(s1.begin(),s1.end());
     if(s1==s)
     return true;
     else
     return false;
 }
int main() {
    string s;
    cin>>s;
    ll n=s.length();
   string s1="";string s2="";
    FOR(i,0,((n-1)/2))
    s1+=s[i];
     FOR(i,((n+3)/2)-1,n)
    s2+=s[i];
    //cout<<s<<" "<<s1<<" "<<s2;
    if(check(s) and check(s1) and check(s2) )
    cout<<"Yes";
    else
    cout<<"No";
    
}

Compiler output:
a.cc:1:15: error: 'string' was not declared in this scope
    1 |    bool check(string s)
      |               ^~~~~~
a.cc: In function 'int main()':
a.cc:11:5: error: 'string' was not declared in this scope
   11 |     string s;
      |     ^~~~~~
a.cc:12:5: error: 'cin' was not declared in this scope
   12 |     cin>>s;
      |     ^~~
a.cc:12:10: error: 's' was not declared in this scope
   12 |     cin>>s;
      |          ^
a.cc:13:5: error: 'll' was not declared in this scope
   13 |     ll n=s.length();
      |     ^~
a.cc:14:10: error: expected ';' before 's1'
   14 |    string s1="";string s2="";
      |          ^~~
      |          ;
a.cc:14:23: error: expected ';' before 's2'
   14 |    string s1="";string s2="";
      |                       ^~~
      |                       ;
a.cc:15:9: error: 'i' was not declared in this scope
   15 |     FOR(i,0,((n-1)/2))
      |         ^
a.cc:15:15: error: 'n' was not declared in this scope
   15 |     FOR(i,0,((n-1)/2))
      |               ^
a.cc:15:5: error: 'FOR' was not declared in this scope
   15 |     FOR(i,0,((n-1)/2))
      |     ^~~
a.cc:20:13: error: 'check' cannot be used as a function
   20 |     if(check(s) and check(s1) and check(s2) )
      |        ~~~~~^~~
a.cc:20:27: error: 's1' was not declared in this scope
   20 |     if(check(s) and check(s1) and check(s2) )
      |                           ^~
a.cc:20:29: error: 'check' cannot be used as a function
   20 |     if(check(s) and check(s1) and check(s2) )
      |                             ^
a.cc:20:41: error: 's2' was not declared in this scope
   20 |     if(check(s) and check(s1) and check(s2) )
      |                                         ^~
a.cc:20:43: error: 'check' cannot be used as a function
   20 |     if(check(s) and check(s1) and check(s2) )
      |                                           ^
a.cc:21:5: error: 'cout' was not declared in this scope
   21 |     cout<<"Yes";
      |     ^~~~
a.cc:23:5: error: 'cout' was not declared in this scope
   23 |     cout<<"No";
      |     ^~~~
Language: C++

#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <ctime>
#include <cstring>
#include <functional>
#include <iostream>
#include <iomanip>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <regex>
#include <vector>

#define fix(n)          cout<<fixed<<setprecision(n)
#define rep(i,n)        for (int i = 0; i < (n); ++i)
#define all(a)          (a).begin(), (a).end()
#define sort(a)         sort(all(a))
#define uniq(a)         sort(a);(a).erase(unique(all(a), (a).end())
#define reverse(a)      reverse(all(a))
#define ctos(c)         string(1, (c))
#define out(d)          cout << (d)
#define outl(d)         std::cout<<(d)<<"\n"
#define YES()           cout << "YES" << endl
#define NO()            cout << "NO" << endl
#define Yes()           cout << "Yes" << endl
#define No()            cout << "No" << endl
#define ceil(x, y)      ((x + y - 1) / (y))
#define debug(x)        cerr << #x << ": " << (x) << '\n'
#define debug2(x, y)    cerr << #x << ": " << (x) << ", " << #y << ": " << (y) << '\n'
#define debug3(x, y, z) cerr << #x << ": " << (x) << ", " << #y << ": " << (y) << ", " << #z << ": " << (z) << '\n'
#define dbg(v)          for (size_t _ = 0; _ < v.size(); ++_){ cerr << #v << "[" << _ << "] : " << v[_] << '\n'; }
#define pb              push_back
#define fst             first
#define int             long long

using namespace std;
using ll = long long;
using ld = long double;
using P = pair<ll,ll>;

const ll MOD = 1000000007; // 10^9 + 7
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};

bool isReversible(string s) {
  string t = s;
  reverse(t);
  return s == t;
}

void solve() {
  string s; cin >> s;

  if (!isReversible(s)) {
    No();
    return;
  }

  int n = s.size();
  if (isReversible(s.substr(0, (n-1)/2;)) && isReversible(s.substr((n+1)/2))) Yes();
  else No();
}

signed main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  srand((unsigned)time(NULL));
  fix(12);

  solve();
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:65:39: error: expected ')' before ';' token
   65 |   if (isReversible(s.substr(0, (n-1)/2;)) && isReversible(s.substr((n+1)/2))) Yes();
      |                            ~          ^
      |                                       )
a.cc:65:39: error: expected ')' before ';' token
   65 |   if (isReversible(s.substr(0, (n-1)/2;)) && isReversible(s.substr((n+1)/2))) Yes();
      |      ~                                ^
      |                                       )
a.cc:65:40: error: expected primary-expression before ')' token
   65 |   if (isReversible(s.substr(0, (n-1)/2;)) && isReversible(s.substr((n+1)/2))) Yes();
      |                                        ^
a.cc:66:3: error: 'else' without a previous 'if'
   66 |   else No();
      |   ^~~~
Language: C

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

int main()
{
    char str[99];
    gets(str);
    int i,n=0;
    for (i=0;str[i]!='\0';i++)
    {
         n++;
    }

    char s[n];
    strcpy(s,str);
    strrev(s);
    if (strcmp(str,s)==0)
    {
        int x,y,h;
        x=(n-1)/2;
        y=(n+3)/2;
        h=n-y+1;
        char a[x],b[x],c[h],d[h];
        for (i=0;i<x;i++)
        {
            a[i]=str[i];
            b[i]=str[i];
        }
        strrev(b);
        if (strcmp(a,b)==0)
        {
            for (i=y;i<=n;i++)
            {
                c[i]=str[i];
                d[i]=str[i];
            }
            strrev(d);
            if (strcmp(c,d)==0)
            {
                 printf("Yes\n");
            }

            else
            {
                printf("No\n");
            }

        }
        else
        {
             printf("No\n");
        }

    }
    else
    {
         printf("No\n");
    }


    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:5: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    7 |     gets(str);
      |     ^~~~
      |     fgets
main.c:16:5: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration]
   16 |     strrev(s);
      |     ^~~~~~
      |     strsep
Language: C++

#include <bits/stdc++.h>
#define rep(i,n)for(long long i=0;i<(n);i++)
#define all(V) V.begin(),V.end()
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
const ll INF=1e18;
const int MOD=1e9+7;
const double pi=acos(-1);


int main(){
  string s;
  cin >> s;
  string t=s;
  reverse(all(t));
  if(s!=t){
    puts("No");
    return 0;
  }
  t=s.substr(0,s.size()/2);
  reverse(all(t));
  if(t!=s.substr(0,s.size()/2)){
    put("No");
    return 0;
  }
  t=s.substr(s.size()/2+1,s.size()/2);
  reverse(all(t));
  if(t!=s.substr(s.size()/2+1,s.size()/2)){
    put("No");
    return 0;
  }
  puts("Yes");
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:5: error: 'put' was not declared in this scope; did you mean 'putw'?
   24 |     put("No");
      |     ^~~
      |     putw
a.cc:30:5: error: 'put' was not declared in this scope; did you mean 'putw'?
   30 |     put("No");
      |     ^~~
      |     putw
Language: C++

#include<stdio.h>
#include<string.h>
#include<malloc.h>
int main()
{
char arr[100];
fgets(arr,100,stdin);
int n=strlen(arr);
int last=(n-1)/2;
int i=0;
int j=n-1;
while(i<last)
{
if(arr[i]!=arr[j])
{
printf("No");
return;
}
i++;
j--;
}
if(i==last)
{
printf("Yes");
}

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:1: error: return-statement with no value, in function returning 'int' [-fpermissive]
   17 | return;
      | ^~~~~~
Language: C

#include <stdio.h>
#include <string.h>
 
int main(){
    char string1[200];
    int i, length;
    int flag = 0;
    
  
    scanf("%s", string1);
    
    length = strlen(string1);
    if(length/2!=0){
    for(i=0;i < length ;i++){
        if(string1[i] != string1[length-i-1]){
            flag = 1;
            break;
   }
}}
    if (flag){
      for(int j=0;j<(length-1)/2;j++){
        for(int k=(length+3)/2;k<length;k++){
          char string2[200]=string1[j];
          char string3[200]=string1[k];
          if(strcmp(string2,string3)==0){
          
        printf("Yes");
            break;
          }}}
    else {
        printf("No");
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:23:29: error: invalid initializer
   23 |           char string2[200]=string1[j];
      |                             ^~~~~~~
main.c:24:29: error: invalid initializer
   24 |           char string3[200]=string1[k];
      |                             ^~~~~~~
main.c:30:5: error: expected '}' before 'else'
   30 |     else {
      |     ^~~~
Language: C++

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

int main() {
  string str;
  bool chk = true;
  cin >> str;
  
  // 1つ目
  string revStr = reverse(str.begin(),str.end());
  if(str != revStr) chk = false;
  
  // 2つ目
  if(chk==true){
    for(int i = 0; i < (str.size() -1)/2;i++){
      if(str.at(i) != str.at(str.size()-i-1)) chk = false;
      break;
    }
  }
  
  // 3つ目
  if(chk==true){
    int j = (str.size() + 3)/2;
    int k = 0;
     for(; j < str.size(); j++){
       if(str.at(j-1) != str.at(str.size()-k-1)) chk = false;
       k++;
     }
  }
  
  if(chk==true){
   cout << "Yes";
  }else{
    cout << "No";
  } 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:26: error: conversion from 'void' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   10 |   string revStr = reverse(str.begin(),str.end());
      |                   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
Language: C

#include <stdio.h>
#include <string.h>
 
int main(){
    char string1[200];
    int i, length;
    int flag = 0;
    
  
    scanf("%s", string1);
    
    length = strlen(string1);
    if(length/2!=0){
    for(i=0;i < length ;i++){
        if(string1[i] != string1[length-i-1]){
            flag = 1;
            break;
   }
}}
    if (flag){
      for(int j=0;j<(length-1)/2;j++){
        for(int k=(length+3)/2;k<length;k++){
          char string2[200]=string1[j];
          char string3[200]=string1[k];}}
          if(strcmp(string2,string3)==0){
          
        printf("Yes");
          }
    else {
        printf("No");
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:23:29: error: invalid initializer
   23 |           char string2[200]=string1[j];
      |                             ^~~~~~~
main.c:24:29: error: invalid initializer
   24 |           char string3[200]=string1[k];}}
      |                             ^~~~~~~
main.c:25:21: error: 'string2' undeclared (first use in this function); did you mean 'string1'?
   25 |           if(strcmp(string2,string3)==0){
      |                     ^~~~~~~
      |                     string1
main.c:25:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:25:29: error: 'string3' undeclared (first use in this function); did you mean 'string1'?
   25 |           if(strcmp(string2,string3)==0){
      |                             ^~~~~~~
      |                             string1
main.c:33:1: error: expected declaration or statement at end of input
   33 | }
      | ^
Language: C++

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


int main(){
    long long int N;
    long long int A,B;
    string s;
    bool flag=true;
    cin>>s;
    N=s.size();
    string sv=reverse(s.begin,s.end);
    if(s!=sv)flag=false;

    for(int i=0;i<(N-1)/2/2;i++){
        int i_sita=i;
        int i_ue=(N-1)/2-1-i;
        if(s.at(i_sita)!=s.at(i_ue)){
            flag=false;
        }
    }
    for(int i=0;i<(N-1)/2/2;i++){
        int i_sita=i+(N+1)/2;
        int i_ue=N-1-i;
        if(s.at(i_sita)!=s.at(i_ue)){
            flag=false;
        }
    }

    if(flag==true)cout<<"Yes"<<endl;
    else{cout<<"No"<<endl;}


}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:22: error: no matching function for call to 'reverse(<unresolved overloaded function type>, <unresolved overloaded function type>)'
   12 |     string sv=reverse(s.begin,s.end);
      |               ~~~~~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:1083:5: note: candidate: 'template<class _BIter> void std::reverse(_BIter, _BIter)'
 1083 |     reverse(_BidirectionalIterator __first, _BidirectionalIterator __last)
      |     ^~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1083:5: note:   template argument deduction/substitution failed:
a.cc:12:22: note:   couldn't deduce template parameter '_BIter'
   12 |     string sv=reverse(s.begin,s.end);
      |               ~~~~~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:249:1: note: candidate: 'template<class _ExecutionPolicy, class _BidirectionalIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::reverse(_ExecutionPolicy&&, _BidirectionalIterator, _BidirectionalIterator)'
  249 | reverse(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __last);
      | ^~~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:249:1: note:   candidate expects 3 arguments, 2 provided