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

#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii =  pair<int, int>;
using pll =  pair<long long, long long>;
constexpr char ln =  '\n';
constexpr long long MOD = 998244353;
constexpr long long INF = 1000000009LL;
#define all(x) (x).begin(),(x).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define fo(i,j,n) for (int i=(j); i < (n); i++)
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }


int main() {   
    string s; cin >> s;
    int len = s.size();
    string s1 = s.substr(0, (len-1)/2);
    string s2 = s.substr((len+3)/2-1);
    string rs1 = s1; reverse(all(rs1));
    string rs2 = s2; reverse(all(rs2));
    string rs = s; reverse(all(rs))
    if(s1==rs1 && s2==rs2 && s == rs) cout << "Yes" << ln;
    else cout << "No" << ln;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:36: error: expected ';' before 'if'
   24 |     string rs = s; reverse(all(rs))
      |                                    ^
      |                                    ;
   25 |     if(s1==rs1 && s2==rs2 && s == rs) cout << "Yes" << ln;
      |     ~~                              
a.cc:26:5: error: 'else' without a previous 'if'
   26 |     else cout << "No" << ln;
      |     ^~~~
Language: C

#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii =  pair<int, int>;
using pll =  pair<long long, long long>;
constexpr char ln =  '\n';
constexpr long long MOD = 998244353;
constexpr long long INF = 1000000009LL;
#define all(x) (x).begin(),(x).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define fo(i,j,n) for (int i=(j); i < (n); i++)
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }


int main() {   
    string s; cin >> s;
    int len = s.size();
    string s1 = s.substr(0, (len-1)/2);
    string s2 = s.substr((len+3)/2-1);
    string rs1 = s1; reverse(all(rs1));
    string rs2 = s2; reverse(all(rs2));
    if(s1==rs1 && s2==rs2) cout << "Yes" << ln;
    else cout << "No" << ln;
}

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

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

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


    int size = S.size();
    T = S;
    T.reserve();

    bool result = true;
    if (T != S) {
        result = false;
    }
    for (int i=0; i<(size-1)/2; i++) {
        if (S[i] != S[(size-1)/2 + 1 + i]) {
            result = false;
            break;
        }
    }

    if (result == true) cout << "Yes" << endl;
    else                cout << "No"  << endl;

    return 0;
}

Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | v#include<bits/stdc++.h>
      |  ^
a.cc:1:1: error: 'v' does not name a type
    1 | v#include<bits/stdc++.h>
      | ^
a.cc: In function 'int main()':
a.cc:5:5: error: 'string' was not declared in this scope
    5 |     string S, T;
      |     ^~~~~~
a.cc:6:5: error: 'cin' was not declared in this scope
    6 |     cin >> S;
      |     ^~~
a.cc:6:12: error: 'S' was not declared in this scope
    6 |     cin >> S;
      |            ^
a.cc:10:5: error: 'T' was not declared in this scope
   10 |     T = S;
      |     ^
a.cc:24:25: error: 'cout' was not declared in this scope
   24 |     if (result == true) cout << "Yes" << endl;
      |                         ^~~~
a.cc:24:42: error: 'endl' was not declared in this scope
   24 |     if (result == true) cout << "Yes" << endl;
      |                                          ^~~~
a.cc:25:25: error: 'cout' was not declared in this scope
   25 |     else                cout << "No"  << endl;
      |                         ^~~~
a.cc:25:42: error: 'endl' was not declared in this scope
   25 |     else                cout << "No"  << endl;
      |                                          ^~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main ()
{
  string S;
  int n=S.size();
  for(int i=0;i<n;i++)
  {
    if(S[i]!=S[n-i-1]
    {
      cout<<"No"<<endl;
      return 0;
    }
  }
       for(int i=0;i=(n-1)/2;i++)
       {
        if(S[i]!=S[((n-1)/2)-i]||S[((n+3)/2)+i]!=S[n-i])
        {
          cout<<"No"<<endl;
      return 0;
    }
  }
  cout<<"Yes"<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:22: error: expected ')' before '{' token
   11 |     if(S[i]!=S[n-i-1]
      |       ~              ^
      |                      )
   12 |     {
      |     ~                 
a.cc:16:3: error: expected primary-expression before '}' token
   16 |   }
      |   ^
Language: C++

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

int main(){
    string s;
    cin >> s;
    string zen,kou,r_zen,r_kou;
    zen = s.substr(0,s.size()/2);
    r_zen = zen;
    reverse(r_zen.begin(),r_zen.end());
    kou = s.substr(((s.size()+3)/2)-1,s.size()/2);
    r_kou = kou;
    reverse(r_kou.begin(),r_kou.end());
    if(zen == r_zen && kou == r_kou){
        cout << "Yes" << endl;
    }else{
        cout << "No" << endl;
    }

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

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

int main(){
    string s;
    cin >> s;
    string zen,kou;
    zen = s.substr(0,(s.size()-1)/2);
    kou = s.substr(((s.size()+3)/2)-1,(s.size()-1)/2);
    for(int i=0;i< zen.size()/2;i++){
        if(zen.at(i)!=zen.at(zen.size()-1-i)){
            cout << "No" << endl;
            return 0;
        }
        if(kou.at(i)!=zen.at(kou.size()-1-i)){
            cout << "No" << endl;
            return 0;
        }
    }
    cout << "Yes" << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:20:27: error: expected '}' at end of input
   20 |     cout << "Yes" << endl;
      |                           ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
#include <math.h>
#define rep(i,n) for (int i=0;i < (n); ++i)
#define ALL(x) (x).begin(), (x).end()
using namespace std;
using ll = long long;
 
bool pa(string s){
    string L = (s.rbegin(),s.rend());
    return s == L;
}
int main() {
    string S;
    cin >> S;
    int n = S.size();
    if(pa(S)&&pa(S.substr(0,(n-1)/2))&&pa(S.substr((n+1)/2))){
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }
}

Compiler output:
a.cc: In function 'bool pa(std::string)':
a.cc:9:25: warning: ignoring return value of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reverse_iterator std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::rbegin() [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reverse_iterator = std::reverse_iterator<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> > >]', declared with attribute 'nodiscard' [-Wunused-result]
    9 |     string L = (s.rbegin(),s.rend());
      |                 ~~~~~~~~^~
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:997:7: note: declared here
  997 |       rbegin() _GLIBCXX_NOEXCEPT
      |       ^~~~~~
a.cc:9:27: error: conversion from 'std::__cxx11::basic_string<char>::reverse_iterator' {aka 'std::reverse_iterator<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> > >'} to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    9 |     string L = (s.rbegin(),s.rend());
      |                ~~~~~~~~~~~^~~~~~~~~~
Language: C++

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

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

int main(){
        string s;
        cin >> s;
        int n = s.size();

        if(is_rev(s) && is_rev(s.substr(0,(n-1)/2)) && is_rev(s.substr((n+1)/2))){
                cout << "Yes" << endl;
        }
        else{
                cout << "No" << endl;
        }


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

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

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

int main(){
	ios::base_sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	string s;
	cin>>s;
	int n =s.length();
	if( isPalli(s) && isPalli( s.substr( 0 , (n-1) / 2 ) ) && isPalli( s.substr((n+3)/2-1, (n-1)/2)) ){
		cout<<"Yes\n";
	}else{
		cout<<"No\n";
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: 'base_sync_with_stdio' is not a member of 'std::ios' {aka 'std::basic_ios<char>'}
   10 |         ios::base_sync_with_stdio(0);
      |              ^~~~~~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#include <string>
using namespace std;
string s;
int main(){
  cin>>s;
  for(i=0;i<=s(n);i++){
    if(s(n)-1/2==s(n)+3/2){
      cout<<"yes"<<endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: 'i' was not declared in this scope
    7 |   for(i=0;i<=s(n);i++){
      |       ^
a.cc:7:16: error: 'n' was not declared in this scope; did you mean 'yn'?
    7 |   for(i=0;i<=s(n);i++){
      |                ^
      |                yn
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string s;
  cin >> s;
  
  
  int sum1=0;
  int sum2=0;
  for(int i=0; i<(n+1)/2; i++){
  if(s.at(i)==s.at((n-1)/2-i) && s.at((n+3)/2+i)==s.at(n-1-i)){
    sum1++;
}
  }
    for(int j=0; j<n; j++){
    if(s.at(j)==s.at(n-1-j)){
      sum2++;
    }
    }
    
  if(sum1==(n+1)/2 && sum2==n){
    cout << "Yes" << endl;
  }
  else{
  cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: 'n' was not declared in this scope
   11 |   for(int i=0; i<(n+1)/2; i++){
      |                   ^
a.cc:16:20: error: 'n' was not declared in this scope
   16 |     for(int j=0; j<n; j++){
      |                    ^
a.cc:22:13: error: 'n' was not declared in this scope
   22 |   if(sum1==(n+1)/2 && sum2==n){
      |             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
bool isPalindrome (string a) {
  string b = "";
  for (int i = a.size-1; i >= 0; i--) {
    b+= a[i]; }
  if(b==a){
    return true;}
  else {
    return false;} }
    
 
 
 
int main () {
  string x;
  cin >> x;
  string y = "";
  int n = x.size();
  for (int i = 0; i < (n-1)/ 2; i++) {
    y+= x[i]; }
  string z = "";
  for (int i = (n+1) /2; i < n; i++) {
    z+= x[i]; }
  if (isPalindrome(x) && isPalindrome(y) && isPalindrome(z){
    cout <<"Yes"; }
      else {
        cout <<"No"; } }

Compiler output:
a.cc: In function 'bool isPalindrome(std::string)':
a.cc:6:18: 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 '()' ?)
    6 |   for (int i = a.size-1; i >= 0; i--) {
      |                ~~^~~~
      |                      ()
a.cc: In function 'int main()':
a.cc:26:60: error: expected ')' before '{' token
   26 |   if (isPalindrome(x) && isPalindrome(y) && isPalindrome(z){
      |      ~                                                     ^
      |                                                            )
a.cc:29:24: error: expected primary-expression before '}' token
   29 |         cout <<"No"; } }
      |                        ^
Language: C++

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

bool isPalindrome (string a) {
  string b = "";
  for (int i = a.size-1; i >= 0; i--) {
    b+= a[i]; }
  if(b==a){
    return true;}
  else {
    return false;}
    



int main () {
  string x;
  cin >> x;
  string y = "";
  int n = x.size();
  for (int i = 0; i < (n-1)/ 2; i++) {
    y+= x[i]; }
  string z = "";
  for (int i = (n+1) /2; i < n; i++) {
    z+= x[i]; }
  if (isPalindrome(x) && isPalindrome(y) && isPalindrome(z){
    cout <<"Yes""; }
      else {
        cout <<"No"; }
    return 0; }
  
 
    
    

Compiler output:
a.cc:27:17: warning: missing terminating " character
   27 |     cout <<"Yes""; }
      |                 ^
a.cc:27:17: error: missing terminating " character
   27 |     cout <<"Yes""; }
      |                 ^~~~
a.cc: In function 'bool isPalindrome(std::string)':
a.cc:6:18: 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 '()' ?)
    6 |   for (int i = a.size-1; i >= 0; i--) {
      |                ~~^~~~
      |                      ()
a.cc:16:10: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   16 | int main () {
      |          ^~
a.cc:16:10: note: remove parentheses to default-initialize a variable
   16 | int main () {
      |          ^~
      |          --
a.cc:16:10: note: or replace parentheses with braces to value-initialize a variable
a.cc:16:13: error: a function-definition is not allowed here before '{' token
   16 | int main () {
      |             ^
a.cc:30:16: error: expected '}' at end of input
   30 |     return 0; }
      |                ^
a.cc:4:30: note: to match this '{'
    4 | bool isPalindrome (string a) {
      |                              ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main()
{
    string s, str_1, str_2, str_3, str_4, str_5;
    cin >> s;
    int cnt = 0;
    string s_rev = reverse(s.begin(), s.end());
    if(s == s_rev) cnt++;
    for(int i=0;i<(s.size()-1)/2;i++) str_1[i] = s[i];
    string str_1_rev = reverse(str_1.begin(), str_1.end());
    if(str_1 == str_1_rev) cnt++;
    for(int i=(s.size()+3)/2;i<s.size();i++) str_2[i] = s[i];
    string str_2_rev = reverse(str_2.begin(), str_2.end());
    if(str_2 == str_2_rev) cnt++;
    if(cnt == 3) cout << "Yes" << endl;
    else cout << "No" << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:27: error: conversion from 'void' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    9 |     string s_rev = reverse(s.begin(), s.end());
      |                    ~~~~~~~^~~~~~~~~~~~~~~~~~~~
a.cc:12:31: error: conversion from 'void' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   12 |     string str_1_rev = reverse(str_1.begin(), str_1.end());
      |                        ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:15:31: error: conversion from 'void' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   15 |     string str_2_rev = reverse(str_2.begin(), str_2.end());
      |                        ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: Java

import java.util.Scanner;

public class extension {

	public static void main(String[] args) {
		
		Scanner input=new Scanner (System.in);
		
		String s=input.next();
		
		boolean yes=true;
		for(int i=0;i<s.length();i++) {
			if(s.charAt(i)==s.charAt(s.length()-1-i)) {
				yes=true;
			}
			else {
				yes=false;
				break;
			}
		}
		if(yes)
			System.out.println("Yes");
		else
			System.out.println("No");
		
	}

}

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

import java.util.Scanner;

public class Palindrome {

	public static void main(String[] args) {
		
		Scanner input=new Scanner (System.in);
		
		String s=input.next();
		
		boolean yes=true;
		for(int i=0;i<s.length();i++) {
			if(s.charAt(i)==s.charAt(s.length()-1-i)) {
				yes=true;
			}
			else {
				yes=false;
				break;
			}
		}
		if(yes)
			System.out.println("Yes");
		else
			System.out.println("No");
		
	}

}


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

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

int main(){
  int nu=0;
  string s;
  cin>>s;
  for(int i=0;i<s.size();i++){
    if(s[i]!=s[s.size()-1-i]){
      nu++;
    }
  }
  for(int j=0;j<s.size()/2;j++){
    if(s[j]!=s[s.s.size()/2-1-i]){
      nu++;
    }
  }
  if(nu==0){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:14:18: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 's'
   14 |     if(s[j]!=s[s.s.size()/2-1-i]){
      |                  ^
a.cc:14:31: error: 'i' was not declared in this scope
   14 |     if(s[j]!=s[s.s.size()/2-1-i]){
      |                               ^
Language: C++

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

int main(){
    string S;
    cin >> S;
    string X = S.substr(0,S.size()/2);
    string Y = S.substr(S.size()/2+1);
    for(int i = 0; i < S.size(); i++) {
        if(S[i] != S[S.size()-1-i]) {
            cout << "No" << endl;
            return 0;
        }
    }
    for(i = 0; i < S.size()/2; i++) {
        if(X[i] != X[S.size()/2-1-i]) {
            cout << "No" << endl;
            return 0;
        }
        else if(Y[i] != Y[S.size()/2-1-i]) {
            cout << "No" << endl;
            return 0;
        }
    }
    cout << "Yes" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: 'i' was not declared in this scope
   15 |     for(i = 0; i < S.size()/2; i++) {
      |         ^
Language: C++

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

int main(){
    stirng S;
    cin >> S;
    string X = S.substr(0,S.size()/2-1)
    string Y = S.substr(S.size()/2+1);
    for(int i = 0; i < S.size()/2; i++) {
        if(X[i] != X[S.size()/2-1-i]) {
            cout << "No" << endl;
            return 0;
        }
        else if(Y[i] != Y[S.size()/2-1-i]) {
            cout << "No" << endl;
            return 0;
        }
    }
    cout << "Yes" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'stirng' was not declared in this scope
    5 |     stirng S;
      |     ^~~~~~
a.cc:6:12: error: 'S' was not declared in this scope
    6 |     cin >> S;
      |            ^
a.cc:14:17: error: 'Y' was not declared in this scope
   14 |         else if(Y[i] != Y[S.size()/2-1-i]) {
      |                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  string S;
  cin >> S;
  int N = S.size();
  
  for(int i=0;i<(N-1)/2;i++){
    if(S.at(i) != S.at(N-1-i)){
      cout << "No" << endl;
      return 0;
    }
  }
  
  for(int i=0;i<(N-1)/3;i++){
    if(S.at(i) != S.at((N-1-i)/2))){
      cout << "No" << endl;
      return 0;
    }
  }
  
  for(int i=0;i<(N-1)/3;i++){
    if(S.at(i) != S.at((N-1-i)/2))){
      cout << "No" << endl;
      return 0;
    }
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:35: error: expected primary-expression before ')' token
   17 |     if(S.at(i) != S.at((N-1-i)/2))){
      |                                   ^
a.cc:24:35: error: expected primary-expression before ')' token
   24 |     if(S.at(i) != S.at((N-1-i)/2))){
      |                                   ^
Language: C++

int main()
{
    string str;
    scanf("%s",&str);
    int n=str.size();
    int start = 0;
    int end = n-1;
    while(start<end)
    {
        if(str[start]!=str[end])
            printf("%s\n","No");
      start++;
      end--;
    }
    printf("%s\n","Yes");
}


Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'string' was not declared in this scope
    3 |     string str;
      |     ^~~~~~
a.cc:4:17: error: 'str' was not declared in this scope; did you mean 'std'?
    4 |     scanf("%s",&str);
      |                 ^~~
      |                 std
a.cc:4:5: error: 'scanf' was not declared in this scope
    4 |     scanf("%s",&str);
      |     ^~~~~
a.cc:11:13: error: 'printf' was not declared in this scope
   11 |             printf("%s\n","No");
      |             ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main()
a.cc:15:5: error: 'printf' was not declared in this scope
   15 |     printf("%s\n","Yes");
      |     ^~~~~~
a.cc:15:5: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

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

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

	return t == s;
}

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

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:11: error: expected initializer before '.' token
   13 |     int n .size();
      |           ^
a.cc:14:58: error: 'n' was not declared in this scope
   14 |         if (isPalindrome(s) && isPalindrome(s.substr(0, (n - 1) / 2)) && isPalindrome(s.substr((n + 1) / 2))) {
      |                                                          ^
Language: C++

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

int main(){
  string s;
  cin >> s;
  bool flg=true;
  string s1=reverse(s.begin(),s.end());
  if(s!=s1){
    flg=false;
  }
  string s2=s.substr(0,(s.size()-1)/2);
  string s3=reverse(s2.begin(),s2.end());
  if(s2!=s3){
    flg=false;
  }
  string s4=s.substr((s.size()+3)/2);
  string s5=reverse(s4.begin(),s4.end());
  if(s4!=s5){
    flg=false;
  }
  if(flg){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: conversion from 'void' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    8 |   string s1=reverse(s.begin(),s.end());
      |             ~~~~~~~^~~~~~~~~~~~~~~~~~~
a.cc:13:20: error: conversion from 'void' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   13 |   string s3=reverse(s2.begin(),s2.end());
      |             ~~~~~~~^~~~~~~~~~~~~~~~~~~~~
a.cc:18:20: error: conversion from 'void' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   18 |   string s5=reverse(s4.begin(),s4.end());
      |             ~~~~~~~^~~~~~~~~~~~~~~~~~~~~
Language: C

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

int main(void)
{
   char s[100],c[100],a;
   int n,i,j,b;

   scanf("%s",s);
   strcpy(c,s);
   n=strlen(s);
   for(i=0,j=(n-1)/2; i<n/2; i++,j--){
      a=c[i];
      c[i]=c[j];
      c[j]=a;
   }
      for(i=(n+3)/2,j=n-1; i<n; i++,j--){
      a=s[i];
      s[i]=s[j];
      s[j]=a;
   }
   b=strcmp(s2,c2);
   if(b==0){ printf("Yes\n"); return 0;}
   else{printf("No\n"); return 0;}
}


Compiler output:
main.c: In function 'main':
main.c:22:13: error: 's2' undeclared (first use in this function); did you mean 's'?
   22 |    b=strcmp(s2,c2);
      |             ^~
      |             s
main.c:22:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:22:16: error: 'c2' undeclared (first use in this function); did you mean 'c'?
   22 |    b=strcmp(s2,c2);
      |                ^~
      |                c
Language: C

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

int main(void)
{
   char s[100],c[100],a,a2;
   int n,i,j,b;

   scanf("%s",s);
   strcpy(c,s);
   n=strlen(s);
   for(i=0,j=(n/2)-1; i<n/2; i++,j--){
      a=c[i];
      c[i]=c[j];
      c[j]=a;
   }
      for(i=(n/2)+1,j=n; i<n; i++,j--){
      a2=s[i];
      s[i]=s[j];
      s[j]=a2;
   }
   b=strcmp(s,c);
   if(b==0){ printf("Yes\n"); return 0;}
   else{printf("No\n"); return 0;}
}
~


Compiler output:
main.c:26:1: error: expected identifier or '(' before '~' token
   26 | ~
      | ^
Language: C

#include<iostream>
using namespace std;
 
bool is_palindrome(string s){
    string t(s.rbegin(),s.rend());
    return s == t;
}
 
int main(){
    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:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C

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

int main(void)
{
   char s[100],c[100],a;
   int n,i,j;

   scanf("%s",s);
   strcpy(c,s);
   n=strlen(s);

   for(i=0,j=n-1; i<n/2; i++,j--){
      a=c[i];
      c[i]=c[j];
      c[j]=a;
   }
   b=strcmp(s,c);
   if(b!=0){ printf("No\n"); return 0;}
   else{printf("Yes\n"); return 0;}
}


Compiler output:
main.c: In function 'main':
main.c:18:4: error: 'b' undeclared (first use in this function)
   18 |    b=strcmp(s,c);
      |    ^
main.c:18:4: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'n' was not declared in this scope
    7 |   n=s.size();
      |   ^
a.cc:9:28: error: expected ')' before '{' token
    9 |     if(s[i]!=s[(n-1)/2-1-i]{
      |       ~                    ^
      |                            )
a.cc:20:3: error: expected primary-expression before '}' token
   20 |   }
      |   ^
Language: C++

#include<bits/stdc++.h>
#include<math.h>
using namespace std;
void pal(string k){
  int i;
  for(i=0;i<k.size();i++){
    if((k[i]==k[(k.size())-1-i]) && i==(k.size())-1){
      count++;
    }
     
int main(){
  string s;
  int count=0;
  cin >> s;
  string f;
  string l;
  pal(s);
  for(int i;i<floor(n/2);i++){
    f[i]=s[i];
  }
  for(int i;i<floor(n/2);i++){
    f[i]=s[i+ceil(n/2)];
  }
  pal(f);
  pal(l);
  if(count==3){
    cout <<"Yes";
  }
  else{
    cout << "No";
  }
  return 0;
}


Compiler output:
a.cc: In function 'void pal(std::string)':
a.cc:8:12: error: no post-increment operator for type
    8 |       count++;
      |            ^~
a.cc:11:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   11 | int main(){
      |         ^~
a.cc:11:9: note: remove parentheses to default-initialize a variable
   11 | int main(){
      |         ^~
      |         --
a.cc:11:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:11:11: error: a function-definition is not allowed here before '{' token
   11 | int main(){
      |           ^
a.cc:33:2: error: expected '}' at end of input
   33 | }
      |  ^
a.cc:6:26: note: to match this '{'
    6 |   for(i=0;i<k.size();i++){
      |                          ^
a.cc:33:2: error: expected '}' at end of input
   33 | }
      |  ^
a.cc:4:19: note: to match this '{'
    4 | void pal(string k){
      |                   ^
Language: C++

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

int pal(string k);
int main(){
  string s;
  int count=0;
  cin >> s;
  pal(s);
  if(count==1){
  int n=s.size();
  string f;
  for(int i;i<floor(n/2);i++){
    f[i]=s[i];
  }
  string l;
   for(int i;i<floor(n/2);i++){
    f[i]=s[i+ceil(n/2)+1];
  }
  pal(f);
    pal(l);
  }
  if(count==3){
    cout << "Yes";
  }
  else{
    cout << "No";
  }
  return 0;
}
int pal(string k){
  int i;
  for( i=0;i<k.size();i++){
    if(k[i]!=k[(k.size())-1-i]){
      break;
    }
  }
  if(i==k.size()){
    count+=1;
  }
}
    
    
    
  


Compiler output:
a.cc: In function 'int pal(std::string)':
a.cc:40:12: error: overloaded function with no contextual type information
   40 |     count+=1;
      |            ^
a.cc:42:1: warning: no return statement in function returning non-void [-Wreturn-type]
   42 | }
      | ^
Language: C++

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

int pal(string k);
int main(){
  string s;
  int count=0;
  cin >> s;
  pal(s);
  if(count==1){
  int n=s.size();
  string f;
  for(int i;i<floor(n/2);i++){
    f[i]=s[i];
  }
  string l;
   for(int i;i<floor(n/2);i++){
    f[i]=s[i+ceil(n/2)+1];
  }
  pal(f);
    pal(l);
  }
  if(count==3){
    cout << "Yes";
  }
  else{
    cout << "No";
  }
  return 0;
}
int pal(string k){
  int i;
  for( i=0;i<k.size();i++){
    if(k[i]!=k[(k.size())-1-i]){
      break;
    }
  }
  if(i==k.size()){
    count++;
  }
}
    
    
    
  


Compiler output:
a.cc: In function 'int pal(std::string)':
a.cc:40:10: error: no post-increment operator for type
   40 |     count++;
      |          ^~
a.cc:42:1: warning: no return statement in function returning non-void [-Wreturn-type]
   42 | }
      | ^
Language: C++

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

int pal(string k);
int main(){
  string s;
  cin >> s;
  pal(s);
  if(count ==1){
  int n=s.size();
  int count=0;
  string f;
  for(int i;i<floor(n/2);i++){
    f[i]=s[i];
  }
  string l;
   for(int i;i<floor(n/2);i++){
    f[i]=s[i+ceil(n/2)+1];
  }
  pal(f);
    pal(l);
  }
  if(count ==3){
    cout << "Yes";
  }
  else{
    cout << "No";
  }
  return 0;
}
int pal(string k){
  int i;
  for( i=0;i<k.size();i++){
    if(k[i]!=k[(k.size())-1-i]){
      break;
    }
  }
  if(i==k.size()){
    count++;
  }
}
    
    
    
  

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator=='
   10 |   if(count ==1){
      |      ~~~~~~^~~
a.cc:24:12: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator=='
   24 |   if(count ==3){
      |      ~~~~~~^~~
a.cc: In function 'int pal(std::string)':
a.cc:40:10: error: no post-increment operator for type
   40 |     count++;
      |          ^~
a.cc:42:1: warning: no return statement in function returning non-void [-Wreturn-type]
   42 | }
      | ^
Language: Java

#include<iostream>
using namespace std;

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

int main(){
    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:
Main.java:1: error: illegal character: '#'
#include<iostream>
^
Main.java:1: error: class, interface, enum, or record expected
#include<iostream>
        ^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
bool is_palindrome(string s){
^
  (use --enable-preview to enable unnamed classes)
Main.java:5: error: ';' expected
    string t(s.rbegin(),s.rend());
            ^
Main.java:5: error: ';' expected
    string t(s.rbegin(),s.rend());
                       ^
Main.java:5: error: ';' expected
    string t(s.rbegin(),s.rend());
                                ^
Main.java:11: error: not a statement
    cin>>s;
       ^
Main.java:14: error: not a statement
        cout<<"Yes"<<endl;
                   ^
Main.java:16: error: not a statement
    else cout<<"No"<<endl;
                   ^
9 errors
Language: C

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

int main(void)
{  
   int n, i, flag;
   char s[100];
   flag=1;
   scanf("%s",s[]);
   n=strlen(s);
   for(i=0; i<n/2; i++){
      if(s[i]!=s[n-1-i])
         flag=0;
      if(flag==0)
         i=n;
   }
   if(flag==1)
      for(i=0; i<n/2; i++){
      if(s[i]!=s[(n-3)/2-i])
         flag=0;
      if(flag==0)
         i=n;
   }
   if(flag==1)
      for(i=(n+1)/2;i<n;i++){
         if(s[i]!=s[n-1-i]) flag=0;
         if(flag==0) i=n;
      }
  
   if(f==1) printf("Yes\n");
   else     printf("No\n");
   
   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:17: error: expected expression before ']' token
    9 |    scanf("%s",s[]);
      |                 ^
main.c:30:7: error: 'f' undeclared (first use in this function)
   30 |    if(f==1) printf("Yes\n");
      |       ^
main.c:30:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

int main(){
  string S ;
  cin >> S ;
  string T = S ;
  int s = S.size();
  bool a , b , c = true;
  reverse(S.begin(),S.end());
  
  if(S!=T)) a = false;
  string s1 = S.substr(0,(s-1)/2-1);
  string t1 = s1;
  reverse(s1.begin(),s1.end());
  if(s1!=t1) b = false;
  string s2 = S.substr((s+1)/2,s-1);
  string t2 = s2;
  reverse(s2.begin(),s2.end());
  if(s2!=t2) c = false;
  
  if(a&&b&&c) cout << "Yes" << endl;
  else cout << "No" << endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: expected primary-expression before ')' token
   12 |   if(S!=T)) a = false;
      |           ^
Language: C++

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

int main(){
  string S ;
  cin >> S ;
  string T = S ;
  int s = S.size();
  bool a , b , c = true;
  reverse(S.begin(),S.end();
  
  if(S!=T)) a = false;
  string s1 = S.substr(0,(s-1)/2-1);
  string t1 = s1;
  reverse(s1.begin(),s1.end());
  if(s1!=t1) b = false;
  string s2 = S.substr((s+1)/2,s-1);
  string t2 = s2;
  reverse(s2.begin(),s2.end());
  if(s2!=t2) c = false;
  
  if(a&&b&&c) cout << "Yes" << endl;
  else cout << "No" << endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:28: error: expected ')' before ';' token
   10 |   reverse(S.begin(),S.end();
      |          ~                 ^
      |                            )
a.cc:12:11: error: expected primary-expression before ')' token
   12 |   if(S!=T)) a = false;
      |           ^
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 x = S.substring(0,N/2);
      	 String y = S.substring(N/2+1,N);
        if(x.equals(y)){
        System.out.println("Yes");}
      	else{
        System.out.println("No");}
	}
}
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 x = S.substring(0,N/2);
      	 String y = S.substring(N/2+1,N-1);
        if(x.equals(y)){
        System.out.println("Yes");}
      	else{
        System.out.println("No");}
	}
}
提出情報

Compiler output:
Main.java:16: error: class, interface, enum, or record expected
import java.util.*;
^
Main.java:31: error: reached end of file while parsing
????
^
2 errors
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 x = s.substring(0,N/2);
      	 String y = s.substring(N/2+1,N);
        if(x.equals(y)){
        System.out.println("Yes");}
      	else{
        System.out.println("No");}
	}
}

Compiler output:
Main.java:8: error: cannot find symbol
         String x = s.substring(0,N/2);
                    ^
  symbol:   variable s
  location: class Main
Main.java:9: error: cannot find symbol
      	 String y = s.substring(N/2+1,N);
      	            ^
  symbol:   variable s
  location: class Main
2 errors
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();
         x = s.substring(0,N/2);
      	 y = s.substring(N/2+1,N);
        if(x.equals(y)){
        System.out.println("Yes");}
      	else{
        System.out.println("No");}
	}
}

Compiler output:
Main.java:8: error: cannot find symbol
         x = s.substring(0,N/2);
         ^
  symbol:   variable x
  location: class Main
Main.java:8: error: cannot find symbol
         x = s.substring(0,N/2);
             ^
  symbol:   variable s
  location: class Main
Main.java:9: error: cannot find symbol
      	 y = s.substring(N/2+1,N);
      	 ^
  symbol:   variable y
  location: class Main
Main.java:9: error: cannot find symbol
      	 y = s.substring(N/2+1,N);
      	     ^
  symbol:   variable s
  location: class Main
Main.java:10: error: cannot find symbol
        if(x.equals(y)){
                    ^
  symbol:   variable y
  location: class Main
Main.java:10: error: cannot find symbol
        if(x.equals(y)){
           ^
  symbol:   variable x
  location: class Main
6 errors
Language: Java

//Atcoder160A 配列の比較
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;
      for(int i=0;i<(N-1)/2;i++)
        if(S.charAt(i) == S.charAt(N-1-i)&&S.charAt(i) == S.charAt((N-1)/2-1-i)&&S.charAt(N-i) == S.charAt((N-1)/2+1+i)){
        System.out.println("Yes");}
      	else{
        System.out.println("No");}}
	}
}


Compiler output:
Main.java:15: error: class, interface, enum, or record expected
}
^
1 error
Language: C++

#include <iostream>
#include <bits/stdc++.h>
#include <iomanip>
#include<math.h>
using namespace std;
#define ll long long int
#define ull unsigned long long int
int  main(){
  ios_base::sync_with_stdio(0);
  	cin.tie(0);
  	cout.tie(0);
  string s;
  int i,flag=0;
  for(i=0;i<s.size();i++){
    if(s[i]!=s[n-i-1]){
      	flag=1;
      break;}
  }
  if(flag)
    cout<<"No"<<endl;
  else
    cout<<"Yes"<<endl;
}

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

int main()
{
    string M;
    cin >> M;
    int N=M.size();
    bool A=true;
    for(int i=0; i<N; i++)
    {
        if(!(M.at(i)==M.at(N-1-i)))
        {
            A=false;
        }
        if(i==(N-1-i))
        {
            break;
        }
    }
        for(int i=0; i<N; i++)
    {
        if(!(M.at(i)==M.at(((N-1)/2)-1-i)))
        {
            A=false;
        }
        if(i==(((N-1)/2)-1-i))
        {
            break;
        }
    }

    for(int i=0; i<N; i++)
    {
        if(!(M.at(((N+3)/2)-1+i)==M.at((N-1)-i)))
        {
            A=false;
        }
        if((((N+3)/2)-1+i)==((N-1)-i))
        {
            break;
        }
    }

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

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'string' was not declared in this scope
    3 |     string M;
      |     ^~~~~~
a.cc:4:5: error: 'cin' was not declared in this scope
    4 |     cin >> M;
      |     ^~~
a.cc:4:12: error: 'M' was not declared in this scope
    4 |     cin >> M;
      |            ^
a.cc:44:9: error: 'cout' was not declared in this scope
   44 |         cout << "Yes" <<endl;
      |         ^~~~
a.cc:44:25: error: 'endl' was not declared in this scope
   44 |         cout << "Yes" <<endl;
      |                         ^~~~
a.cc:48:9: error: 'cout' was not declared in this scope
   48 |         cout << "No" <<endl;
      |         ^~~~
a.cc:48:24: error: 'endl' was not declared in this scope
   48 |         cout << "No" <<endl;
      |                        ^~~~
Language: C

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

int main(void)
{
        int n,i;
        char s[100];

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

        if(n%2==0) return 1;

        fl=0;
        for(i=0;i<n/2;i++){
                if(s[i]!=s[n-i-1]){
                       printf("No\n");
                       return 0;
                }
                else if(s[i]!=s[n/2+i+1]){
                        printf("No\n");
                        return 0;
                }
        }
        printf("Yes\n");
        return 0;
}


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

#include <iostream>
#include <string>

using namespace std;

int main() {
    string s;
    cin >> s;
    string rs = s;
    reverse(rs.begin(), rs.end());
    if (s != rs) {
        cout << "No" << endl;
        return 0;
    }
    string s1 = s.substr(0, (s.size() - 1) / 2);
    string rs1 = s1;
    reverse(rs1.begin(), rs1.end());
    if (s1 != rs1) {
        cout << "No" << endl;
        return 0;
    }
    string s2 = s.substr(0, (s.size() - 1) / 2);
    string rs2 = s2;
    reverse(rs2.begin(), rs2.end());
    if (s2 != rs2) {
        cout << "No" << endl;
        return 0;
    }
    cout << "Yes" << endl;

    return 0;
}

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

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

int main(void){
   char s[100];
   scanf("%s",s);
   int n = strlen(s);
   for(i=0;i<n/2;i++){
      if(s[i]!=s[n/2+i+1]){
        printf("No\n");
        return 0;
      }
      else if(s[i]!=s[n-i-1]){
             printf("No\n");
             return 0;
      }
   }
   printf("Yes\n");
   return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:8: error: 'i' undeclared (first use in this function)
    8 |    for(i=0;i<n/2;i++){
      |        ^
main.c:8:8: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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


using namespace std;
int main()
{   int i,n,l,m;

    char s[500];
    gets(s);
    l=strlen(s);
    m=((l-1)/2);
    n=((l+3)/2);
    for(i=0;i<l;i++)
    { if(s[i]==s[i-m-1] && s[i]==s[i-n-1])
    {


        printf("YES");
        return 0;
    }

    }
    printf("NO");
    return 0;

}



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

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


using namespace std;
int main()
{   int i,n,l,m;

    char s[500];
    gets(s);
    l=strlen(s);
    m=((l-1)/2);
    n=((l+3)/2);
    for(i=0;i<l;i++)
    { if(s[i]==s[i-m-1] && s[i]==s[i-n-1])
    {


        printf("YES");
        return 0;
    }

    }
    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++

#include<iostream>
#include<vector>

using namespace std;

int main() {
	string s,tests;
	int i, j;
	vector<char>s1,s2,test1, test2;
	cin>>s;
	for (i = 0;i < (s.length() - 1) / 2;i++)s1.emplace_back(s[i]);
	for (j = 0;j < (s.length()) / 2;j++)s2.emplace_back(s[j]);
	tests = s;
	test1 = s1;
	test2 = s2;
	reverse(s.rbegin(), s.rend());
	reverse(s1.rbegin(),s1.rend());
	reverse(s2.rbegin(),s2.rend());
	if (s1 == test1 && test2 == s2 && s == tests)puts("Yes");
	else puts("No");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:9: error: 'reverse' was not declared in this scope
   16 |         reverse(s.rbegin(), s.rend());
      |         ^~~~~~~
Language: C++

#include<iostream>
#include<vector>

using namespace std;

int main() {
	string s,tests;
	int i, j;
	vector<char>s1,s2,test1, test2;
	cin>>s;
	for (i = 0;i < (s.length() - 1) / 2;i++)s1.emplace_back(s[i]);
	for (j = 0;j < (s.length() + 3) / 2;j++)s2.emplace_back(s[j]);
	tests = s;
	test1 = s1;
	test2 = s2;
	reverse(s.begin(), s.end());
	reverse(s1.begin(),s1.end());
	reverse(s2.begin(),s2.end());
	if (s1 == test1 && test2 == s2 && s == tests)puts("Yes");
	else puts("No");
	return 0;
}


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

#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
typedef long long ll;

int main(){
    string s;
    cin >> s;
    ll n = s.length();
    bool judge = true;
    ll count = 0;
    if(n == 3){
        if(s[0] == s[2]){
            cout << "Yes" << endl;
        }
        else{
            cout << "No" << endl;
        }
    }
    else{
    for(ll i = 0; i < (n-1)/4; i++){
    if(s[i] == s[(n-1)/2-1-i] && s[i] == s[(n-1)/2 + i] && s[i] == s[n-1-i]){
        count++;
    }
    if(count == (n-1)/4){
        cout << "Yes" << endl;
    }
    else{
        cout << "No" << endl;
    }
    }
}

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

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



Compiler output:
a.cc: In function 'int main()':
a.cc:17:20: 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 '()' ?)
   17 |     for (int i = S.size-1; i > S.size()/4; i--) {
      |                  ~~^~~~
      |                        ()
Language: C++

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

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

int main() {
  string s;
  cin >> s;
  bool ans=true;
  if(!isPalindorome(s)) ans=false;
  if(!isPalindorome(s.substr(0,s.size()/2))) ans=false;
  puts(ans?"Yes":"No");
  return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:14:7: error: 'isPalindorome' was not declared in this scope; did you mean 'isPalindrome'?
   14 |   if(!isPalindorome(s)) ans=false;
      |       ^~~~~~~~~~~~~
      |       isPalindrome
a.cc:15:7: error: 'isPalindorome' was not declared in this scope; did you mean 'isPalindrome'?
   15 |   if(!isPalindorome(s.substr(0,s.size()/2))) ans=false;
      |       ^~~~~~~~~~~~~
      |       isPalindrome