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

#include<bits/stdc++.h>
using namespace std;
#define gc getchar_unlocked
#define fo(i,n) for(i=0;i<n;i++)
#define Fo(i,k,n) for(i=k;k<n?i<n:i>n;k<n?i+=1:i-=1)
#define ll  long long
#define si(x)	scanf("%d",&x)
#define sl(x)	scanf("%lld",&x)
#define ss(s)	scanf("%s",s)
#define pi(x)	printf("%d\n",x)
#define pl(x)	printf("%lld\n",x)
#define ps(s)	printf("%s\n",s)
#define deb(x) cout << #x << "=" << x << endl
#define deb2(x, y) cout << #x << "=" << x << "," << #y << "=" << y << endl
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define clr(x) memset(x, 0, sizeof(x))
#define sortall(x) sort(all(x))
#define tr(it, a) for(auto it = a.begin(); it != a.end(); it++)
#define PI 3.1415926535897932384626
typedef pair<int, int>	pii;
typedef pair<ll, ll>	pl;
typedef vector<int>		vi;
typedef vector<ll>		vl;
typedef vector<pii>		vpii;
typedef vector<pl>		vpl;
typedef vector<vi>		vvi;
typedef vector<vl>		vvl;
int mpow(int base, int exp);
void ipgraph(int m);
void dfs(int u, int par);
const int mod = 1000000007;
const int N = 3e5, M = N;
const int INF=1e5+5;
ll int dp[2000][2002];
ll int solve(string a,string b,int n,int m){
ll int res=0;
ll int i,j;
Fo(i,1,n+1){
    Fo(j,1,m+1){
        if(a[i-1]==b[j-1]){

        dp[i][j]=1+dp[i-1][j-1];
            res=max(res,dp[i][j]);
        }else{
            dp[i][j]=0;
        }
    }
}
return res;

}
int main(){
ios_base::sync_with_stdio(0);
ll int t,i,j,n,k,m,x,y,flag=0,sum=0,ans=0;
//cin>>t;
t=1;
while(t--){
    memset(dp,0,sizeof dp);
string a,b;
cin>>a;
cin>>b;
int ans=INT_MAX:
fo(i,a.length()-b.length()){
   int cnt=0;
    fo(j,b.length()){
        if(a[i+j]!=b[j])cnt++;
    }
    ans=min(ans,cnt);
}
cout<<ans;
}
return 0;
}
int mpow(int base, int exp) {
    base %= mod;
    int result = 1;
    while (exp > 0) {
    if (exp & 1) result = ((ll)result * base) % mod;
    base = ((ll)base * base) % mod;
    exp >>= 1;
    }
    return result;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:66:16: error: expected ',' or ';' before ':' token
   66 | int ans=INT_MAX:
      |                ^
a.cc:4:32: error: expected ';' before ')' token
    4 | #define fo(i,n) for(i=0;i<n;i++)
      |                                ^
a.cc:67:1: note: in expansion of macro 'fo'
   67 | fo(i,a.length()-b.length()){
      | ^~
Language: C++

#include <bits/stdc++.h>

using namespace std;
typedef long long ll;

int main() {
    
    string s1;
    string s2;
    
    cin>>s1>>s2;
    
    ll l1=s1.length();
    ll l2=s2.length();
    
    ll dp[l1+1][l2+1];
    
    for(ll i=0;i<=l1;i++)
    {
        for(ll j=0;j<=l2;j++)
        {
            if(i==0 || j==0)
            {
                dp[i][j]=0;
            }
            else if(s1[i-1]==s2[j-1])
            {
                dp[i][j]=dp[i-1][j-1]+1;
            }
            else
            {
                dp[i][j]=max(dp[i-1][j],dp[i][j-1]);
            }
        }
    }
    
    cout<<l1-dp[i][j]<<"\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:17: error: 'i' was not declared in this scope
   37 |     cout<<l1-dp[i][j]<<"\n";
      |                 ^
a.cc:37:20: error: 'j' was not declared in this scope; did you mean 'jn'?
   37 |     cout<<l1-dp[i][j]<<"\n";
      |                    ^
      |                    jn
Language: C++

#include <bits/stdc++.h>

using namespace std;
int main(){
	string s,t;
	cin>>s>>t;
	int len=t.length();
	int len2=s.length();
	int hasil=len,change=0;
	for(int i=0;i<len;i++){
		for(int j=len-i;j>0;j--){
			string substr=t.substr(i,j);
			//cout<<substr<<'\n';
			int find=s.find(substr);
			if(find>=0&& find-i>=0 &&find+len-i-j<=len2){
				change=len-j;
				if(hasil>change) hasil=change;
			}
		}
	}
	cout<<hasil<<'\n';
    return 0;
}

#include <bits/stdc++.h>

using namespace std;
int main(){
	string s,t;
	cin>>s>>t;
	int len=t.length();
	int len2=s.length();
	int hasil=len,change=0;
	for(int i=0;i<len;i++){
		for(int j=len-i;j>0;j--){
			string substr=t.substr(i,j);
			//cout<<substr<<'\n';
			int find=s.find(substr);
			if(find>=0&& find-i>=0 &&find+len-i-j<=len2){
				change=len-j;
				if(hasil>change) hasil=change;
			}
		}
	}
	cout<<hasil<<'\n';
    return 0;
}



Compiler output:
a.cc:28:5: error: redefinition of 'int main()'
   28 | int main(){
      |     ^~~~
a.cc:4:5: note: 'int main()' previously defined here
    4 | int main(){
      |     ^~~~
Language: C++

#include <algorithm>
#include <iomanip>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;

#define for (i, a, b) for (int i = a; i < b; ++i)
#define rep(i, n) for (int i = 0; i < n; ++i)
typedef long long ll;

int main() {
  string s, t;
  int ans = 1e9;
  cin >> s >> t;
  rep(si, s.size()) {
    if (si + t.size() > s.size())
      break;
    int cnt = 0;
    rep(i, t.size()) {
      if (s[si + i] != t[i])
        cnt++;
    }
    ans = min(ans, cnt);
  }
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: 'i' was not declared in this scope
    9 | #define for (i, a, b) for (int i = a; i < b; ++i)
      |              ^
a.cc:10:19: note: in expansion of macro 'for'
   10 | #define rep(i, n) for (int i = 0; i < n; ++i)
      |                   ^~~
a.cc:17:3: note: in expansion of macro 'rep'
   17 |   rep(si, s.size()) {
      |   ^~~
a.cc:9:17: error: 'a' was not declared in this scope
    9 | #define for (i, a, b) for (int i = a; i < b; ++i)
      |                 ^
a.cc:10:19: note: in expansion of macro 'for'
   10 | #define rep(i, n) for (int i = 0; i < n; ++i)
      |                   ^~~
a.cc:17:3: note: in expansion of macro 'rep'
   17 |   rep(si, s.size()) {
      |   ^~~
a.cc:9:20: error: 'b' was not declared in this scope
    9 | #define for (i, a, b) for (int i = a; i < b; ++i)
      |                    ^
a.cc:10:19: note: in expansion of macro 'for'
   10 | #define rep(i, n) for (int i = 0; i < n; ++i)
      |                   ^~~
a.cc:17:3: note: in expansion of macro 'rep'
   17 |   rep(si, s.size()) {
      |   ^~~
a.cc:17:7: error: 'si' was not declared in this scope; did you mean 's'?
   17 |   rep(si, s.size()) {
      |       ^~
a.cc:10:35: note: in definition of macro 'rep'
   10 | #define rep(i, n) for (int i = 0; i < n; ++i)
      |                                   ^
Language: Java

import java.util.*;
public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.nextLine();
        String T = sc.nextLine();
        char [] app = new char[S.length()];
        char [] down = new char[T.length()];
        int [] anc = new int[S.length()-T.length()];
        int Min;
        
        
        for(int i = 0;i < S.length();i++){
            app[i] = S.charAt(i);
        }
        for(int i = 0;i < T.length();i++){
            down[i] = T.charAt(i);
        }
        if(S.length() == T.length()){
            int count = 0;
            for(int i = 0;i < T.length();i++){
                if(app[i] != down[i]){
                    count++;
                }
                Min = count;
            }
        System.out.println(Min);
        }else{
            for(int i = 0;i < S.length()-T.length();i++){
                int count = 0;
                for(int l = 0;l < T.length();l++){
                    if(app[i+l] != down[l]){
                        count++;
                    }  
                    anc[i] = count;
                }
            }
            Min = anc[0];
            for(int i = 1 ; i < anc.length; i++){
                if(Min > anc[i]){
                    Min = anc[i];
                    }
                }
                System.out.println(Min);
        }
    }
}

Compiler output:
Main.java:27: error: variable Min might not have been initialized
        System.out.println(Min);
                           ^
1 error
Language: C++

#include<stdio.h>
#include<string.h>
#define rep(i,N) for(int i=0;i<(int)N;i++)
int main(void)
{
  char S[1001],T[1001];
  if(!scanf("%s %s",S,T)){return -1};int change=strlen(T);
  rep(i,(int)strlen(S)-(int)strlen(T))
  {
    int diff=0;
    rep(j,(int)strlen(T)){if(S[i+j]!=T[j]){diff++;}}
    change=diff<change?diff:change;
  }
  return printf("%d\n",change),0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:36: error: expected ';' before '}' token
    7 |   if(!scanf("%s %s",S,T)){return -1};int change=strlen(T);
      |                                    ^
      |                                    ;
Language: C++

#include<stdio.h>
#include<string.h>
#define rep(i,N) for(int i=0;i<(int)N;i++)
int main(void)
{
  char S[1001],T[1001];
  if(!scanf("%s %s",S,T))return -1;else{int change=strlen(T);}
  rep(i,(int)strlen(S)-(int)strlen(T))
  {
    int diff=0;
    rep(j,(int)strlen(T)){if(S[i+j]!=T[j]){diff++;}}
    change=diff<change?diff:change;
  }
  return printf("%d\n",change),0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: 'change' was not declared in this scope
   12 |     change=diff<change?diff:change;
      |     ^~~~~~
a.cc:14:24: error: 'change' was not declared in this scope
   14 |   return printf("%d\n",change),0;
      |                        ^~~~~~
Language: Java

import java.util.*;
class Main{
	public static void main (String[] args){
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
    	String T = sc.next();
    	int Tl = T.length();
			
        String[] Tt = new String[Tl];
        int x = 0;

      	for (int i = 0; i  < Tl; i++){
          Tt[i] = T.substring(0,i+1);
					

				if (!S.contains(Tt[0])){
					x = Tl; break;
				}
    		else if(!S.contains(Tt[i])){
              if(lastIndexOf(Tt[i]) < Tl){
                x = Tl; break;
              }

        		x = Tl - i ;
             break;
        	}
					else{
						x = 0;
					}


         }
      System.out.println(x);
    }
 }


Compiler output:
Main.java:20: error: cannot find symbol
              if(lastIndexOf(Tt[i]) < Tl){
                 ^
  symbol:   method lastIndexOf(String)
  location: class Main
1 error
Language: Java

import java.util.*;
class Main{
	public static void main (String[] args){
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
    	String T = sc.next();
    	int Tl = T.length();
			
        String[] Tt = new String[Tl];
        int x = 0;

      	for (int i = 0; i  < Tl; i++){
          Tt[i] = T.substring(0,i+1);
					

				if (!S.contains(Tt[0])){
					x = Tl; break;
				}
    		else if(!S.contains(Tt[i])){
              if(lastIndexOf(Tt[i]) < Tl)){
                x = Tl; break;
              }

        		x = Tl - i ;
             break;
        	}
					else{
						x = 0;
					}


         }
      System.out.println(x);
    }
 }


Compiler output:
Main.java:20: error: illegal start of expression
              if(lastIndexOf(Tt[i]) < Tl)){
                                         ^
1 error
Language: Java

import java.util.*;
class Main{
	public static void main (String[] args){
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
    	String T = sc.next();
    	int Tl = T.length();
			
        String[] Tt = new String[Tl];
        int x = 0;

      	for (int i = 0; i  < Tl; i++){
          Tt[i] = T.substring(0,i+1);
					

				if (!S.contains(Tt[0])){
					x = Tl; break;
				}
    		else if(!S.contains(Tt[i])){
              if(lastIndexOf(Tt[i] < Tl)){
                x = Tl; break;
              }

        		x = Tl - i ;
             break;
        	}
					else{
						x = 0;
					}


         }
      System.out.println(x);
    }
 }


Compiler output:
Main.java:20: error: bad operand types for binary operator '<'
              if(lastIndexOf(Tt[i] < Tl)){
                                   ^
  first type:  String
  second type: int
1 error
Language: Java

import java.util.*;
class Main{
	public static void main (String[] args){
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
    	String T = sc.next();
    	int Tl = T.length();
			
        String[] Tt = new String[Tl];
        int x = 0;

      	for (int i = 0; i  < Tl; i++){
          Tt[i] = T.substring(0,i+1);
					

				if (!S.contains(Tt[0])){
					x = Tl; break;
				}
    		else if(!S.contains(Tt[i])){
              if(lastIndexOf(Tt[i] < Tl){
                x = Tl; break;
              }

        		x = Tl - i ;
             break;
        	}
					else{
						x = 0;
					}


         }
      System.out.println(x);
    }
 }


Compiler output:
Main.java:20: error: ')' expected
              if(lastIndexOf(Tt[i] < Tl){
                                        ^
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(
  {
    string s,t;
    cin>>s>>t;
    int n=s.size();
    int k=t.size();
    int ans=k;
    for(int i=0;i<n-k;i++)
    { int res=0;
      for(int j=i;j<i+k;j++)
        if(s[j]!=t[j])
          res++;
       ans=min(ans,res);
    }
    cout<<ans<<endl;
    return 0;
  }

Compiler output:
a.cc:3:5: error: cannot declare '::main' to be a global variable
    3 | int main(
      |     ^~~~
a.cc:5:12: error: expected primary-expression before 's'
    5 |     string s,t;
      |            ^
a.cc:5:12: error: expected '}' before 's'
a.cc:4:3: note: to match this '{'
    4 |   {
      |   ^
a.cc:5:11: error: expected ')' before 's'
    5 |     string s,t;
      |           ^~
      |           )
a.cc:3:9: note: to match this '('
    3 | int main(
      |         ^
a.cc:5:14: error: 't' was not declared in this scope; did you mean 'tm'?
    5 |     string s,t;
      |              ^
      |              tm
a.cc:6:5: error: 'cin' does not name a type
    6 |     cin>>s>>t;
      |     ^~~
a.cc:7:11: error: 's' was not declared in this scope
    7 |     int n=s.size();
      |           ^
a.cc:8:11: error: 't' was not declared in this scope; did you mean 'tm'?
    8 |     int k=t.size();
      |           ^
      |           tm
a.cc:10:5: error: expected unqualified-id before 'for'
   10 |     for(int i=0;i<n-k;i++)
      |     ^~~
a.cc:10:17: error: 'i' does not name a type
   10 |     for(int i=0;i<n-k;i++)
      |                 ^
a.cc:10:23: error: 'i' does not name a type
   10 |     for(int i=0;i<n-k;i++)
      |                       ^
a.cc:17:5: error: 'cout' does not name a type
   17 |     cout<<ans<<endl;
      |     ^~~~
a.cc:18:5: error: expected unqualified-id before 'return'
   18 |     return 0;
      |     ^~~~~~
a.cc:19:3: error: expected declaration before '}' token
   19 |   }
      |   ^
Language: C++

#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
#pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
#define f first
#define s second
#define fore(i,a,b) for(lli i = (a), ThxMK = (b); i < ThxMK; ++i)
#define pb push_back
#define all(s) begin(s), end(s)
#define rall(s) rbegin(s), rend(s)
#define _ ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define sz(s) int(s.size())
#define ENDL '\n'
using namespace std;
typedef long double ld;
typedef long long lli;
typedef pair<lli,lli> ii;
#define deb(x) cout << #x": " << (x) << endl;


int main(){ _
    string a,b;
    cin >> a >> b;
    vector<lli> l(0);
    fore(i,0,sz(a)-sz(b)+1)
    {
      lli dif=0;
      fore(n,0,sz(b))
      {
        if(b[n]!=a[i+n])dif++;
      }
      l.pb(dif);
    }
    sort(all(l));
    cout << l[0] <<ENDL;
    return 0;
}


Compiler output:
In file included from /usr/include/c++/14/string:43,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:3:
/usr/include/c++/14/bits/allocator.h: In destructor 'std::__cxx11::basic_string<char>::_Alloc_hider::~_Alloc_hider()':
/usr/include/c++/14/bits/allocator.h:182:7: error: inlining failed in call to 'always_inline' 'std::allocator< <template-parameter-1-1> >::~allocator() noexcept [with _Tp = char]': target specific option mismatch
  182 |       ~allocator() _GLIBCXX_NOTHROW { }
      |       ^
In file included from /usr/include/c++/14/string:54:
/usr/include/c++/14/bits/basic_string.h:186:14: note: called from here
  186 |       struct _Alloc_hider : allocator_type // TODO check __is_final
      |              ^~~~~~~~~~~~
Language: Java

import org.apache.lucene.search.spell.JaroWinklerDistance;
import org.apache.lucene.search.spell.LevensteinDistance;
import java.util.Scanner;

public class Main {

    public static void main(String argv[]){
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        String T = sc.next();
        System.out.println( getSimilarScoreByLevenshteinDistance(S, T)+S.length()-T.length() );

        


    }

    
    private static int getSimilarScoreByLevenshteinDistance(String s1, String s2){

        
        LevensteinDistance dis =  new LevensteinDistance();
        return (dis.getDistance(s1, s2)*S.length());
    }

    
}


Compiler output:
Main.java:1: error: package org.apache.lucene.search.spell does not exist
import org.apache.lucene.search.spell.JaroWinklerDistance;
                                     ^
Main.java:2: error: package org.apache.lucene.search.spell does not exist
import org.apache.lucene.search.spell.LevensteinDistance;
                                     ^
Main.java:22: error: cannot find symbol
        LevensteinDistance dis =  new LevensteinDistance();
        ^
  symbol:   class LevensteinDistance
  location: class Main
Main.java:22: error: cannot find symbol
        LevensteinDistance dis =  new LevensteinDistance();
                                      ^
  symbol:   class LevensteinDistance
  location: class Main
Main.java:23: error: cannot find symbol
        return (dis.getDistance(s1, s2)*S.length());
                                        ^
  symbol:   variable S
  location: class Main
5 errors
Language: C++

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

int main() {
    string S, T;
    cin >> S >> T;
    ll lcs = 0;
    for (ll i = 0; i < T.size(); i++) {
        for (ll j = 1; i + j <= T.size(); j++) {
            for (ll p = 0; p + j <= S.size(); p++) {
                bool flg = true;
                for (ll k = 0; k < j; k++) {
                    if (p + k >= S.size() || i + k => T.size()) {
                        flg = false;
                        continue;
                    }
                    if (S[p + k] != T[i + k]) flg = false;
                }
                if (p < i) flg = false;
                if (S.size() - p - j < T.size() - i - j) flg = false;
                if (flg) lcs = max(lcs, j);
            }
        }
    }
    ll ans = T.size() - lcs;
    cout << ans << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:53: error: expected primary-expression before '>' token
   14 |                     if (p + k >= S.size() || i + k => T.size()) {
      |                                                     ^
Language: Java

import java.util.Scanner;

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

        for (int i = 0; i <= t.length(); i++) {
            for (int j = i; j <= t.length(); j++) {
                if (s.substring(i, j + sabun).contains(t.substring(i, j))) {
                    System.out.println(t.substring(i, j));
                    length = length > i + t.length() - j ? i + t.length() - j : length;
                }
            }
        }
        System.out.println(length);
    }

Compiler output:
Main.java:20: error: reached end of file while parsing
    }
     ^
1 error
Language: Java

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

        String[] incomingString = new String[2];
        for(int i = 0; i < incomingString.length; i++){
    		Scanner sc = new Scanner(System.in);
            String scLine = sc.nextLine();
            incomingString[i] = scLine;
        }

        int len1 = incomingString[0].length();
        int len2 = incomingString[1].length();
        int result = 0;
        String[] mainarr = incomingString[0].split("");
        String[] subarr = incomingString[1].split("");

        for(int i = 0; i < (len1 - len2 + 1); i++){
            int count = 0;
        	for(int j = 0; j < len2; j++){
                if(!mainarr[i+j].equals(subarr[j])){
                	count++;
                }
        	}
        	if(result == 0){
        		result = count;
        	}
        	else if(count < result){
        		result = count;
        	}
        }
        System.out.println(result);
	}
}


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

#include<bits/stdc++.h>
using namespace std;
int main()
{
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	    string a,b;
     cin >> a    ;
  cin >> b ;
    int  zz[10000000000];
    for(int i=0; i<b.size() ; i++)
    {
           zz[(int)b[i]]++;
    }
       int aaa=0;
  int zzzzz=0;
                   int xxx;
          for(int i=0; i<a.size(); i++)
          {
              aaa=a[i];
              for(int j=i+1; j<a.size(); j++)
          {
                            aaa=aaa+a[j];
          }
                        for(int z=0; z<aaa.size(); z++)
                        {
                             zz[(int) aaa[i]]--;
                        }
                for(int x=0; x<aaa.size(); x++)
                        {
                             xxx=xxx+zz[(int) aaa[i]];
                        }
                 if(zzzzz==0||zzzzz<xxx)
                 {
                   zzzzz=xxx;
                 }
               
          }
       cout << a.size()-zzzzz << "\n" ;
	 
}
 


Compiler output:
a.cc: In function 'int main()':
a.cc:33:44: error: request for member 'size' in 'aaa', which is of non-class type 'int'
   33 |                         for(int z=0; z<aaa.size(); z++)
      |                                            ^~~~
a.cc:35:42: error: invalid types 'int[int]' for array subscript
   35 |                              zz[(int) aaa[i]]--;
      |                                          ^
a.cc:37:36: error: request for member 'size' in 'aaa', which is of non-class type 'int'
   37 |                 for(int x=0; x<aaa.size(); x++)
      |                                    ^~~~
a.cc:39:50: error: invalid types 'int[int]' for array subscript
   39 |                              xxx=xxx+zz[(int) aaa[i]];
      |                                                  ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	    string a,b;
     cin >> a    ;
  cin >> b ;
    int  zz[10000000000];
    for(int i=0; i<b.size() ; i++)
    {
           zz[(int)b[i]]++;
    }
          for(int i=0; i<a.size(); i++)
          {
              aaa=a[i];
              for(int j=i+1; j<a.size(); j++)
          {
                            aaa=aaa+a[j];
          }
                        for(int z=0; z<aaa.size(); z++)
                        {
                             zz[(int) aaa[i]]--;
                        }
                for(int x=0; x<aaa.size(); x++)
                        {
                             xxx=xxx+zz[(int) aaa[i]];
                        }
                 if(zzzzz==0||zzzzz<xxx)
                 {
                   zzzzz=xxx;
                 }
               
          }
       cout << a.size()-zzzzz << "\n" ;
	 
}
 


Compiler output:
a.cc: In function 'int main()':
a.cc:25:15: error: 'aaa' was not declared in this scope
   25 |               aaa=a[i];
      |               ^~~
a.cc:36:30: error: 'xxx' was not declared in this scope
   36 |                              xxx=xxx+zz[(int) aaa[i]];
      |                              ^~~
a.cc:38:21: error: 'zzzzz' was not declared in this scope
   38 |                  if(zzzzz==0||zzzzz<xxx)
      |                     ^~~~~
a.cc:38:37: error: 'xxx' was not declared in this scope
   38 |                  if(zzzzz==0||zzzzz<xxx)
      |                                     ^~~
a.cc:44:25: error: 'zzzzz' was not declared in this scope
   44 |        cout << a.size()-zzzzz << "\n" ;
      |                         ^~~~~
Language: Java

import java.util.Scanner;

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

        String[] incomingString = new String[2];
        for(int i = 0; i < incomingString.length; i++){
    		Scanner sc = new Scanner(System.in);
            String scLine = sc.nextLine();
            incomingString[i] = scLine;
        }

        int len1 = incomingString[0].length();
        int len2 = incomingString[1].length();
        int result = 0;
        String[] mainarr = incomingString[0].split("");
        String[] subarr = incomingString[1].split("");

        for(int i = 0; i < (len1 - len2 + 1); i++){
            int count = 0;
        	for(int j = 0; j < len2; j++){
                if(!mainarr[i+j].equals(subarr[j])){
                	count++;
                }
        	}
        	if(result == 0){
        		result = count;
        	}
        	else if(count < result){
        		result = count;
        	}
        }
        System.out.println(result);
	}
}


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

#include<iostream>
#include<vector>
#include<map>
#define fast ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define endl "\n";
#pragma GCC optimize "trapv"
using namespace std;
typedef long long int ll;
int mx =1e6+100;
int mod = 1e9+7;

  
int main()
{
    string s1,s2;
    cin>>s1>>s2;
    int n= (int )s1.size();
    int m = (int)s2.size();
    //
    int ans=INT_MAX;
    for(int i=0;i<=n-m;i++)
    {
        int v=i,ct=0;
       // cout<<"i:"<<i<<endl;
        for(int j=0;j<m;j++)
        {
            if(s1[v]!=s2[j]){
                ct++;
            }
            v++;
        }
      //  cout<<i<<" "<<ct<<endl;
        ans = min(ans,ct);
    }
    cout<<ans<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:13: error: 'INT_MAX' was not declared in this scope
   20 |     int ans=INT_MAX;
      |             ^~~~~~~
a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    3 | #include<map>
  +++ |+#include <climits>
    4 | #define fast ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
Language: Java

public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String S = scan.next();
		String T = scan.next();

		int count = 0;
		int maxCount = 0;

	  if(S.length() == T.length())
	  {
		  for(int i = 0; i < S.length(); i++) {
				if((S.charAt(i) == T.charAt(i)))
				{
					maxCount++;
				}
			}
	  }
	  else
	  {
      for(int x = 0; x < S.length() - T.length(); x++) {
		for(int i = 0; i < T.length(); i++) {
			if((S.charAt(i + x) == T.charAt(i)))
			{
				count++;
			}
		}
		if(count > maxCount) {
			maxCount = count;
		}
		count = 0;
      	}
      }
		System.out.println(T.length() - maxCount);
		scan.close();
	}
}

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

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

int main(){
  
  string a,b;
  cin >> a >> b;
  int x=0;
  
  for(int i=0;i<b.at();i++){
    if( a.at(i) != b.at(i) ){
      
      x++;
      
    }
  }
  
  cout << x << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:21: error: no matching function for call to 'std::__cxx11::basic_string<char>::at()'
   10 |   for(int i=0;i<b.at();i++){
      |                 ~~~~^~
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:1287:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::at(size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; const_reference = const char&; size_type = long unsigned int]'
 1287 |       at(size_type __n) const
      |       ^~
/usr/include/c++/14/bits/basic_string.h:1287:7: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/basic_string.h:1309:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::at(size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]'
 1309 |       at(size_type __n)
      |       ^~
/usr/include/c++/14/bits/basic_string.h:1309:7: note:   candidate expects 1 argument, 0 provided
Language: Java

import java.util.*;
import java.io.*;
import java.lang.*;

public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    // String s = scan.next();
    // String t = scan.next();

    int sLen = s.length();
    int tLen = t.length();
    int min = 1000;

    for (int i = 0; i < tLen; i++) {
      for (int j = 0; j < sLen; j++) {
        if (s.substring(j, j+1).equals(t.substring(i, i+1))) {
          // System.out.println("i : " + i + "(" + t.substring(i, i+1) + ")");
          // System.out.println("j : " + j + "(" + s.substring(j, j+1) + ")");
          int diff;
          try {
            // System.out.println(s.substring(j-i, j+tLen-i) + " vs " + t);
            diff = calculateDiff(s.substring(j-i, j+tLen-i), t);
            // System.out.println("diff : " + diff);
          } catch (StringIndexOutOfBoundsException e) {
            continue;
          }
          if (min > diff) {
            min = diff;
          }
        }
      }
    }

    PrintWriter out = new PrintWriter(System.out);
    out.println(min);
    out.flush();
  }

  public static int calculateDiff(String a, String b) {
    int count = 0;
    for (int i = 0; i < b.length(); i++) {
      if (!a.substring(i, i+1).equals(b.substring(i, i+1))) {
        count++;
      }
    }
    return count;
  }
}


Compiler output:
Main.java:11: error: cannot find symbol
    int sLen = s.length();
               ^
  symbol:   variable s
  location: class Main
Main.java:12: error: cannot find symbol
    int tLen = t.length();
               ^
  symbol:   variable t
  location: class Main
Main.java:17: error: cannot find symbol
        if (s.substring(j, j+1).equals(t.substring(i, i+1))) {
            ^
  symbol:   variable s
  location: class Main
Main.java:17: error: cannot find symbol
        if (s.substring(j, j+1).equals(t.substring(i, i+1))) {
                                       ^
  symbol:   variable t
  location: class Main
Main.java:23: error: cannot find symbol
            diff = calculateDiff(s.substring(j-i, j+tLen-i), t);
                                                             ^
  symbol:   variable t
  location: class Main
Main.java:23: error: cannot find symbol
            diff = calculateDiff(s.substring(j-i, j+tLen-i), t);
                                 ^
  symbol:   variable s
  location: class Main
6 errors
Language: C++

#include <cstdio>
#include <stdio>
#include <string>
#include <algorithm>
 
using namespace std;
 
int main() {
  string s1, s2;
  cin >> s1;
  cin >> s2;
  int ans = s2.length();
  for (int i = 0; i < s1.length() - s2.length(); ++i) {
    int diff = 0;
    for (int j = 0; j < s2.length(); ++j) {
      if (s1[i + j] != s2[j]) {
        diff += 1;
      }
    }
    ans = min(ans, diff);
  }
  
  printf("%d", ans);
  
  return 0;
}

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

#include <cstdio>
#include <stdio>
#include <string>
#include <algorithm>

using namespace std;

int main() {
  string s1, s2;
  cout << s1;
  cout << s2;
  int ans = s2.length();
  for (int i = 0; i < s1.length() - s2.length(); ++i) {
    int diff = 0;
    for (int j = 0; j < s2.length(); ++j) {
      if (s1[i + j] != s2[j]) {
        diff += 1;
      }
    }
    ans = min(ans, diff);
  }
  
  printf("%d", ans);
  
  return 0;
}

Compiler output:
a.cc:2:10: fatal error: stdio: No such file or directory
    2 | #include <stdio>
      |          ^~~~~~~
compilation terminated.
Language: Java

import java.util.Scanner;

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

        String[] incomingString = new String[2];
        for(int i = 0; i < incomingString.length; i++){
    		Scanner sc = new Scanner(System.in);
            String scLine = sc.nextLine();
            incomingString[i] = scLine;
        }

        int len1 = incomingString[0].length();
        int len2 = incomingString[1].length();
        int count = 0;
        int result = 0;
        String[] mainarr = incomingString[0].split("");
        String[] subarr = incomingString[1].split("");

        for(int i = 0; i < (len1 - len2 + 1); i++){
        	for(int j = 0; j < len2; j++){
                if(mainarr[j].equals(subarr[j])){
                	count++;
                }
        	}
        	if(result == 0){
        		result = count;
        	}
        	else if(count < result){
        		result = count;
        	}
        }
        System.out.println(result);
	}
}


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

#include <bits/stdc++.h>

using namespace std;

int main() {

  string s, t;
  cin >> s >> t;

  int ss = s.size();
  int tt = t.size();

  int ans = 1000;
  for (int i = 0; i < ss - tt + 1; ++i) {
    int c = tt;
    for (int j = 0; j < ts; ++j) {
      if (s[i + j] == t[j]) {
        --c;
      }
    }
    ans = min(ans, c);
  }

  cout<<ans;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:25: error: 'ts' was not declared in this scope; did you mean 'tt'?
   16 |     for (int j = 0; j < ts; ++j) {
      |                         ^~
      |                         tt
Language: Java

package test;

import java.util.Scanner;

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

        Scanner scn = new Scanner(System.in);
        System.out.println("Sを入力してください");
        String S = scn.next();
        String[] strArraySubS = S.split("");

        System.out.println("Tを入力してください");
        String T = scn.next();
        String[] strArraySubT = T.split("");


        for (int i = 0; i < strArraySubS.length; i++) {
            System.out.println("Sの" + i + "の番目：" + strArraySubS[i]);
        }


        for (int i = 0; i < strArraySubT.length; i++) {
            System.out.println("Tの" + i + "の番目：" + strArraySubT[i]);
        }

    }
}


Compiler output:
Main.java:5: error: class test is public, should be declared in a file named test.java
public class test {
       ^
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.nextInt();
        String T = sc.nextInt();

        int res = (int)1e9;
        int legth = ((T.length() - S.length()) + 1);
        for (int index = 0; index < legth; index++) {
            int count = 0;
            for (int j = 0; j < S.length(); j++) {
                if (S.charAt(j) != T.charAt(index + j)) {
                    count++;
                }
            }
            if(count < res) {
                res = count;
            }
        }
        System.out.println(res);
    }
}

Compiler output:
Main.java:5: error: incompatible types: int cannot be converted to String
        String S = sc.nextInt();
                             ^
Main.java:6: error: incompatible types: int cannot be converted to String
        String T = sc.nextInt();
                             ^
2 errors
Language: C

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

void chmin(int *a,int b){
  if(*a > b){
    *a =b;
  }
  
  return;
}

int main(void){
  char s[1010],t[1010];
  scanf("%s%s",s,t);
  int n,m;
  n=strlen(s);
  m=strlen(t);
  int min=1010;
  for(int i=0;i<n+10;i++){
    int k=0;
    for(int j=0;j<m+1;j++){
      if(s[k]!=t[j]){
        count++;
      }
      k++;
    }
    if(count <= min){
      chmin(&count, min);
    }
  }
  printf("%d\n",count);
  return 0;
}

Compiler output:
main.c:1:10: fatal error: stdio.h.: No such file or directory
    1 | #include <stdio.h.>
      |          ^~~~~~~~~~
compilation terminated.
Language: Java

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

		String s = sc.next();
		String t = sc.next();
		
		int out = Integer.MAX_VALUE;
		
		for(int i = 0; i<s.length() - t.length()+1; i++) {
			int diff = 0;
			for(int j = 0; j<t.length(); j++) {
				if(s.charAt(j+i) != t.charAt(j)) diff++;
			}
			out = Math.min(out,  diff);
		}
		System.out.println(out);
		
	}
}

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

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<n; i++)
#define REP2(i,x,n) for(int i=x; i<n; i++)
#define ALL(n) begin(n),end(n)
struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star;
const long long INF = numeric_limits<long long>::max();
int main(){
    string s,t;
    cin >> s >> t;
    int roop = s.size() - t.size() + 1;
    int t_roop = t.size();
    int cnt[roop]={};
    int max = 0;
    rep(i,roop){
        rep(j,t_roop{
            if(s[j+i]==t[j])cnt[i]++;
        }
        if(i==0)max = cnt[i];
        if(i!=0 and cnt[i]>cnt[i-1])max = cnt[i];
    }

    cout << t.size() - max;

    return 0;
}

Compiler output:
a.cc:26:2: error: unterminated argument list invoking macro "rep"
   26 | }
      |  ^
a.cc: In function 'int main()':
a.cc:16:9: error: 'rep' was not declared in this scope
   16 |         rep(j,t_roop{
      |         ^~~
a.cc:16:12: error: expected '}' at end of input
   16 |         rep(j,t_roop{
      |            ^
a.cc:15:16: note: to match this '{'
   15 |     rep(i,roop){
      |                ^
a.cc:16:12: error: expected '}' at end of input
   16 |         rep(j,t_roop{
      |            ^
a.cc:8:11: note: to match this '{'
    8 | int main(){
      |           ^
Language: Java

    import java.util.*;
    import java.util.Arrays;
    class Main{
    public static void Main{String args[]}{
    Scanner sc=new Scanner(System.in);
      String s=sc.next();
      String t=sc.next();
      int ar[]=new int[s.length()-t.length()];
      for(int i=0;i<s.length()-t.length();i++){
      int j;
        for(j=0;j<t.length();j++){
        if(s.charAt(i+j)!=t.charAt(i)){
        ar[i]++;
        }
        }
      
      }
    Arrays.sort(ar);
      System.out.println(ar[0]);
    }
    }

Compiler output:
Main.java:4: error: '(' expected
    public static void Main{String args[]}{
                           ^
Main.java:4: error: ';' expected
    public static void Main{String args[]}{
                                         ^
2 errors
Language: Java

    import java.util.*;
    import java.util.Arrays;
    class Main{
    public static void Main(String args[]){
    Scanner sc=new Scanner(System.in);
      int s=sc.next();
      int t=sc.next();
      int ar[]=new int[s.length()-t.length()];
      for(int i=0;i<s.length()-t.length();i++){
      int j;
        for(j=0;j<t.length();j++){
        if(s.charAt(i+j)!=t.charAt(i)){
        ar[i]++;
        }
        }
      
      }
    Arrays.sort(ar);
      System.out.println(ar[0]);
    }
    }

Compiler output:
Main.java:6: error: incompatible types: String cannot be converted to int
      int s=sc.next();
                   ^
Main.java:7: error: incompatible types: String cannot be converted to int
      int t=sc.next();
                   ^
Main.java:8: error: int cannot be dereferenced
      int ar[]=new int[s.length()-t.length()];
                        ^
Main.java:8: error: int cannot be dereferenced
      int ar[]=new int[s.length()-t.length()];
                                   ^
Main.java:9: error: int cannot be dereferenced
      for(int i=0;i<s.length()-t.length();i++){
                     ^
Main.java:9: error: int cannot be dereferenced
      for(int i=0;i<s.length()-t.length();i++){
                                ^
Main.java:11: error: int cannot be dereferenced
        for(j=0;j<t.length();j++){
                   ^
Main.java:12: error: int cannot be dereferenced
        if(s.charAt(i+j)!=t.charAt(i)){
            ^
Main.java:12: error: int cannot be dereferenced
        if(s.charAt(i+j)!=t.charAt(i)){
                           ^
9 errors
Language: Java

import java.util.*;
import java.util.Arrays;
class Main{
public static void Main{String args[]}{
Scanner sc=new Scanner(System.in);
  int s=sc.next();
  int t=sc.next();
  int ar[]=new int[s.length()-t.length()];
  for(int i=0;i<s.length()-t.length();i++){
  int j;
    for(j=0;j<t.length();j++){
    if(s.charAt(i+j)!=t.charAt(i)){
    ar[i]++;
    }
    }
  
  }
Arrays.sort(ar);
  System.out.println(ar[0]);
}
}

Compiler output:
Main.java:4: error: '(' expected
public static void Main{String args[]}{
                       ^
Main.java:4: error: ';' expected
public static void Main{String args[]}{
                                     ^
2 errors
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    String S = scan.nextLine();
    String T = scan.nextLine();
    
    int result = -1;
    int changeNum = 0;
    

	
    String partT = T;
    for(int changeNum= 0; changeNum<T.length();changeNum++){
    
      for(int index = 0; index <changeNum;index++){
        partT = T.substring(index, T.length()-changeNum+index);
        if(S.indexOf(partT) >= 0){
          result = changeNum;
          break;
        }
      }
    }
    
    System.out.println(result);
  }
}
      
      
      
      


Compiler output:
Main.java:15: error: variable changeNum is already defined in method main(String[])
    for(int changeNum= 0; changeNum<T.length();changeNum++){
            ^
1 error
Language: Java

import java.util.*;
class Main{
	public static void main (String[] args){
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
    	String T = sc.next();
    	int Tl = T.length();
        String[] Tt = new String[Tl];
        int x = 0;

      	for (int i = (Tl - 1); i  >= 0; i--){
          Tt[i] = T.substring(0,i);

    		if(!(S.contains(Tt[i])) && S.contains(Tt[i-1])){
        		x = Tl - i ;
              break
        	}
            
        	
         }
      System.out.println(x);
    }
 }


Compiler output:
Main.java:16: error: ';' expected
              break
                   ^
1 error
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    String S = scan.nextLine();
    String T = scan.nextLine();
    
    int result = -1;
    int changeNum = 0;
    

	
    String partT = T;
    while(S.indexOf(partT) <0){
    for(int changeNum= 0; changeNum<T.length();changeNum++){
    
      for(int index = 0; index <changeNum;index++){
        partT = T.substring(index, T.length()-changeNum+index);
        if(S.indexOf(partT) >= 0){
          result = changeNum;
          break;
        }
      }
    }
    
    System.out.println(result);
  }
}
      
      
      
      


Compiler output:
Main.java:29: error: reached end of file while parsing
}
 ^
1 error
Language: Java

import java.util.*;

public class b {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.nextLine();
    String t = sc.nextLine();
    
    int ans = 1001;

    for(int i=0; i<s.length()-t.length(); i++){
        String sub = s.substring(i, i+t.length());
        int sum = 0;
        for(int j=0; j<t.length(); j++){
            if(t.charAt(j) != sub.charAt(j)){
                sum++;
            }
        }
        ans = Math.min(sum, ans);
    }
    System.out.println(ans);
   
    sc.close();
    return;
  }
  
}


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

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

int main() {
	string S, T;
  	cin >> S >> T;
    int cnt=0;
  	int c_2=0;
  	int c_3=0;
  	int j=0;
  	int max =0;
    while(T.at(cnt) == true){
    	cnt++;
    }  
  	
  	while(S.at(i)==true){
    	c_2++;
    }
  	while(S.at(j+c_2) == true){
    	for(int i=0;i < c_2; i++){
        	if(S.at(j+i) == T.at(i)){
            	c_3++;
        	}
        }
        if(max < c_3)max = c_3;
      	j++;
    }
 	cout << c_2 - max << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:20: error: 'i' was not declared in this scope
   16 |         while(S.at(i)==true){
      |                    ^
Language: Java

import java.util.*;
class Main{
	public static void main (String[] args){
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
    	String T = sc.next();
    	int Tl = T.length();
        String[] Tt = new String[Tl];
        int x = 0;

      	for (int i = (Tl - 1); i  >= 0; i--){
          Tt[i] = T.substring(0,i);

    		if(S.contains(Tt[i]){
        		x = Tl - i - 1;
        	}
        	
         }
      System.out.println(x);
    }
 }


Compiler output:
Main.java:14: error: ')' expected
    		if(S.contains(Tt[i]){
    		                    ^
1 error
Language: Java

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

        for (int i = 0; i < t.length(); i++) {
            if (s.substring(0, s.length() - i).contains(t.substring(0, t.length() - i))) {
                length = i;
                break;
            }
        }
        System.out.println(length);
    }
}

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

#include "bits/stdc++.h"

using namespace std;

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

    int ans = -1;

    if (T._Equal(S)) {
        cout << "0";
        return 0;
    }

    for (int i = 0; i < S.length(); i++) {
        if (S[i] == T[0]) {
            ans = T.length() - i + 1;
            if (S.length() - i > 1) {
                for (int j = 1; j < T.length() - 1; j++) {
                    if (S[i+j] == T[0+j]) {
                        ans = T.length() - j;
                    }
                }
            }
        }
    }

    if (ans == -1) {
        cout << T.length() - 1;
        return 0;
    }

    cout << ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named '_Equal'
   12 |     if (T._Equal(S)) {
      |           ^~~~~~