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

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define lvector vector<ll>
#define cvector vector<char>
#define svector vector<string>
#define lque queue<ll>
#define lpque priority_queue<ll>
#define dlpque priority_queue<ll,lvector,greater<ll>>
#define P pair<ll,ll>
#define ALL(a) a.begin(),a.end()
#define RALL(a) a.rbegin(),a.rend()
#define rep(i,n) for(ll i=0; i<n; ++i)
#define print(a) cout << (a) << endl

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  string s;cin>>s;
  ll l=s.length(),ans=0;
  rep(i,l/2) if(s[i]!=s[n-1-i]) ans++;
  print(ans);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:25: error: 'n' was not declared in this scope
   21 |   rep(i,l/2) if(s[i]!=s[n-1-i]) ans++;
      |                         ^
Language: C++

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

char s[101];
int main(void) {
  scanf("%s", s);
  int res = 0;
  int n = strlen(s);
  for (int i = 0; i < n; i++) {
    if (s[i] != s[n - 1 - i]) res++;
  }
  printf("%d\n", 

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: expected primary-expression at end of input
   12 |   printf("%d\n",
      |                 ^
a.cc:12:17: error: expected '}' at end of input
a.cc:5:16: note: to match this '{'
    5 | int main(void) {
      |                ^
Language: C++

s = input()
t = s[::-1]
h = len(s) // 2
s = s[: h]
t = t[: h]
ans = 0
for i in range(len(s)):
  if s[i] != t[i]:
    ans += 1
print(ans)

Compiler output:
a.cc:1:1: error: 's' does not name a type
    1 | s = input()
      | ^
Language: C++

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

int main(){
  int n=0;
  string s;
  cin>>s;
  for(int i=0;i<s.size();i++){
    if(s[i]==s[s.size()-1-i]{
      n++;
    }
  }
  cout<<n<<endl;
}
    
    
    

Compiler output:
a.cc: In function 'int main()':
a.cc:9:29: error: expected ')' before '{' token
    9 |     if(s[i]==s[s.size()-1-i]{
      |       ~                     ^
      |                             )
a.cc:12:3: error: expected primary-expression before '}' token
   12 |   }
      |   ^
Language: Java

import java.util.*;
import java.io.*;
 
public class Main {
    public static void main (final String[] args) {
        final Scanner sc = new Scanner(System.in);
        String str = sc.next();
      	int count = 0;
      	for (int i = 0; i < str.length()/2; i++) {
          if (str.charAt(i) != str.charAt(str.length() - i - 1) count++;
        }
        System.out.println(count);
    }
}

Compiler output:
Main.java:10: error: ')' expected
          if (str.charAt(i) != str.charAt(str.length() - i - 1) count++;
                                                               ^
1 error
Language: C++

#include <iostream>
using namespace std;

int main(){
	char s[100];
  	cin>>s;
  
  	int l=0;
  	for(int i=0;i<100;i++){
    	if(s[i]=="\0"){
          	l=i-1;
        	break;
        }
    }
  	
  	int cnt=0;
  	for(int i=0;i<(l+1)/2;i++){
    	if(s[i]==s[l-i]){
        	cnt++;
        }
    }
  	
  	cout<<cnt<<endl;
    return 0;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |         if(s[i]=="\0"){
      |            ~~~~^~~~~~
Language: C++

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

int main(){
  string s;
  int r;
  int n=s.sizeof();
  int l=floor((s.size())/2);
  for(int i;i<l;i++){
    if(s[i]!=s[n-i-1]){
      r++;
    }
  }
  cout << r;
  return 0;
}
      
      
    
  
  


Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: expected unqualified-id before 'sizeof'
    8 |   int n=s.sizeof();
      |           ^~~~~~
Language: C++

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

int main(){
  string s;
  int r;
  int n=s.sizeof();
  int l=floor((s.sizeof())/2);
  for(int i;i<l;i++){
    if(s[i]!=s[n-i-1]){
      r++;
    }
  }
  cout << r;
  return 0;
}
      
      
    
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: expected unqualified-id before 'sizeof'
    8 |   int n=s.sizeof();
      |           ^~~~~~
a.cc:9:18: error: expected unqualified-id before 'sizeof'
    9 |   int l=floor((s.sizeof())/2);
      |                  ^~~~~~
a.cc:9:18: error: expected ')' before 'sizeof'
    9 |   int l=floor((s.sizeof())/2);
      |               ~  ^~~~~~
      |                  )
Language: C++

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

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

    n=strlen(s);

    for(i=0, j=n-1; i<(n/2); i++, j--)
    {
        if(s[i]==s[j]) continue;
        else cnt++;
    }

    cout << cnt << endl;

    return 0;
}


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

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

int main(){
  string s;
  cin >> s;
  int n=s.size();
  int c=0;
  
  for(int i=0;i<n/2;i++){
    if(s.at(i)!=s.at(n-1-i){
      c++;
    }
       }
       cout<< c << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:28: error: expected ')' before '{' token
   11 |     if(s.at(i)!=s.at(n-1-i){
      |       ~                    ^
      |                            )
a.cc:14:8: error: expected primary-expression before '}' token
   14 |        }
      |        ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main() {
  string S;
  cin >> S;
  
  int ans = 0;
  for (int i = 0; i < S.size() / 2; i++) {
    if (S.at(i) != S.at(S.size() - i -1)) {
      ans++;
    }
  }
  
  cout << ans << endl;

  }
}

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

#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef vector<ll> vl ;
typedef vector<int> vi;
typedef pair<int, int> pi;
typedef pair<ll,ll> pl;

#define rep(i,N) for(int i=0; i < (int)N; i++)
#define all(v) (v).begin(),(v).end()

const int INF = 1001001001;

int main(){
	string s; cin >> s;
	int ans = 0;
	rep(int i=0; i<(s.size()/2); i++){
		if(s[i]!=s[n-1-i]) ans ++;
	}
	cout <<ans;
}

Compiler output:
a.cc:18:41: error: macro "rep" requires 2 arguments, but only 1 given
   18 |         rep(int i=0; i<(s.size()/2); i++){
      |                                         ^
a.cc:10:9: note: macro "rep" defined here
   10 | #define rep(i,N) for(int i=0; i < (int)N; i++)
      |         ^~~
a.cc: In function 'int main()':
a.cc:18:9: error: 'rep' was not declared in this scope
   18 |         rep(int i=0; i<(s.size()/2); i++){
      |         ^~~
Language: C

#include<stdio.h>
#include<string.h>
int main (void){
  char s[101];
  scanf("%s", s);
  int r = 0;
  int i;
  int n = strlen(s);
  for(i=0; i<n; i++){
    if (s[i] != s[n-1-i]){
      r++;
    }
  }
  printf("%d\n", res/2);
}


Compiler output:
main.c: In function 'main':
main.c:14:18: error: 'res' undeclared (first use in this function)
   14 |   printf("%d\n", res/2);
      |                  ^~~
main.c:14:18: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include<string.h>
int main (void){
  char s[101];
  scanf("%s", s);
  int r = 0;
  int i;
  int n = strlen(s);
  for(i=0; i<n; i++){
    if (s[i] != s[n-1-i]){
      res++;
    }
  }
  printf("%d\n", res/2);
}


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

#include<stdio.h>
#include<string.h>
int main (void){
  char s[101];
  scanf("%s", s);
  int r = 0;
  int n = strlen(s);
  for(i=0; i<n; i++){
    if (s[i] != s[n-1-i]){
      res++;
    }
  }
  printf("%d\n", res/2);
}

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

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

int main(){
  string S;
  cin >> S;
  int count = 0;
  
  for (int i = 0; i < S.size() / 2; i++){
    
    if (S.at(i) != S.at(S.size() - 1 - i){
      count++;
    }
  }
        
  cout << count << endl;
}
   

Compiler output:
a.cc: In function 'int main()':
a.cc:11:42: error: expected ')' before '{' token
   11 |     if (S.at(i) != S.at(S.size() - 1 - i){
      |        ~                                 ^
      |                                          )
a.cc:14:3: error: expected primary-expression before '}' token
   14 |   }
      |   ^
Language: C++

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

int main(){
  string S;
  cin >> S;
  int count = 0;
  
  for (int i = 0; i < S.size() / 2; i++){
    
    if (S.at(i) != S.at(S.size() - 1 - 2){
      count++;
    }
  }
        }      
 


Compiler output:
a.cc: In function 'int main()':
a.cc:11:42: error: expected ')' before '{' token
   11 |     if (S.at(i) != S.at(S.size() - 1 - 2){
      |        ~                                 ^
      |                                          )
a.cc:14:3: error: expected primary-expression before '}' token
   14 |   }
      |   ^
Language: C++

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

int main(){
  string S;
  cin >> S;
  int count = 0;
  
  for (int i = 0; i < S.size() / 2; i++){
    
    if (S.at(i) != S.at(S.size - 1 - 2){
      count++;
    }
  }
}
  
 


Compiler output:
a.cc: In function 'int main()':
a.cc:11:27: 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 '()' ?)
   11 |     if (S.at(i) != S.at(S.size - 1 - 2){
      |                         ~~^~~~
      |                               ()
a.cc:11:40: error: expected ')' before '{' token
   11 |     if (S.at(i) != S.at(S.size - 1 - 2){
      |        ~                               ^
      |                                        )
a.cc:14:3: error: expected primary-expression before '}' token
   14 |   }
      |   ^
Language: C++

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

int main(){
  string S;
  cin >> S;
  int count = 0;
  
  for (int i = 0; i < S.size() / 2; i++){
    
    if (S.at(i) != S.at(S.size() - 1 - 2){
      count++;
    }
  }
        
  cout << count << endl;
}
  
  


Compiler output:
a.cc: In function 'int main()':
a.cc:11:42: error: expected ')' before '{' token
   11 |     if (S.at(i) != S.at(S.size() - 1 - 2){
      |        ~                                 ^
      |                                          )
a.cc:14:3: error: expected primary-expression before '}' token
   14 |   }
      |   ^
Language: C++

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

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


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

#include<bits/stdc++.h>
using namespace std;
#define  ft  ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define  ll  long long
#define  pi  pair<int,int>
#define  pb  push_back
#define  F   first
#define  S   second
const int N=2e5+3;
int main()
{
    ft
    ll t,i,j,n,m,l=0,r;
    cin>>s;
    n=s.size();
    for(i=0,j=n-1;i<j;i++,j--)
    {
        if(s[i]!=s[j])
        {
            l++;
        }
    }
    cout<<l<<"\n";
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:14:10: error: 's' was not declared in this scope
   14 |     cin>>s;
      |          ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string s;
  int count=0;
  cin>>s;
  for(int i=0;i<n/2;i++){
    if(s[i]!=s[n-1-i]){
      s[i]=s[n-1-i];
      count++;
    }
  }
    else{
      continue;
    }
 }
  cout<<count;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: 'n' was not declared in this scope
    7 |   for(int i=0;i<n/2;i++){
      |                 ^
a.cc:13:5: error: 'else' without a previous 'if'
   13 |     else{
      |     ^~~~
a.cc:14:7: error: continue statement not within a loop
   14 |       continue;
      |       ^~~~~~~~
a.cc: At global scope:
a.cc:17:3: error: 'cout' does not name a type
   17 |   cout<<count;
      |   ^~~~
a.cc:18:3: error: expected unqualified-id before 'return'
   18 |   return 0;
      |   ^~~~~~
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string s;
  int count=0;
  cin>>s;
  for(int i=0;i<=n/2;i++){
    if(s[i]!=s[n-1-i]{
      s[i]=s[n-1-i];
      count++;
    }
  }
    else{
      continue;
    }
 }
  cout<<count;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: 'n' was not declared in this scope
    7 |   for(int i=0;i<=n/2;i++){
      |                  ^
a.cc:8:22: error: expected ')' before '{' token
    8 |     if(s[i]!=s[n-1-i]{
      |       ~              ^
      |                      )
a.cc:12:3: error: expected primary-expression before '}' token
   12 |   }
      |   ^
a.cc:13:5: error: 'else' without a previous 'if'
   13 |     else{
      |     ^~~~
a.cc:14:7: error: continue statement not within a loop
   14 |       continue;
      |       ^~~~~~~~
a.cc: At global scope:
a.cc:17:3: error: 'cout' does not name a type
   17 |   cout<<count;
      |   ^~~~
a.cc:18:3: error: expected unqualified-id before 'return'
   18 |   return 0;
      |   ^~~~~~
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
Language: Java

import java.util.*;

class Main
{
    public static  void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        
        String s = sc.next();
        count = 0;
        
        
            for (int i = 0; i < s.length() / 2; i++)  {
                for (int h = s.length() - 1; h > s.length() / 2; i++) {
                    String check1 = s.substring(i, i + 1);
                    String check2 = s.substring(i, i + 1);
                    
                    if (!check1.equals(check2)) {
                        count++;
                    }
                }
            }
        
        System.out.println(count);
        
    }
}
        

Compiler output:
Main.java:10: error: cannot find symbol
        count = 0;
        ^
  symbol:   variable count
  location: class Main
Main.java:19: error: cannot find symbol
                        count++;
                        ^
  symbol:   variable count
  location: class Main
Main.java:24: error: cannot find symbol
        System.out.println(count);
                           ^
  symbol:   variable count
  location: class Main
3 errors
Language: C++

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

int main(){
  string s;
  cin >> s;
  long ans=0;
  for(int i=0;i>=j;i++){
  	for(int j=s.size()-1;j<=i;j--){
      if(s[i]!=s[j])ans++;
    }
  }
  cout << ans;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: 'j' was not declared in this scope
    8 |   for(int i=0;i>=j;i++){
      |                  ^
Language: C++

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

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

s = input()
s_reverse = s[::-1]
if len(s) %2 ==0:
    n=len(s)//2
else:
    n = len(s)//2 +1

ans = 0
for i in range(n):
    if s[i] != s_reverse[i]:
        ans+=1
print(ans)

Compiler output:
a.cc:1:1: error: 's' does not name a type
    1 | s = input()
      | ^
Language: C++

S = input()
if len(S)%2 == 0:
  SL = S[0:len(S)//2]
  SR = S[len(S)//2:]
  SR = SR[::-1]
else:
  SL = S[0:len(S)//2+1]
  SR = S[len(S)//2:]
  SR = SR[::-1]
ans = 0
for i in range(len(SR)):
  if SL[i] != SR[i]:
    ans += 1
print(ans)


Compiler output:
a.cc:1:1: error: 'S' does not name a type
    1 | S = input()
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
typedef long long ll;
#define _GLIBCXX_DEBUG
typedef vector<int> vec;
typedef vector<ll> lvec;
typedef vector<char>cvec;
typedef pair<ll, ll> LP;
typedef tuple<ll, ll, ll> LT;
typedef pair<int, int> P;
typedef tuple<int, int, int> T;
int main()	{
  string s,t;
  cin>>s;
  t=s;
  reverse(all(s));
  int cnt=0;
  rep(i,n){
    if(s[i]!=t[i])
      cnt++;
  }
  cout<<cnt/2<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:9: error: 'n' was not declared in this scope
   21 |   rep(i,n){
      |         ^
a.cc:3:38: note: in definition of macro 'rep'
    3 | #define rep(i,n) for(int i=0;i<(int)(n);i++)
      |                                      ^
Language: C++

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

int main() {
	string s;
	cin>>s;
	int n=s.length();
	
	int count=0;
	for(i=0;i<=n/2-1;i++){
		if(s[i]!=[n-1-i])count++;
	}
	
	cout<<count<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: 'i' was not declared in this scope
   12 |         for(i=0;i<=n/2-1;i++){
      |             ^
a.cc:13:28: error: expected ',' before '-' token
   13 |                 if(s[i]!=[n-1-i])count++;
      |                            ^
      |                            ,
a.cc:13:28: error: expected identifier before '-' token
a.cc: In lambda function:
a.cc:13:33: error: expected '{' before ')' token
   13 |                 if(s[i]!=[n-1-i])count++;
      |                                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
typedef long long ll;
#define _GLIBCXX_DEBUG
typedef vector<int> vec;
typedef vector<ll> lvec;
typedef vector<char>cvec;
typedef pair<ll, ll> LP;
typedef tuple<ll, ll, ll> LT;
typedef pair<int, int> P;
typedef tuple<int, int, int> T;
int main()	{
  string s;
  int cnt=0;
  cin>>s;
  int =s.size();
  rep(i,n){
    if(s[i]!sv[n-1-i])
      cnt++;
  }
  cout<<cnt<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:7: error: expected unqualified-id before '=' token
   19 |   int =s.size();
      |       ^
a.cc:20:9: error: 'n' was not declared in this scope
   20 |   rep(i,n){
      |         ^
a.cc:3:38: note: in definition of macro 'rep'
    3 | #define rep(i,n) for(int i=0;i<(int)(n);i++)
      |                                      ^
a.cc:21:12: error: expected ')' before '!' token
   21 |     if(s[i]!sv[n-1-i])
      |       ~    ^
      |            )
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
typedef long long ll;
#define _GLIBCXX_DEBUG
typedef vector<int> vec;
typedef vector<ll> lvec;
typedef vector<char>cvec;
typedef pair<ll, ll> LP;
typedef tuple<ll, ll, ll> LT;
typedef pair<int, int> P;
typedef tuple<int, int, int> T;
int main()	{
  string s;
  int cnt=0;
  cin>>s;
  int =s.size();
  rep(i,n){
    if(t[i]!=v[n-1-i])
      cnt++;
  }
  cout<<cnt<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:7: error: expected unqualified-id before '=' token
   19 |   int =s.size();
      |       ^
a.cc:20:9: error: 'n' was not declared in this scope
   20 |   rep(i,n){
      |         ^
a.cc:3:38: note: in definition of macro 'rep'
    3 | #define rep(i,n) for(int i=0;i<(int)(n);i++)
      |                                      ^
a.cc:21:8: error: 't' was not declared in this scope
   21 |     if(t[i]!=v[n-1-i])
      |        ^
a.cc:21:14: error: 'v' was not declared in this scope
   21 |     if(t[i]!=v[n-1-i])
      |              ^
Language: C++

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

int main(){
  int S;
  int number=0;
  cin>>S;
  
 
  
 
  
  for(int i=0;i<S;i++){
    if(S[i]!=S[S-1-i]){
      number++;
    }
    cout<<number<<endl;
  }
}

    


Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: invalid types 'int[int]' for array subscript
   14 |     if(S[i]!=S[S-1-i]){
      |         ^
a.cc:14:15: error: invalid types 'int[int]' for array subscript
   14 |     if(S[i]!=S[S-1-i]){
      |               ^
Language: C++

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

int main(){
  int S;
  int number=0;
  cin>>S;
  
 
  
  for(int i=0;i<S;i++){
   
    cin>>A.at(i);
  }
  for(int i=0;i<S;i++){
    if(A.at(i)!=A.at(S-1-i)){
      number++;
    }
    cout<<number<<endl;
  }
}

    


Compiler output:
a.cc: In function 'int main()':
a.cc:13:10: error: 'A' was not declared in this scope
   13 |     cin>>A.at(i);
      |          ^
a.cc:16:8: error: 'A' was not declared in this scope
   16 |     if(A.at(i)!=A.at(S-1-i)){
      |        ^
Language: C++

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

int main(){
  int S;
  cin>>S;
  
  vector<int>A(S);
  
  for(int i=0;i<S;i++){
    int number=0;
    cin>>A.at(i);
  }
  for(int i=0;i<S;i++){
    if(A.at(i)!=A.at(S-i)){
      number++;
    }
    cout<<number<<endl;
  }
}

    


Compiler output:
a.cc: In function 'int main()':
a.cc:16:7: error: 'number' was not declared in this scope
   16 |       number++;
      |       ^~~~~~
a.cc:18:11: error: 'number' was not declared in this scope
   18 |     cout<<number<<endl;
      |           ^~~~~~
Language: C++

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

int main(){
  int S;
  cin>>S;
  
  vector<int>A(S);
  
  for(int i=0;i<S;i++){
    int number=0;
    cin>>A.at(i);
  }
  if(A.at(i)!=A.at(S-1)){
    number++;
  }
  cout<<number<<endl;
}

    


Compiler output:
a.cc: In function 'int main()':
a.cc:14:11: error: 'i' was not declared in this scope
   14 |   if(A.at(i)!=A.at(S-1)){
      |           ^
a.cc:15:5: error: 'number' was not declared in this scope
   15 |     number++;
      |     ^~~~~~
a.cc:17:9: error: 'number' was not declared in this scope
   17 |   cout<<number<<endl;
      |         ^~~~~~
Language: C

#include<stdio.h>
int main(void){
  char str[100];
  scanf("%s",str);
  int l=strlen(str),i,j;
  for(i=0;i<l/2;i++){
    if(str[i]!=str[l-(1+i)]){
      cnt++;
    }
  }
  printf("%d",cnt);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
    5 |   int l=strlen(str),i,j;
      |         ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen'
    1 | #include<stdio.h>
  +++ |+#include <string.h>
    2 | int main(void){
main.c:5:9: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
    5 |   int l=strlen(str),i,j;
      |         ^~~~~~
main.c:5:9: note: include '<string.h>' or provide a declaration of 'strlen'
main.c:8:7: error: 'cnt' undeclared (first use in this function); did you mean 'int'?
    8 |       cnt++;
      |       ^~~
      |       int
main.c:8:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

int main(){
  string s;
  cin>>s;
  int N;
  N=s.size();
  int S=0;
  if(N%2==0){
    for(int i=0;i<N/2;i++){
      if(s.at(i)!=s.at(i+N/2){
        S++;
      }
    }
  }
  else{
    for(int i=0;i<N/2;i++){
      if(s.at(i)!=s.at(i+N/2+1)){
        S++;
      }
    }
  }
  cout<<S<<endl;      

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:30: error: expected ')' before '{' token
   13 |       if(s.at(i)!=s.at(i+N/2){
      |         ~                    ^
      |                              )
a.cc:16:5: error: expected primary-expression before '}' token
   16 |     }
      |     ^
Language: C++

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

int main(){
  string s;
  cin>>s;
  int N;
  N=s.size();
  int S=0;
  if(N%2==0){
    for(int i=0;i<N/2;i++){
      if(s.at(i)!=s.at(i+N/2){
        S++;
      }
    }
  }
  else{
    for(int i=0;i<N/2;i++){
      if(s.at(i)!=s.at(i+N/2+1){
        S++;
      }
    }
  }
  cout<<S<<endl;      

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:30: error: expected ')' before '{' token
   13 |       if(s.at(i)!=s.at(i+N/2){
      |         ~                    ^
      |                              )
a.cc:16:5: error: expected primary-expression before '}' token
   16 |     }
      |     ^
a.cc:20:32: error: expected ')' before '{' token
   20 |       if(s.at(i)!=s.at(i+N/2+1){
      |         ~                      ^
      |                                )
a.cc:23:5: error: expected primary-expression before '}' token
   23 |     }
      |     ^
Language: C++

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

int main(){
  string S;
  cin>>S;
  int N;
  N=s.size();
  int s=0;
  if(N%2==0){
    for(int i=0;i<N/2;i++){
      if(s.at(i)!=s.at(i+N/2){
        s++;
      }
    }
  }
  else{
    for(int i=0;i<N/2;i++){
      if(s.at(i)!=s.at(i+N/2+1){
        s++;
      }
    }
  }
  cout<<s<<endl;      

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 's' was not declared in this scope
    9 |   N=s.size();
      |     ^
a.cc:13:30: error: expected ')' before '{' token
   13 |       if(s.at(i)!=s.at(i+N/2){
      |         ~                    ^
      |                              )
a.cc:16:5: error: expected primary-expression before '}' token
   16 |     }
      |     ^
a.cc:20:32: error: expected ')' before '{' token
   20 |       if(s.at(i)!=s.at(i+N/2+1){
      |         ~                      ^
      |                                )
a.cc:23:5: error: expected primary-expression before '}' token
   23 |     }
      |     ^
Language: C++

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

int main(){
  string s;
  cin>>s;
  int N;
  N=s.size();
  int s=0;
  if(N%2==0){
    for(int i=0;i<N/2;i++){
      if(s.at(i)!=s.at(i+N/2){
        s++;
      }
    }
  }
  else{
    for(int i=0;i<N/2;i++){
      if(s.at(i)!=s.at(i+N/2+1){
        s++;
      }
    }
  }
  cout<<s<<endl;      

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: conflicting declaration 'int s'
   10 |   int s=0;
      |       ^
a.cc:6:10: note: previous declaration as 'std::string s'
    6 |   string s;
      |          ^
a.cc:13:30: error: expected ')' before '{' token
   13 |       if(s.at(i)!=s.at(i+N/2){
      |         ~                    ^
      |                              )
a.cc:16:5: error: expected primary-expression before '}' token
   16 |     }
      |     ^
a.cc:20:32: error: expected ')' before '{' token
   20 |       if(s.at(i)!=s.at(i+N/2+1){
      |         ~                      ^
      |                                )
a.cc:23:5: error: expected primary-expression before '}' token
   23 |     }
      |     ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
char string[100];
  cin>>S;
  int n=S.size();
  int count=0;
  for(int i=0;i<n;i++){
  if(S[i]!=S[n-1-i]){
  count++;
  }
  
  }
  cout<<count/2<<endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: 'S' was not declared in this scope
    5 |   cin>>S;
      |        ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
char S[100];
  cin>>S;
  int n=S.size();
  int count=0;
  for(int i=0;i<n;i++){
  if(S[i]!=S[n-1-i]){
  count++;
  }
  
  }
  cout<<count/2<<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: request for member 'size' in 'S', which is of non-class type 'char [100]'
    6 |   int n=S.size();
      |           ^~~~
Language: C++

import math

s = input()

firstHalf = s[:math.floor(len(s) / 2)]
reversedSecondHalf = s[math.ceil(len(s) / 2):][::-1]

ans = 0
for i in range(len(firstHalf)):
    if (firstHalf[i] != reversedSecondHalf[i]):
        ans += 1

print(ans)


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import math
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string s;
  cin >> s;
  int f=0;
  for(int i=0;i<strlen(s)/2;i++){
    if(s[i]!=s[strlen(s)-i-1])f++;
  }
  cout << f;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:24: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
    7 |   for(int i=0;i<strlen(s)/2;i++){
      |                        ^
      |                        |
      |                        std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
a.cc:8:23: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
    8 |     if(s[i]!=s[strlen(s)-i-1])f++;
      |                       ^
      |                       |
      |                       std::string {aka std::__cxx11::basic_string<char>}
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string s;
  cin >> s;
  int f=0;
  for(int i=0;i<strlen(s)/2;i++){
    if(s[i]!=s[n-i-1])f++;
  }
  cout << f;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:24: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
    7 |   for(int i=0;i<strlen(s)/2;i++){
      |                        ^
      |                        |
      |                        std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
a.cc:8:16: error: 'n' was not declared in this scope
    8 |     if(s[i]!=s[n-i-1])f++;
      |                ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string s;
  cin >> s;
  int f++;
  for(int i=0;i<strlen(s)/2;i++){
    if(s[i]!=s[n-i-1])f++;
  }
  cout << f;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: expected initializer before '++' token
    6 |   int f++;
      |        ^~
a.cc:7:24: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
    7 |   for(int i=0;i<strlen(s)/2;i++){
      |                        ^
      |                        |
      |                        std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
a.cc:8:16: error: 'n' was not declared in this scope
    8 |     if(s[i]!=s[n-i-1])f++;
      |                ^
a.cc:8:23: error: 'f' was not declared in this scope
    8 |     if(s[i]!=s[n-i-1])f++;
      |                       ^
a.cc:10:11: error: 'f' was not declared in this scope
   10 |   cout << f;
      |           ^
Language: C++

s = input()

ans = 0
cnt = len(s) // 2
for i in range(cnt):
    left = s[i]
    right = s[-(i+1)]
    if left != right:
        ans += 1
    else:
        pass
print(ans)

Compiler output:
a.cc:1:1: error: 's' does not name a type
    1 | s = input()
      | ^
Language: C

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

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

    return 0;
}

Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
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 count = 0;
    int len = S.length / 2;
    
    for (int i = 0; i < len; i++) {
      int a = S.charAt(i);
      int b = S.charAt(len-i-1);
      if (a == b) {
        count++;
      }
    }
    System.out.print(count);
  }
}

Compiler output:
Main.java:8: error: cannot find symbol
    int len = S.length / 2;
               ^
  symbol:   variable length
  location: variable S of type String
1 error
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 count = 0;
    int len = S.length / 2;
    
    for (int i = 0; i < len; i++) {
      String a = S.charAt(i);
      String b = S.charAt(len-i-1);
      if (a == b) {
        count++;
      }
    }
    System.out.print(count);
  }
}

Compiler output:
Main.java:8: error: cannot find symbol
    int len = S.length / 2;
               ^
  symbol:   variable length
  location: variable S of type String
Main.java:11: error: incompatible types: char cannot be converted to String
      String a = S.charAt(i);
                         ^
Main.java:12: error: incompatible types: char cannot be converted to String
      String b = S.charAt(len-i-1);
                         ^
3 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 count = 0;
    
    for (int i = 0; i < S.length/2; i++) {
      String a = S.charat(i);
      String b = S.charat(S.length-i-1);
      if (a == b) {
        count++;
      }
    }
    System.out.print(count);
  }
}

Compiler output:
Main.java:9: error: cannot find symbol
    for (int i = 0; i < S.length/2; i++) {
                         ^
  symbol:   variable length
  location: variable S of type String
Main.java:10: error: cannot find symbol
      String a = S.charat(i);
                  ^
  symbol:   method charat(int)
  location: variable S of type String
Main.java:11: error: cannot find symbol
      String b = S.charat(S.length-i-1);
                           ^
  symbol:   variable length
  location: variable S of type String
3 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 count = 0;
    
    for (int i = 0; int < S.length/2 ;i++) {
      String a = S.charat(i);
      String b = S.charat(S.length-i-1);
      if (a == b) {
        count++;
      }
    }
    System.out.print(count);
  }
}

Compiler output:
Main.java:9: error: '.class' expected
    for (int i = 0; int < S.length/2 ;i++) {
                        ^
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
        ios_base::sync_with_stdio(false);
        char ch[100],str[100],s[100];
        gets(ch);
        strcpy(str,ch);
        int i,j=0,l,c=0;
        l=strlen(ch);
        for(i=l-1;i>=0;i--)
        {
            s[j]=str[i];
            j++;
        }
        for(i=0;i<l;i++)
        {
            if(ch[i]!=s[i])
                c++;
        }
        cout<<c/2<<endl;
    return 0;
}



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

clude <bits/stdc++.h>
using namespace std;
 
int main() {
string S;
  cin >>S;
  int count =0;
  int a = S.size();
  for (int i = 0; i < a; i++) {
 if(S.at(i)!=S.at(a-i-1)){
   count++;
 }
}
cout<<count<<endl;
 
}

Compiler output:
a.cc:1:1: error: 'clude' does not name a type
    1 | clude <bits/stdc++.h>
      | ^~~~~
a.cc: In function 'int main()':
a.cc:5:1: error: 'string' was not declared in this scope
    5 | string S;
      | ^~~~~~
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >>S;
      |   ^~~
a.cc:6:9: error: 'S' was not declared in this scope
    6 |   cin >>S;
      |         ^
a.cc:14:1: error: 'cout' was not declared in this scope; did you mean 'count'?
   14 | cout<<count<<endl;
      | ^~~~
      | count
a.cc:14:14: error: 'endl' was not declared in this scope
   14 | cout<<count<<endl;
      |              ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
string S;
  cin >>S;
  int count =0;
  for (int i = 0; i < n; i++) {
 if(S.at(i!==S.at(S.size()-i)){
   count++;
 }
}
cout<<count<<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:23: error: 'n' was not declared in this scope
    8 |   for (int i = 0; i < n; i++) {
      |                       ^
a.cc:9:13: error: expected primary-expression before '=' token
    9 |  if(S.at(i!==S.at(S.size()-i)){
      |             ^
a.cc:9:31: error: expected ')' before '{' token
    9 |  if(S.at(i!==S.at(S.size()-i)){
      |    ~                          ^
      |                               )
a.cc:12:1: error: expected primary-expression before '}' token
   12 | }
      | ^
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
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[n-1-i]) cnt++;
  }
  cout << cnt << endl;
}
    


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

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

int main(){
  string s;
  cin >> s;
  int cnt=0;
  for(int i=0;i<n/2;i++){
    if(s[i]!=s[n-1-i]) cnt++;
  }
  cout << cnt << endl;
}
    

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

#include <iostream> 
#include <string>
using namespace std;
int main(){
string S;
  cin>>S;
  int N=S.size();
  int counter=0;
  for (int i=0; i<N/2; i++){
    if (S[i]==S[N-1-i]) {counter++}
  }
  cout<<counter<<endl;}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:10:35: error: expected ';' before '}' token
   10 |     if (S[i]==S[N-1-i]) {counter++}
      |                                   ^
      |                                   ;
Language: C++

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

using ll=long long;
const ll MOD=1000000007;

int main() {
  string s;
  cin >> s;
  int k=s.size();
  int cnt=0;
  for(int i=0;i<k;i++){
    if(s[i]!=s[k-1-i]){
      cnt++;
      s[i]=s[k-i-1];
    }
    cout << cnt << endl;
}

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

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


int main() {
    string s;
    cin>>s;
    int ans=0;
    rep(i,s.size()/2)if(s[i]!=s[n-1-i])ans++;
    cout << ans <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:33: error: 'n' was not declared in this scope
   10 |     rep(i,s.size()/2)if(s[i]!=s[n-1-i])ans++;
      |                                 ^
Language: C++

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


int main() {
    string s;
    cin>>s;
    int ans=0;
    rep(i,s.size())if(s[i]!=s[n-1-i])ans++;
    cout << ans <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:31: error: 'n' was not declared in this scope
   10 |     rep(i,s.size())if(s[i]!=s[n-1-i])ans++;
      |                               ^
Language: C

#include <stdio.h>
#include <string.h>
 
 
 
int main(void)
{
    char s[101];
        scanf("%s", &s); 
        int res =0; 
        int n = strlen(s);
  
  for(int i=0;i < int(n/2);i++){
        if(s[i] != s[n-1-i]){
                res++;
        }   
  }
  printf("%d\n", res);
  return 0;
}
#include <stdio.h>
#include <string.h>
 
 
 
int main(void)
{
    char s[101];
        scanf("%s", &s); 
        int res =0; 
        int n = strlen(s);
  
  for(int i=0;i < n;i++){
        if(s[i] != s[n-1-i]){
                res++;
        }   
  }
  printf("%d¥n", res/2);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:13:19: error: expected expression before 'int'
   13 |   for(int i=0;i < int(n/2);i++){
      |                   ^~~
main.c: At top level:
main.c:26:5: error: redefinition of 'main'
   26 | int main(void)
      |     ^~~~
main.c:6:5: note: previous definition of 'main' with type 'int(void)'
    6 | int main(void)
      |     ^~~~
Language: C

#include <stdio.h>
#include <string.h>
 
 
 
int main(void)
{
    char s[101];
        scanf("%s", &s); 
        int res =0; 
        int n = strlen(s);
  
  for(int i=0;i < int(n/2);i++){
        if(s[i] != s[n-1-i]){
                res++;
        }   
  }
  printf("%d\n", res);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:19: error: expected expression before 'int'
   13 |   for(int i=0;i < int(n/2);i++){
      |                   ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> l_l;
typedef pair<int , int> i_i;
typedef vector<ll> vl;
typedef vector<int> vi;
typedef vector<char> vec;
typedef vector<bool> veb;
typedef vector<string> ves;
typedef vector<vector<ll>> vvl;
typedef vector<vector<int>> vvi;
typedef vector<vector<char>> vvec;
typedef vector<vector<bool>> vveb;
typedef vector<vector<string>> vves;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<(int)(n);i++)
#define rep2(i,n) for(int i=2;i<(int)(n);i++)
#define repk(i,k,n) for(int i=k;i<(int)(n);i++)
#define fs first
#define sc second
#define pb push_back
#define pp pop_back
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define maxel(a) *max_element(all(a))
#define minel(a) *min_element(all(a))
#define acc accumulate
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
#define mod (1000000007)
typedef long long int64;
//const int64 INF = 1LL << 58;
#define dame { puts("-1"); return 0;}
#define YES { cout << "YES" << endl; return 0; }
#define NO { cout << "NO" << endl; return 0; }
#define Yes { cout << "Yes" << endl; return 0; }
#define No { cout << "No" << endl; return 0; }
template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; }
int dx[] = {0, 0, -1, 1};
int dy[] = {1, -1, 0, 0};

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);	
  	
  	string s;
  	cin >> s;
  	
  	int n = s.size();
    string rs = s;
  	reverse(all(rs));
  	int x =0;
  	rep(i,n/2){
    	if(i>=rn-1){break;}
      	if(s[i]!=rs[i]) x++;
    }
  	cout << x << endl;
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:58:15: error: 'rn' was not declared in this scope; did you mean 'rs'?
   58 |         if(i>=rn-1){break;}
      |               ^~
      |               rs
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define INF 1e9
#define PI 3.14159265359
#define MOD 1000000007
#define ALL(v) v.begin(),v.end()
#define ALLR(v) b.rbegin(),v.rend()
typedef long long ll;
//isPrime
//modpow modinv
int main() {
  cout << fixed << setprecision(10);
  string s;
  cin >> s;
  int n = s.size();
  int count = 0;
  for(int i=0; i<n/2; i++){
    if(a[i]!=a[n-i]){
      count++;
    }
  }
  cout << count << endl;
}


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

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

int main(){
  string s;
  int p = s.size()
  int ans = 0;
  for(int i=0;i<p/2;i++){
    if(s.at(i) != s.at(p-i)){ans++;}
  }
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: expected ',' or ';' before 'int'
    7 |   int ans = 0;
      |   ^~~
a.cc:9:30: error: 'ans' was not declared in this scope; did you mean 'abs'?
    9 |     if(s.at(i) != s.at(p-i)){ans++;}
      |                              ^~~
      |                              abs
a.cc:11:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: expected ';' before 'ans'
    8 |   N = S.size()
      |               ^
      |               ;
    9 |     ans = 0;
      |     ~~~
Language: Java

import java.util.*;

class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int ans = 0;
        
        for(int i = 0;i < center;i++){
            if(s[i] != s[s.length-1-1])
                ans++;
        }

        System.out.println(ans);
    }
}

Compiler output:
Main.java:9: error: cannot find symbol
        for(int i = 0;i < center;i++){
                          ^
  symbol:   variable center
  location: class Main
1 error
Language: C++


using namespace std;

using ll = long long;

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

    int h = 0;
    for (int i = 0; i < S.size() / 2; i++) {
        if (S[i] != S[S.size() - 1 - i]) h++;
    }

    cout << h << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'string' was not declared in this scope
    8 |     string S;
      |     ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | 
a.cc:9:5: error: 'cin' was not declared in this scope
    9 |     cin >> S;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | 
a.cc:9:12: error: 'S' was not declared in this scope
    9 |     cin >> S;
      |            ^
a.cc:16:5: error: 'cout' was not declared in this scope
   16 |     cout << h << endl;
      |     ^~~~
a.cc:16:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:18: error: 'endl' was not declared in this scope
   16 |     cout << h << endl;
      |                  ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 |
Language: C++

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



Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: 'n' was not declared in this scope
   10 |       if(s[i]!=s[n-i]) x++;
      |                  ^