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

///g. strong palindrome
#include <stdio.h>
#include <math.h>
#include <cstdio>
#include <iostream>
#include <string.h>

int main()
{
    char s[99];
    gets(s);
    int n=strlen(s)-1;
    int f1=0;
    for(int i=0;i<=n/2;i++){
        if(s[i]!=s[n-i]){
            f1++;
            printf("No");
            return 0;
        }
    }
    int f2=0;
    for(int i=0;i<=(n-1)/2;i++){
        if(s[i]!=s[(n-1)/2-i]){
            f2++;
            printf("No");
            return 0;
        }
    }
    int f3=0;
    for(int i=(n+3)/2;i<=n;i++){
        if(s[i]!=s[n-i]){
            f3++;
            printf("No");
            return 0;
        }
    }
    if(f1==0 && f2==0 && f3==0) printf("Yes");
    else printf("No");

    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(s);
      |     ^~~~
      |     getw
Language: C++

///g. strong palindrome
#include <stdio.h>
#include <math.h>
#include <string.h>

int main()
{
    char s[99];
    gets(s);
    int n=strlen(s)-1;
    int f1=0;
    for(int i=0;i<=n/2;i++){
        if(s[i]!=s[n-i]){
            f1++;
            printf("No");
            return 0;
        }
    }
    int f2=0;
    for(int i=0;i<=(n-1)/2;i++){
        if(s[i]!=s[(n-1)/2-i]){
            f2++;
            printf("No");
            return 0;
        }
    }
    int f3=0;
    for(int i=(n+3)/2;i<=n;i++){
        if(s[i]!=s[n-i]){
            f3++;
            printf("No");
            return 0;
        }
    }
    if(f1==0 && f2==0 && f3==0) printf("Yes");
    else printf("No");

    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<iostream>
#include<string>
#define LL long long
#define FIO ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL)
using namespace std;

bool isPalindrome(string s)
{
	string tmp1=s, tmp2=s;
	reverse(tmp1.begin(), tmp1.end());
	if(tmp1==tmp2) return true; else return false;
}

int main()
{
	FIO;
	bool x=false, y=false, z=false;
	string s; cin>>s;
	int n=s.size();
	x=isPalindrome(s);
	string s1=s.substr(0, (n-1)/2);
	y=isPalindrome(s1);
	string s2=s.substr((n+3)/2-1, n);
	z=isPalindrome(s2);
	if(x&&y&&z) cout<<"Yes\n"; else cout<<"No\n";
}

Compiler output:
a.cc: In function 'bool isPalindrome(std::string)':
a.cc:10:9: error: 'reverse' was not declared in this scope
   10 |         reverse(tmp1.begin(), tmp1.end());
      |         ^~~~~~~
Language: C++

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

int main()
{
	string str;
	cin>>str;
	int n=str.size();
	string s=str;
	reverse(s.begin(),s.end());
	if(str!=s) {cout<<"No"<<endl;return 0;}
	int first=(n-1)/2;
	string str2(str.begin(),str.begin()+first);
	string str3=str2;
	reverse(str3.begin(),str3.end());
	if(str3!=str2) {cout<<"No"<<endl;return 0;}
	int last=(n+3)/2;
	string str4(str.begin()+last-1,str.end());

	string str5=str4;
	reverse(str5.begin(),str5.end());
	if(str5!=str4) {cout<<"No"<<endl;return 0;}
	cout<<"Yes"<<endl;
	return 0;
}

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<stdio.h>
#include<string.h>
int main()
{
char a[100];
gets(a);
int n=strlen(a),x=0,y=0,z=0;
for(int i=0;i<n;i++)
{
if(a[i]!=a[n-i-1]){
x=1;
break;
}
}
for(int i=0;i<(n-1)/2;i++)
{
if(a[i]!=a[(n-1)/2 -i-1]){
y=1;
break;
}
}
for(int i=n/2 +1;i<n;i++)
{
if(a[i]!=a[n-i+ n/2]){
z=1;
break;
}
}
if(x==0&&y==0&&z==0)
printf("Yes");
else
printf("No");
}



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

#include<stdio.h>
#include<string.h>
using namespace std;
int main()
{
char a[100];
gets(a);
int n=strlen(a),x=0,y=0,z=0;
for(int i=0;i<n;i++)
{
if(a[i]!=a[n-i-1]){
x=1;
break;
}
}
for(int i=0;i<(n-1)/2;i++)
{
if(a[i]!=a[(n-1)/2 -i-1]){
y=1;
break;
}
}
for(int i=n/2 +1;i<n;i++)
{
if(a[i]!=a[n-i+ n/2]){
z=1;
break;
}
}
if(x==0&&y==0&&z==0)
printf("Yes");
else
printf("No");
}



Compiler output:
main.c:3:1: error: unknown type name 'using'
    3 | using namespace std;
      | ^~~~~
main.c:3:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
    3 | using namespace std;
      |                 ^~~
main.c: In function 'main':
main.c:7:1: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    7 | gets(a);
      | ^~~~
      | fgets
Language: C++

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


Compiler output:
a.cc:20:1: error: expected unqualified-id before 'for'
   20 | for (int i=0;i<n;i++){
      | ^~~
a.cc:20:14: error: 'i' does not name a type
   20 | for (int i=0;i<n;i++){
      |              ^
a.cc:20:18: error: 'i' does not name a type
   20 | for (int i=0;i<n;i++){
      |                  ^
a.cc:28:3: error: expected unqualified-id before 'if'
   28 |   if(a){cout<<"Yes"<<endl;}
      |   ^~
a.cc:29:3: error: expected unqualified-id before 'else'
   29 |   else{cout<<"No"<<endl;}
      |   ^~~~
a.cc:30:1: error: expected declaration before '}' token
   30 | }
      | ^
Language: C++

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


Compiler output:
a.cc:20:1: error: expected unqualified-id before 'for'
   20 | for (int i=0;i<n;i++){
      | ^~~
a.cc:20:14: error: 'i' does not name a type
   20 | for (int i=0;i<n;i++){
      |              ^
a.cc:20:18: error: 'i' does not name a type
   20 | for (int i=0;i<n;i++){
      |                  ^
a.cc:28:3: error: expected unqualified-id before 'if'
   28 |   if(a){cout<<"Yes"<<endl;}
      |   ^~
a.cc:29:3: error: expected unqualified-id before 'else'
   29 |   else{cout<<"No"<<endl;}
      |   ^~~~
a.cc:30:1: error: expected declaration before '}' token
   30 | }
      | ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:15:4: error: expected primary-expression before 'else'
   15 |    else if(s.at((n+1)/2+i)!=s.at(n-1-i)){
      |    ^~~~
a.cc: At global scope:
a.cc:20:1: error: expected unqualified-id before 'for'
   20 | for (int i=0;i<n;i++){
      | ^~~
a.cc:20:14: error: 'i' does not name a type
   20 | for (int i=0;i<n;i++){
      |              ^
a.cc:20:18: error: 'i' does not name a type
   20 | for (int i=0;i<n;i++){
      |                  ^
a.cc:28:3: error: expected unqualified-id before 'if'
   28 |   if(a){cout<<"Yes"<<endl;}
      |   ^~
a.cc:29:3: error: expected unqualified-id before 'else'
   29 |   else{cout<<"No"<<endl;}
      |   ^~~~
a.cc:30:1: error: expected declaration before '}' token
   30 | }
      | ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:15:4: error: expected primary-expression before 'else'
   15 |    else if(s.at((n+1)/2+i)!=s.at(n-1-i)){
      |    ^~~~
a.cc: At global scope:
a.cc:20:1: error: expected unqualified-id before 'for'
   20 | for (int i=0;i<n;i++){
      | ^~~
a.cc:20:14: error: 'i' does not name a type
   20 | for (int i=0;i<n;i++){
      |              ^
a.cc:20:18: error: 'i' does not name a type
   20 | for (int i=0;i<n;i++){
      |                  ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string s;
  cin>>s;
  int n=s.size();
  bool a =true;
  for (int i=0;i<=(n-3)/2,i++){
    if(s.at(i)!=s.at((n-3)/2-i)){
      a=false;
      break;
    }
   else if(s.at((n+5)/2+i)!=s.at(n-i)){
      a=false;
      break;
    }
  }
  if(a){cout<<"Yes"<<endl;}
  else{cout<<"No"<<endl;}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:30: error: expected ';' before ')' token
    8 |   for (int i=0;i<=(n-3)/2,i++){
      |                              ^
      |                              ;
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:37: error: expected ';' before ')' token
    7 |   for (int i=0;i<=(s.size()-1)/2,i++){
      |                                     ^
      |                                     ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
    bool a, b, c;
    string S1, S2, S3, S4, S5, S6;
    cin >> S1;
    N = S1.size();

    S2 = S1;
    reverse(S2.begin(), S2.end();
    a = S1 == S2;

    for (int i = 0; i < (N - 1) / 2; i++){
        S3[i] = S1[i];
        S4[i] = S1[i];
    }
    reverse(S4.begin(), S4.end();
    b = S3 == S4;

    for (int i = (N + 3) / 2 - 1; i < N; i++){
        S5[i] = S5[i];
        S6[i] = S6[i];
    }
    reverse(S6.begin(), S6.end();
    c = S5 == S6;

    if ((a && b) && c){
        cout << 'Yes' << endl;
    }
    else{
        cout << 'No' << endl;
    }
}

Compiler output:
a.cc:28:17: warning: multi-character character constant [-Wmultichar]
   28 |         cout << 'Yes' << endl;
      |                 ^~~~~
a.cc:31:17: warning: multi-character character constant [-Wmultichar]
   31 |         cout << 'No' << endl;
      |                 ^~~~
a.cc: In function 'int main()':
a.cc:7:5: error: 'N' was not declared in this scope
    7 |     N = S1.size();
      |     ^
a.cc:10:33: error: expected ')' before ';' token
   10 |     reverse(S2.begin(), S2.end();
      |            ~                    ^
      |                                 )
a.cc:17:33: error: expected ')' before ';' token
   17 |     reverse(S4.begin(), S4.end();
      |            ~                    ^
      |                                 )
a.cc:24:33: error: expected ')' before ';' token
   24 |     reverse(S6.begin(), S6.end();
      |            ~                    ^
      |                                 )
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:36: error: expected ';' before ')' token
    7 |   for (int i=0;i<(s.size()-1)/2,i++){
      |                                    ^
      |                                    ;
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:30: error: expected ';' before ')' token
    7 |   for (int i=0;i<s.size(),i++){
      |                              ^
      |                              ;
Language: C++

#include <bits/stdc++.h>
#define repr(i,a,b) for(int i=a;i<b;i++)
#define rep(i,n) for(int i=0;i<n;i++)
#define reprrev(i,a,b) for(int i=b-1;i>=a;i--) // [a, b)
#define reprev(i,n) reprrev(i,0,n)
#define _GLIBCXX_DEBUG

using ll = long long;
using ull = unsigned long long;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
const ll mod = 1e9+7;
void chmod(ll &M){
  if(M >= mod) M %= mod;
  else if(M < 0){
     M += (abs(M)/mod + 1)*mod;
    M %= mod;
}
}
ll modpow(ll x, ll n){
   if(n==0) return 1;
  ll res=modpow(x, n/2);
 if(n%2==0) return res*res%mod;
else return res*res%mod*x%mod;
}
int getl(int i, int N) { return i==0? N-1:i-1; };
int getr(int i, int N) { return i==N-1? 0:i+1; };
long long GCD(long long a, long long b) {
  if (b == 0) return a;
  else return GCD(b, a % b);
}

using namespace std;
/* <-----------------------------------------------------------------------------------> */
/* <-----------------------------------------------------------------------------------> */
/* <-----------------------------------------------------------------------------------> */
/* <-----------------------------------------------------------------------------------> */
int  main()
{
    string S;
    cin >> S;
    int N = S.length(); 
    if (N == 3) {cout << "Yes" << "\n";}
    else {
        string S_1 = S.substr(0, (N-1)/2);
        string S_2 = S.substr(((N+1)/2), (N-1)/2);
        cerr << S_1 << " " << S_2 << "\n";
        bool check_1 = true, check_2 = true, check_3 = true;;
        
        int N_1 = S_1.size();
        int N_2 = S_2.size();
        for(int i = 0; i < N_1; i++) {
            cerr << S_1[i] << " " << S_1[(((N-1)/2) - 1) - i] << "\n";
            
            if (S_1[i] != S_1[(((N-1)/2) - 1) - i]) {
                check_1 = false;
                break;
            }
        }
        for(int i = 0; i < N_2; i++) {
            if (S_2[i] != S_2[(((N-1)/2) - 1) - i]) {
                check_2 = false;
                break;
            }
        } 

        for(int i = 0; i < N; i++) {
            if (S[i] != S[N-1-i]) {
                check_3 = false;
                break;
            }
        }
        cerr << check_1 << " "  << check_2 << "\n";
        if(check_1==1 && check_2==1 && check_3==1) cout << "Yes" << "\n";
        else cout << "No" << "\n";
        }    


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

#include <bits/stdc++.h>
#define repr(i,a,b) for(int i=a;i<b;i++)
#define rep(i,n) for(int i=0;i<n;i++)
#define reprrev(i,a,b) for(int i=b-1;i>=a;i--) // [a, b)
#define reprev(i,n) reprrev(i,0,n)
#define _GLIBCXX_DEBUG

using ll = long long;
using ull = unsigned long long;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
const ll mod = 1e9+7;
void chmod(ll &M){
  if(M >= mod) M %= mod;
  else if(M < 0){
     M += (abs(M)/mod + 1)*mod;
    M %= mod;
}
}
ll modpow(ll x, ll n){
   if(n==0) return 1;
  ll res=modpow(x, n/2);
 if(n%2==0) return res*res%mod;
else return res*res%mod*x%mod;
}
int getl(int i, int N) { return i==0? N-1:i-1; };
int getr(int i, int N) { return i==N-1? 0:i+1; };
long long GCD(long long a, long long b) {
  if (b == 0) return a;
  else return GCD(b, a % b);
}

using namespace std;
/* <-----------------------------------------------------------------------------------> */
/* <-----------------------------------------------------------------------------------> */
/* <-----------------------------------------------------------------------------------> */
/* <-----------------------------------------------------------------------------------> */
int  main()
{
    string S;
    cin >> S;
    int N = S.length(); 
    if (N == 3) {cout << "Yes" << "\n";}
    else {
        string S_1 = S.substr(0, (N-1)/2);
        string S_2 = S.substr(((N+1)/2), (N-1)/2);
        cerr << S_1 << " " << S_2 << "\n";
        bool check_1 = true, check_2 = true, check_3 = true;;
        
        int N_1 = S_1.size();
        int N_2 = S_2.size();
        for(int i = 0; i < N_1; i++) {
            cerr << S_1[i] << " " << S_1[(((N-1)/2) - 1) - i] << "\n";
            
            if (S_1[i] != S_1[(((N-1)/2) - 1) - i]) {
                check_1 = false;
                break;
            }
        }
        for(int i = 0; i < N_2; i++) {
            if (S_2[i] != S_2[(((N-1)/2) - 1) - i]) {
                check_2 = false;
                break;
            }
        } 

        for(int i = 0; i < S.size(); i++) {
            if (S[i] != S[N-1-i]) {
                check_3 = false;
                break;
            }
        }
        cerr << check_1 << " "  << check_2 << "\n";
        if(check_1==1 && check_2==1 && check_3==1) cout << "Yes" << "\n";
        else cout << "No" << "\n";
        }    

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

#include<iostream>
#include<stdio.h>
using namespace std;
using ll=long long;
#include<algorithm>
#include<set>
#include<vector>
#define rep(i,n) for(int i=0;i<(n);i++)
using P=pair<int,int>;
const int mod=1000000007;

bool palid(string s){
  s=t;
  bool ok=false;
  reverse(t.begin(),t.end());
  if(s==t) ok=true;
  return ok;
 }
int main(){
  string s;
  cin>>s;
  bool me=true;
if(!palid(s))me=false;
if(!palid(s.substr(0,s.size()/2)))me=false;
if(me)cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'bool palid(std::string)':
a.cc:13:5: error: 't' was not declared in this scope
   13 |   s=t;
      |     ^
Language: Java

import java.util.*;

public class Main {
  	public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      String s = sc.next();
      int n = s.length();

      String a = s.substring(0, n/2);
      String b = s.substring(n/2+1, n);

      boolean ans = isKaibun(a) && isKaibun(b) && isKaibun(s);
      System.out.println(ans ? "Yes" : "No");

    }
}

private static boolean isKaibun(String s) {
  	boolean ans = true;
  	for (int i = 0; i < s.length() / 2; i++) {
    	if (s.charAt(i) != s.charAt(s.length() - 1 - i)) ans = false;
  	}
 	return ans;
	}
}


Compiler output:
Main.java:18: error: unnamed classes are a preview feature and are disabled by default.
private static boolean isKaibun(String s) {
               ^
  (use --enable-preview to enable unnamed classes)
Main.java:25: error: class, interface, enum, or record expected
}
^
2 errors
Language: C++

#include<bits/stdc++.h>
#include<string>

using namespace std;

int main(){
  string N;
  cin >>N;
  bool b=true;
  if(N.size()==3){
    if(N[0]==N[2]) cout << "Yes" <<endl;
    else cout <<"No" endl;
  }
  else{
    for(int i=0;i<(N.size()-1)/2;++i){
      if(N[i]!=N[(N.size()-1)/2-i-1]) b=false;
      if(N[(N.size()-1)/2+1+i]!=N[N.size()-i-1]) b=false;   
    }
    while(!b) {
      cout <<"No" <<endl;
      break;
    }
    while(b) {
      cout <<"Yes" <<endl;
      break;
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: expected ';' before 'endl'
   12 |     else cout <<"No" endl;
      |                     ^~~~~
      |                     ;
Language: C++

#include<iostream>
#include<string>

using namespace std;

int main(){
  string N;
  cin >>N;
  bool b=true;
  for(int i=0;i<(N.size()-1)/2){
    if(s[i]!=s[(N.size()-1)/2-i]) b=false;
    if(s[(N.size()-1)/2+1+i]!=s[N.size()-i-1]) b=false;   
  }
  while(!b) cout <<"No" <<endl;
  while(b) cout <<"Yes" <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:31: error: expected ';' before ')' token
   10 |   for(int i=0;i<(N.size()-1)/2){
      |                               ^
      |                               ;
a.cc:11:8: error: 's' was not declared in this scope
   11 |     if(s[i]!=s[(N.size()-1)/2-i]) b=false;
      |        ^
a.cc:12:8: error: 's' was not declared in this scope
   12 |     if(s[(N.size()-1)/2+1+i]!=s[N.size()-i-1]) b=false;
      |        ^
Language: C++

#include "pch.h"
#include <iostream>
#include <string>
using namespace std;
int main() {
	int a=0;
	string s;
	for (int i = 0; i < ((sizeof(s) - 1) / 2); i++)
		if (s[i] == s[sizeof(s) - i])
			a++;
	if (a == ((sizeof(s) - 1) / 2))
		cout << "Yes";
	else
		cout << "No";
}

Compiler output:
a.cc:1:10: fatal error: pch.h: No such file or directory
    1 | #include "pch.h"
      |          ^~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main() {
	int a;
	string s;
	for (int i = 0; i < (s.size() - 1) / 2; i++)
		if (s[i] == s[s.size - i])
			a++;
	if (a == (s.size() - 1) / 2)
		cout << "Yes";
	else
		cout << "No";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:33: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    8 |                 if (s[i] == s[s.size - i])
      |                               ~~^~~~
      |                                     ()
Language: C++

#include <bits/stdc++.h>

int main() {
  std::string s; std::cin >> s;
  int l = s.size();
  std::string rs(s.rbegin(), s.rend());
  bool is_palindrome = true;
  if (s != rs) is_palindrome = false;
  
  std::string sub_s1 = s.substr(0, (l-1)/2);
  std::string sub_rs1 = rs.substr((l+1)/2, (l-1)/2);
  if (sub_s1 != sub_rs1) is_palindrom = false;
  
  std::string sub_s2 = s.substr((l+1)/2, (l-1)/2);
  std::string sub_rs2 = rs.substr(0, (l-1)/2);
  if (sub_s2 != sub_rs2) is_palindrom = false;
  
  if (is_palindrom) std::cout << "Yes" << std::endl;
  else std::cout << "No" << std::endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:26: error: 'is_palindrom' was not declared in this scope; did you mean 'is_palindrome'?
   12 |   if (sub_s1 != sub_rs1) is_palindrom = false;
      |                          ^~~~~~~~~~~~
      |                          is_palindrome
a.cc:16:26: error: 'is_palindrom' was not declared in this scope; did you mean 'is_palindrome'?
   16 |   if (sub_s2 != sub_rs2) is_palindrom = false;
      |                          ^~~~~~~~~~~~
      |                          is_palindrome
a.cc:18:7: error: 'is_palindrom' was not declared in this scope; did you mean 'is_palindrome'?
   18 |   if (is_palindrom) std::cout << "Yes" << std::endl;
      |       ^~~~~~~~~~~~
      |       is_palindrome
Language: C++

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

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

    string sr = s;
    reverse(sr.begin(), sr.end());
    if (s == sr) {
        string s2 = s.substr(0, (n - 1) / 2);
        string s2r = s2;
        reverse(s2r.begin(), s2r.end());
        if (s2 == s2r) {
            string s3 = s.substr((n + 3) / 2 - 1);
            string s3r = s3;
            reverse(s3r.begin(), s3r.end());
            if (s3 == s3r) {
                cout << "Yes" << endl;
                return 0;
            }
        }
    }

    cout << "No" << endl;
}

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

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

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

    string sr = reverse(s.begin(), s.end());
    if (s == sr) {
        string s2 = s.substr(0, (n - 1) / 2);
        string s2r = reverse(s2.begin(), s2.end());
        if (s2 == s2r) {
            string s3 = s.substr((n + 3) / 2 - 1);
            string s3r = reverse(s3.begin(), s3.end());
            if (s3 == s3r) {
                cout << "Yes" << endl;
                return 0;
            }
        }
    }

    cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:24: error: conversion from 'void' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    8 |     string sr = reverse(s.begin(), s.end());
      |                 ~~~~~~~^~~~~~~~~~~~~~~~~~~~
a.cc:10:34: error: 'n' was not declared in this scope
   10 |         string s2 = s.substr(0, (n - 1) / 2);
      |                                  ^
a.cc:11:29: error: conversion from 'void' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   11 |         string s2r = reverse(s2.begin(), s2.end());
      |                      ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
a.cc:14:33: error: conversion from 'void' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   14 |             string s3r = reverse(s3.begin(), s3.end());
      |                          ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
Language: C++

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

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

    string sr = reverse(s.begin(), s.end());
    if (s == sr) {
        string s2 = s.substr(0, (n - 1) / 2)
        string s2r = reverse(s2.begin(), s2.end());
        if (s2 == s2r) {
            string s3 = s.substr((n + 3) / 2 - 1)
            string s3r = reverse(s3.begin(), s3.end());
            if (s3 == s3r) {
                cout << "Yes" << endl;
                return 0;
            }
        }
    }

    cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:24: error: conversion from 'void' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    8 |     string sr = reverse(s.begin(), s.end());
      |                 ~~~~~~~^~~~~~~~~~~~~~~~~~~~
a.cc:10:34: error: 'n' was not declared in this scope
   10 |         string s2 = s.substr(0, (n - 1) / 2)
      |                                  ^
a.cc:12:19: error: 's2r' was not declared in this scope; did you mean 's2'?
   12 |         if (s2 == s2r) {
      |                   ^~~
      |                   s2
a.cc:15:23: error: 's3r' was not declared in this scope; did you mean 's3'?
   15 |             if (s3 == s3r) {
      |                       ^~~
      |                       s3
Language: C

int main(){
    char ch;
    char read[256];
    int input_cnt = 0;
    char* command = NULL;
    char* param1 = NULL;
    char* param2 = NULL;
    char* param3 = NULL;
    int space_flag = 0;
    int space_begin_idx = 0;
    int param_num = 0;
    int space_idx= -1;

    while ((ch = getchar()) != '\n') {
        read[input_cnt] = ch;
        if(ch == ' '){
            space_flag = 1;
        }
        // if(input_cnt > 1 && read[input_cnt-1] != ' ' && read[input_cnt] == ' '){
        //   space_begin_idx = input_cnt;
        // }
        if(space_flag && ch != ' '){
          space_flag = 0;
        //   read[space_begin_idx] = '\0';
          read[input_cnt-1] = '\0';
          if(param_num == 0){
            command = &read[input_cnt];
          }
          else if(param_num == 1){
            param1 = &read[input_cnt];
          }
          else if(param_num == 2){
            param2 = &read[input_cnt];
          }
          else if(param_num == 3){
            param3 = &read[input_cnt];
          }
          else{
              //エラー処理
          }
          param_num++;
        }
        input_cnt++;
    }
    read[input_cnt] = '\0';
    printf("read:%s\n", read);
    printf("command:%s\n", command);
    printf("param1:%s\n", param1);
    printf("param2:%s\n", param2);
    printf("param3:%s\n", param3);

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:21: error: 'NULL' undeclared (first use in this function)
    5 |     char* command = NULL;
      |                     ^~~~
main.c:1:1: note: 'NULL' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
  +++ |+#include <stddef.h>
    1 | int main(){
main.c:5:21: note: each undeclared identifier is reported only once for each function it appears in
    5 |     char* command = NULL;
      |                     ^~~~
main.c:14:18: error: implicit declaration of function 'getchar' [-Wimplicit-function-declaration]
   14 |     while ((ch = getchar()) != '\n') {
      |                  ^~~~~~~
main.c:1:1: note: 'getchar' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
  +++ |+#include <stdio.h>
    1 | int main(){
main.c:46:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   46 |     printf("read:%s\n", read);
      |     ^~~~~~
main.c:46:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:46:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:46:5: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

#include <bits/stdc++.h>
 
using namespace std;
typedef long long ll;
 
//マクロ
//forループ関係
//引数は、(ループ内変数,動く範囲)か(ループ内変数,始めの数,終わりの数)、のどちらか
//Dがついてないものはループ変数は1ずつインクリメントされ、Dがついてるものはループ変数は1ずつデクリメントされる
#define REP(i,n) for(ll i=0;i<(ll)(n);i++)
#define REPD(i,n) for(ll i=n-1;i>=0;i--)
#define FOR(i,a,b) for(ll i=a;i<=(ll)(b);i++)
#define FORD(i,a,b) for(ll i=a;i>=(ll)(b);i--)
//xにはvectorなどのコンテナ
#define ALL(x) (x).begin(),(x).end() //sortなどの引数を省略したい
#define SIZE(x) ((ll)(x).size()) //sizeをsize_tからllに直しておく
#define MAX(x) *max_element(ALL(x)) //最大値を求める
#define MIN(x) *min_element(ALL(x)) //最小値を求める
//定数
#define INF 1000000000000 //10^12:極めて大きい値,∞
#define MOD 1000000007 //10^9+7:合同式の法
#define MAXR 100000 //10^5:配列の最大のrange(素数列挙などで使用)
#define PI 3.14159265359 //πの値
//略記
#define PB push_back //vectorヘの挿入
#define MP make_pair //pairのコンストラクタ
#define F first //pairの一つ目の要素
#define S second //pairの二つ目の要素
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
string str;
cin >> str;
if(str.substr(0, str.size()/2) == str.substr(str.size()/2+1)) cout << "Yes";
else cout << "No";

Compiler output:
a.cc: In function 'int main()':
a.cc:35:19: error: expected '}' at end of input
   35 | else cout << "No";
      |                   ^
a.cc:29:12: note: to match this '{'
   29 | int main() {
      |            ^
Language: C++

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

int main(){
  string S0, S1;
  cin >> S0;
  long long int N = S.size();
  bool f1, f2;
  f1 = f2 = false;
  
  S1 = S0;
  reverse(S1.begin(), S1.end());
  if(S0 == S1) f1 = true;
  
  if(S0.substr(0, (N - 1) / 2) == S1.substr(0, (N - 1) / 2)) f2 = true;
  
  if(f1 && f2) cout << "Yes" << endl;
  else cout << "No" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:21: error: 'S' was not declared in this scope
    7 |   long long int N = S.size();
      |                     ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,N) for (int i = 0; i < (N); ++i)
#define all(v) v.begin(), v.end()
using namespace std;
using ll = long long;
using P = pair<int, int>;

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

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

  int N = S.size();
  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;
  }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:54: error: 'n' was not declared in this scope
   18 |   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;
int main()
{
  string s;
  cin >> s;
  int i,sw,l,c;
  sw=0;
  c=0;
  l=s.size();
  
  for(i=0;i<l;++i)
  {
  if(s.at(i)==s.at(l-1-i)) sw++;
  }
  if(sw==l) c++;
  sw=0;
  
  for(i=0;i<(l-1)/2;++i)
  {
  if(s.at(i)==s.at((l-1)/2-1-i)) sw++;
  }
  if(sw==(l-1)/2) c++;
  sw=0;
  
  for(i=(l+1)/2;i<l;++i)
  {
  if(s.at(i)==s.at((l-1-i)+(l+1)/2) sw++;
  }
  if(sw==l) c++;
  sw=0;
  
  if(c==3) cout << "Yes";
  else cout << "No";
  
return 0;  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:36: error: expected ';' before 'sw'
   28 |   if(s.at(i)==s.at((l-1-i)+(l+1)/2) sw++;
      |                                    ^~~
      |                                    ;
a.cc:29:3: error: expected primary-expression before '}' token
   29 |   }
      |   ^
a.cc:28:42: error: expected ')' before '}' token
   28 |   if(s.at(i)==s.at((l-1-i)+(l+1)/2) sw++;
      |     ~                                    ^
      |                                          )
   29 |   }
      |   ~                                       
a.cc:29:3: error: expected primary-expression before '}' token
   29 |   }
      |   ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  string s;
  cin >> s;
  int i,sw,l,c;
  sw=0;
  c=0;
  l=s.size();
  
  for(i=0;i<l;++i)
  {
  if(s.at(i)==s.at(l-1-i)) sw++;
  }
  if(sw==l) c++;
  sw=0;
  
  for(i=0;i<(l-1)/2;++i)
  {
  if(s.at(i)==s.at((l-1)/2-1-i)) sw++;
  }
  if(sw==(l-1)/2) c++;
  sw=0;
  
  for(i=(l+1)/2;i<l;++i)
  {
  if(s.at(i)==s.at(l-1-i)+(l+1)/2) sw++;
  }
  if(sw==l) c++;
  sw=0;
  
  if(c==3) cout << "Yes";
  else cout << "No"
  
return 0;  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:20: error: expected ';' before 'return'
   34 |   else cout << "No"
      |                    ^
      |                    ;
   35 | 
   36 | return 0;
      | ~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  string s;
  cin >> s;
  int i,sw,l,ans;
  sw=0;
  ans=0;
  l=s.size();
  
  for(i=0;i<l;++i)
  {
  if(s.at(i)==s.at(l-1-i)) sw++;
  }
  if(sw==l) c++;
  sw=0;
  
  for(i=0;i<(l-1)/2;++i)
  {
  if(s.at(i)==s.at((l-1)/2-1-i)) sw++;
  }
  if(sw==(l-1)/2) c++;
  sw=0;
  
  for(i=(l+1)/2;i<l;++i)
  {
  if(s.at(i)==s.at(l-1-i)+(l+1)/2) sw++;
  }
  if(sw==l) c++;
  sw=0;
  
  if(c==3) cout << "Yes";
  else cout << "No"
  
return 0;  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: 'c' was not declared in this scope
   16 |   if(sw==l) c++;
      |             ^
a.cc:23:19: error: 'c' was not declared in this scope
   23 |   if(sw==(l-1)/2) c++;
      |                   ^
a.cc:30:13: error: 'c' was not declared in this scope
   30 |   if(sw==l) c++;
      |             ^
a.cc:33:6: error: 'c' was not declared in this scope
   33 |   if(c==3) cout << "Yes";
      |      ^
a.cc:34:20: error: expected ';' before 'return'
   34 |   else cout << "No"
      |                    ^
      |                    ;
   35 | 
   36 | return 0;
      | ~~~~~~
Language: C++

#include <iostream>
#include <string>

bool isPal(std::string S)
{
  int L = S.length();
  for (int i=0; i<L/2; i++) {
    if (S[i] != S[l-1-i]) return false;
  }
  return true;
}

int main()
{
  std::string S;
  std::cin >> S;
  int L = S.length();
  if ( isPal(S) && isPal(S.substr(0, L/2)) && isPal(S.substr(1+L/2)) ) std::cout << "Yes" << std::endl;
  else std::cout << "No" << std::endl;
  return 0;
}

Compiler output:
a.cc: In function 'bool isPal(std::string)':
a.cc:8:19: error: 'l' was not declared in this scope
    8 |     if (S[i] != S[l-1-i]) return false;
      |                   ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:16:5: error: 'count' undeclared (first use in this function)
   16 |     count++;
      |     ^~~~~
main.c:16:5: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include "bits/stdc++.h"

using namespace std;
#define IOS ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define ll long long

bool palin(string s)
{
  string q(s.rbegin(), s.rend());
  if (q==s)
    return true;
  else
    return false;
}

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


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

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


Compiler output:
a.cc:27:1: error: expected declaration before '}' token
   27 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{ string s;
 cin>>s;

 int n=s.size();
 if(s.substr(0,(n-1)/2)==s.substr((n+3)/2-1))
    {
        cout<"Yes"<<endl;
    }
    else
    {cout<<"No"<<endl;}
    return 0;
    }



Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: invalid operands of types 'const char [4]' and '<unresolved overloaded function type>' to binary 'operator<<'
   10 |         cout<"Yes"<<endl;
      |              ~~~~~^~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:45: error: expected ')' before '{' token
    8 |  if(s.substr(0,(n-1)/2)==s.substr((n+3)/2-1)
      |    ~                                        ^
      |                                             )
    9 |     {cout<Yes<<endl;
      |     ~                                        
a.cc:14:5: error: expected primary-expression before '}' token
   14 |     }
      |     ^
Language: C

#include<stdio.h>
#include<string.h>
int main(void){
  char s[110];
  int i,k;
  scanf("%s",s);
  k=(starlen(s)-1)/2;
  for(i=0;i<k;i++){
    if(s[i]!=s[k-i]&&s[i]!=s[k+2+i]){puts("No");return 0;}
  }
  puts("yes");
 return 0; 
}

Compiler output:
main.c: In function 'main':
main.c:7:6: error: implicit declaration of function 'starlen'; did you mean 'strlen'? [-Wimplicit-function-declaration]
    7 |   k=(starlen(s)-1)/2;
      |      ^~~~~~~
      |      strlen
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll =long long;
#define all(v) v.begin(),v.end()
 
int main() {
 string S;
  cin>>S;
  string x=reverse(all(S));
  if(x!=S) {
cout<<"No"<<endl;
  return 0;
  }
  ll N=S.size();
  for(ll i=0;i<N/2;i++) {
if(S[i]!=S[N-1-i]) {
cout<<"No"<<endl;
return 0;
}
  }
  
  
  cout<<"Yes"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: conversion from 'void' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    9 |   string x=reverse(all(S));
      |            ~~~~~~~^~~~~~~~
Language: C++

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


int main() {
    string s;
    cin>>s;
    int n=s.size();
    num1=(n+1)/2;
    num2=(n+3)/2;
    bool d=true;
    rep(i,num1){
        if(s.at(i)!=s.at(num1-1-i)){
            d=false;
            break;
        }
    }
    if(d==false){
        cout<<"No"<<endl;
        return 0;
    }
    rep(i,n-num2){
        if(s.at(num2-1+i)!=s.at(n-1-i)){
            d=false;
        }
    }
    if(d==false){
        cout<<"No"<<endl;
        return 0;
    }
    cout<<"Yes"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: 'num1' was not declared in this scope
   13 |     num1=(n+1)/2;
      |     ^~~~
a.cc:14:5: error: 'num2' was not declared in this scope
   14 |     num2=(n+3)/2;
      |     ^~~~
Language: C++

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


int main() {
    string s;
    cin>>s;
    int n=s.size()
    num1=(n+1)/2;
    num2=(n+3)/2;
    bool d=true;
    rep(i,num1){
        if(s.at(i)!=s.at(num1-1-i)){
            d=false;
        }
    }
    if(d==false){
        cout<<"No"<<endl;
        return 0;
    }
    rep(i,n-num2){
        if(s.at(num2-1+i)!=s.at(n-1-i)){
            d=false;
        }
    }
    if(d==false){
        cout<<"No"<<endl;
        return 0;
    }
    cout<<"Yes"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: expected ',' or ';' before 'num1'
   13 |     num1=(n+1)/2;
      |     ^~~~
a.cc:14:5: error: 'num2' was not declared in this scope
   14 |     num2=(n+3)/2;
      |     ^~~~
a.cc:16:11: error: 'num1' was not declared in this scope
   16 |     rep(i,num1){
      |           ^~~~
a.cc:3:45: note: in definition of macro 'rep'
    3 | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
      |                                             ^
Language: C++

#include <iostream>
using namespace std;
int main(){
    string s;
    cin >> s;
    int n = s.size();
    vector<char>a(n);
    vector<char>b(n);
    for(int i=0; i<n; i++){
        if(s[i] != s[n-1-i]){
            cout << "No" << endl;
            return 0;
        }
    }

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'vector' was not declared in this scope
    7 |     vector<char>a(n);
      |     ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:7:12: error: expected primary-expression before 'char'
    7 |     vector<char>a(n);
      |            ^~~~
a.cc:8:12: error: expected primary-expression before 'char'
    8 |     vector<char>b(n);
      |            ^~~~
a.cc:17:12: error: 'a' was not declared in this scope
   17 |         if(a[i]!=b[n/2-i]){
      |            ^
a.cc:17:18: error: 'b' was not declared in this scope
   17 |         if(a[i]!=b[n/2-i]){
      |                  ^
Language: Java

        import java.util.Scanner;
         
        public class Main{
          public static void main(String[] args){
         
            Scanner scan = new Scanner(System.in);
         
            String word = scan.nextLine();
            int length = word.length();
         
            if (isPalindrome(word) && isPalindrome(word.substring(0, (length-1)/2)) && isPalindrome(word.substring(((length+3)/2)-1, length))){
              System.out.println("Yes");
            }
            else {
              System.out.println("No");
            }
          }
         
          public static boolean isPalindrome(String string){
            for(int i = 0; i < string.length()/2; i++){
              if (string.substring(i).compareTo(string.substring(string.length()-1-i))){
                return false;
              }
            }
            return true;
          }
        }

Compiler output:
Main.java:21: error: incompatible types: int cannot be converted to boolean
              if (string.substring(i).compareTo(string.substring(string.length()-1-i))){
                                               ^
1 error
Language: Java

    import java.util.Scanner;
     
    public class Main{
      public static void main(String[] args){
     
        Scanner scan = new Scanner(System.in);
     
        String word = scan.nextLine();
        int length = word.length();
     
        if (isPalindrome(word) && isPalindrome(word.substring(0, (length-1)/2)) && isPalindrome(word.substring(((length+3)/2)-1, length))){
          System.out.println("Yes");
        }
        else {
          System.out.println("No");
        }
      }
     
      public static boolean isPalindrome(String string){
        for(int i = 0; i < string.length()/2; i++){
          if (String.equals(string.substring(i), string.substring(string.length()-1-i))){
            return false;
          }
        }
        return true;
      }
    }

Compiler output:
Main.java:21: error: method equals in class String cannot be applied to given types;
          if (String.equals(string.substring(i), string.substring(string.length()-1-i))){
                    ^
  required: Object
  found:    String,String
  reason: actual and formal argument lists differ in length
1 error
Language: Java

import java.util.Scanner;

public class Solution{
  public static void main(String[] args){

    Scanner scan = new Scanner(System.in);

    String word = scan.nextLine();
    int length = word.length();

    if (isPalindrome(word) && isPalindrome(word.substring(0, (length-1)/2)) && isPalindrome(word.substring(((length+3)/2)-1, length))){
      System.out.println("Yes");
    }
    else {
      System.out.println("No");
    }
  }

  public static boolean isPalindrome(String string){
    for(int i = 0; i < string.length()/2; i++){
      if (Character.compare(string.substring(i), string.substring(string.length()-1-i) != 0)){
        return false;
      }
    }
    return true;
  }
}

Compiler output:
Main.java:3: error: class Solution is public, should be declared in a file named Solution.java
public class Solution{
       ^
Main.java:21: error: bad operand types for binary operator '!='
      if (Character.compare(string.substring(i), string.substring(string.length()-1-i) != 0)){
                                                                                       ^
  first type:  String
  second type: int
2 errors
Language: Java

      public static void main(String[] args){
        
        Scanner scan = new Scanner(System.in);
        
        String word = scan.nextLine();
        int length = word.length();
        
        if (isPalindrome(word) && isPalindrome(word.substring(0, (length-1)/2)) && isPalindrome(word.substring(((length+3)/2)-1, length))){
          System.out.println("Yes");
        }
        else {
          System.out.println("No");
        }
      }
      
      public static boolean isPalindrome(String string){
        for(int i = 0; i < string.length()/2; i++){
          if (Character.compare(string.substring(i), string.substring(string.length()-1-i) != 0)){
            return false;
          }
        }
        return true;
      }
    }

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
      public static void main(String[] args){
                    ^
  (use --enable-preview to enable unnamed classes)
Main.java:24: error: class, interface, enum, or record expected
    }
    ^
2 errors