criyle/codenet-compile-errors huggingface dataset:
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();
    int cnt[roop]={};
    int max - 0;
    rep(i,roop){
        rep(j,t.size()){
            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: In function 'int main()':
a.cc:13:13: error: expected initializer before '-' token
   13 |     int max - 0;
      |             ^
a.cc:18:28: error: overloaded function with no contextual type information
   18 |         if(i==0)max = cnt[i];
      |                            ^
a.cc:19:48: error: overloaded function with no contextual type information
   19 |         if(i!=0 and cnt[i]>cnt[i-1])max = cnt[i];
      |                                                ^
a.cc:22:22: error: invalid operands of types 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and '<unresolved overloaded function type>' to binary 'operator-'
   22 |     cout << t.size() - max;
      |             ~~~~~~~~~^~~~~
Language: C

                    #include <stdio.h>
                     
                    int	main(void)
                    {
                      char	s[1001] = {0};
                      char	t[1001] = {0};
                      int	len_s = 0;
                      int	len_t = 0;
                      int	diff;
                      int	count = 0;
                      int	i = 0;
                      int	j;
                      
                      if(scanf("%s", s) < 0)
                        return (0);
                      if (scanf("%s", t) < 0
                          return (0);
                      while (s[i])
                        i++;
                      len_s = i;
                      i = 0;
                      while (s[i])
                        i++;
                      len_t = i;
                      diff = len_t;
                      i = 0;
                      while (i < len_s - len_t)
                      {
                        j = 0;
                        if (s[i] = t[j])
                        {
                          count = 0;
                          while (j < len_t)
                          {
                            if (s[i + j] != t[j])
                              count++;
                            j++;
                          }
                          if (diff > count)
                            diff = count;
                        }
                        i++;
                      }
                      printf("%d", diff);
                      return (0);
                    }

Compiler output:
main.c: In function 'main':
main.c:16:45: error: expected ')' before 'return'
   16 |                       if (scanf("%s", t) < 0
      |                          ~                  ^
      |                                             )
   17 |                           return (0);
      |                           ~~~~~~             
main.c:46:21: error: expected expression before '}' token
   46 |                     }
      |                     ^
Language: C++

#include <bits/stdc++.h>
#define ll long long int
#define mk make_pair
#define pb push_back
#define pf push_front
#define fi first
#define se second
#define mod 1000000007
using namespace std;

void fast(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);cout.tie(0);
}

int main(){
    fast();
    ll t=1;
//    cin>>t;
    while(t--){
    	ll fans=INT_MAX;
    	string s,t;
    	cin>>s>>t;
    	ll val=abs(s.length()-t.length());
    	for(ll i=0;i<=val;i++){
    		ll ans=0;
    		string u=s.substr(i,t.size());
    		for(ll j=0;t[j];j++){
    			if(t[j]!=u[j]){
    				++ans;
				}
			}
			fans=min(fans,ans);
		}
		cout<<fans;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:19: error: call of overloaded 'abs(std::__cxx11::basic_string<char>::size_type)' is ambiguous
   24 |         ll val=abs(s.length()-t.length());
      |                ~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42,
                 from a.cc:1:
/usr/include/stdlib.h:980:12: note: candidate: 'int abs(int)'
  980 | extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
      |            ^~~
In file included from /usr/include/c++/14/cstdlib:81:
/usr/include/c++/14/bits/std_abs.h:137:3: note: candidate: 'constexpr __float128 std::abs(__float128)'
  137 |   abs(__float128 __x)
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:85:3: note: candidate: 'constexpr __int128 std::abs(__int128)'
   85 |   abs(__GLIBCXX_TYPE_INT_N_0 __x) { return __x >= 0 ? __x : -__x; }
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:79:3: note: candidate: 'constexpr long double std::abs(long double)'
   79 |   abs(long double __x)
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:75:3: note: candidate: 'constexpr float std::abs(float)'
   75 |   abs(float __x)
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:71:3: note: candidate: 'constexpr double std::abs(double)'
   71 |   abs(double __x)
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:61:3: note: candidate: 'long long int std::abs(long long int)'
   61 |   abs(long long __x) { return __builtin_llabs (__x); }
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:56:3: note: candidate: 'long int std::abs(long int)'
   56 |   abs(long __i) { return __builtin_labs(__i); }
      |   ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string s,t;
  cin>>s>>t;
  int x=0;
  int minx=1000;
  for(int i=0;i<t.size()-s.size();i++){
    for (int j=0;j<s.size;j++){
      if(s.at(j)!=t.at(i+j)){
        x+=1;
      }
    }
   minx=min(minx,x);
  }
  cout<<minx<<endl;
}
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:9:22: 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 '()' ?)
    9 |     for (int j=0;j<s.size;j++){
      |                    ~~^~~~
      |                          ()
Language: Java

public class Main{
  public static void main(String[] args){
 
    Scanner	scn = new Scanner(System.in);
    System.ot.println("Sを入力してください");
    String S = scn.next();
    String[] strArraySubS = S.split("");
        String[] strArrayS = new String[S.length()];

    
    System.ot.println("Tを入力してください");
    String T = scn.next();
        String[] strArraySubS = S.split("");
    String[] strArrayT = new String[T.length()];

for (int i = 1; i < strArraySubS.length; i++) {
    strArrayS[i - 1] = strArraySub[i];
}
 
for (int i = 0; i < strArrayS.length; i++) {
    System.out.println("Sの" + i + "の番目：" + strArrayS[i]);
}
    
for (int i = 1; i < strArraySubT.length; i++) {
    strArrayT[i - 1] = strArraySub[i];
}
 
for (int i = 0; i < strArrayT.length; i++) {
    System.out.println("Tの" + i + "の番目：" + strArrayT[i]);
}
    
  }
}

Compiler output:
Main.java:4: error: cannot find symbol
    Scanner	scn = new Scanner(System.in);
    ^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
    Scanner	scn = new Scanner(System.in);
           	          ^
  symbol:   class Scanner
  location: class Main
Main.java:5: error: cannot find symbol
    System.ot.println("S?????????");
          ^
  symbol:   variable ot
  location: class System
Main.java:11: error: cannot find symbol
    System.ot.println("T?????????");
          ^
  symbol:   variable ot
  location: class System
Main.java:13: error: variable strArraySubS is already defined in method main(String[])
        String[] strArraySubS = S.split("");
                 ^
Main.java:17: error: cannot find symbol
    strArrayS[i - 1] = strArraySub[i];
                       ^
  symbol:   variable strArraySub
  location: class Main
Main.java:24: error: cannot find symbol
for (int i = 1; i < strArraySubT.length; i++) {
                    ^
  symbol:   variable strArraySubT
  location: class Main
Main.java:25: error: cannot find symbol
    strArrayT[i - 1] = strArraySub[i];
                       ^
  symbol:   variable strArraySub
  location: class Main
8 errors
Language: C++

#include <bits/stdc++.h>
#define ll long long int
#define mk make_pair
#define pb push_back
#define pf push_front
#define fi first
#define se second
#define mod 1000000007
using namespace std;

void fast(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);cout.tie(0);
}

int main(){
    fast();
    ll t=1;
//    cin>>t;
    while(t--){
    	ll fans=INT_MAX;
    	string s,t;
    	cin>>s>>t;
    	for(ll i=0;i<=abs(s.length()-t.length());i++){
    		ll ans=0;
    		string u=s.substr(i,t.size());
    		for(ll j=0;t[j];j++){
    			if(t[j]!=u[j]){
    				++ans;
				}
			}
			fans=min(fans,ans);
		}
		cout<<fans;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:26: error: call of overloaded 'abs(std::__cxx11::basic_string<char>::size_type)' is ambiguous
   24 |         for(ll i=0;i<=abs(s.length()-t.length());i++){
      |                       ~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42,
                 from a.cc:1:
/usr/include/stdlib.h:980:12: note: candidate: 'int abs(int)'
  980 | extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
      |            ^~~
In file included from /usr/include/c++/14/cstdlib:81:
/usr/include/c++/14/bits/std_abs.h:137:3: note: candidate: 'constexpr __float128 std::abs(__float128)'
  137 |   abs(__float128 __x)
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:85:3: note: candidate: 'constexpr __int128 std::abs(__int128)'
   85 |   abs(__GLIBCXX_TYPE_INT_N_0 __x) { return __x >= 0 ? __x : -__x; }
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:79:3: note: candidate: 'constexpr long double std::abs(long double)'
   79 |   abs(long double __x)
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:75:3: note: candidate: 'constexpr float std::abs(float)'
   75 |   abs(float __x)
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:71:3: note: candidate: 'constexpr double std::abs(double)'
   71 |   abs(double __x)
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:61:3: note: candidate: 'long long int std::abs(long long int)'
   61 |   abs(long long __x) { return __builtin_llabs (__x); }
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:56:3: note: candidate: 'long int std::abs(long int)'
   56 |   abs(long __i) { return __builtin_labs(__i); }
      |   ^~~
Language: C++

#include <iostream>
using namespace std;

int main()
{
    string s,t;
    cin>>s>>t;
    int tag=0;
    for(int i=0;i<s.length();i++)
    {
        int k=0;
        for(int j=0;j<t.length();j++)
        {
            if(s[i+j]==t[j])
                k++;
        }
        if(k>tag)
            tag=k;
    }
    cout<<s.length()-k;


  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:22: error: 'k' was not declared in this scope
   20 |     cout<<s.length()-k;
      |                      ^
Language: C++

#include<bits/stdc++.h>
#define ll long long int
using namespace std;
int main()
{
    string str,ptr;
    cin>>str>>ptr;
    int mx=1e9;
    for(int i=0; i<=str.size()-ptr.size()); i++)
    {
        int cnt=0;
        int x=i;
        for(int j=0; j<ptr.size(); j++)
        {
            if(x<str.size() && str[x]==ptr[j])
            {

            }
            else
            {
                cnt++;
            }
            x++;

        }

        mx=min(cnt,mx);
    }
    cout<<mx<<endl;



}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:42: error: expected ';' before ')' token
    9 |     for(int i=0; i<=str.size()-ptr.size()); i++)
      |                                          ^
      |                                          ;
a.cc:9:45: error: 'i' was not declared in this scope
    9 |     for(int i=0; i<=str.size()-ptr.size()); i++)
      |                                             ^
Language: C++

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

int main(){
  string s, t;
  cin >> s >> t;
  int ans = 1001;
  for (int i = 0; i < s.length() - t.length() + 1; i++) {
  	int cnt = 0;
    for (int j = 0; j < t.length(); t++) {
      if (s[i+j] != t[j])
        cnt++;
    }
    ans = min(ans, cnt);
  }
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:38: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
   10 |     for (int j = 0; j < t.length(); t++) {
      |                                     ~^~
Language: C++

#include<string>
#include<iostream>
using namespace std;
int main(){
  string text,pattern;
  cin>>text>>pattern;
  int t=text.length();
   int p=pattern.length();
   int max=p,count,temp;
  for(int i=0;i<=t-p;i++){
    temp=i;
    count=0;
    if(text.substr(i,i+p-1)==pattern){
      max=0;
      break;
    }
    else{
      for(int j=0;j<p;j++){
        if(text[temp++]!=pattern[j]){
          count++;
        }
      }
    if(count<=max)
      max=count;
    }
  }
 cout<<max;
  return 0;
}
          
      }
    if(max>=count)
      max=count;
    }
  }
  cout<<count;
  return 0;
}
          

Compiler output:
a.cc:31:7: error: expected declaration before '}' token
   31 |       }
      |       ^
a.cc:32:5: error: expected unqualified-id before 'if'
   32 |     if(max>=count)
      |     ^~
a.cc:34:5: error: expected declaration before '}' token
   34 |     }
      |     ^
a.cc:35:3: error: expected declaration before '}' token
   35 |   }
      |   ^
a.cc:36:3: error: 'cout' does not name a type
   36 |   cout<<count;
      |   ^~~~
a.cc:37:3: error: expected unqualified-id before 'return'
   37 |   return 0;
      |   ^~~~~~
a.cc:38:1: error: expected declaration before '}' token
   38 | }
      | ^
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 index = 0; index <partT.length();index++){
        partT = T.substring(index, T.length()-changeNum9);
        if(S.indexOf(partT) >= 0){
          result = changeNum;
          break;
        }
      }
      if(result >=0{
        break;
      }
      changeNum++
    }
    
    System.out.println(result);
      
      
      
         
         }}
      
      
      
      

Compiler output:
Main.java:23: error: ')' expected
      if(result >=0{
                   ^
Main.java:26: error: ';' expected
      changeNum++
                 ^
2 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
    string s1,s2;
    int mn=INT_MAX,curr=0;
    cin>>s1>>s2;
    for(int i=0;i<=s1.length()-s2.length();i++){
        curr=0;
        for(int j=i;j<i+s2.length();j++){
            if(s2[j-i]!=s1[j])
                curr++;
        }
        mn=min(mn,curr);
    }

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

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

int main()
{
    int $=1;
    //cin>>$;
    while($--)
    {
        string s,t;cin>>s>>t;
        ll c=0,m=0;
        for(int i=0;i<s.size()-t.size();i++)
        {
            c=0;
            for(int j=0;j<m;j++,k++)
            {
                if(s[i+j]==t[j]) c++;
            }
            m=max(c,m);
        }
        m=t.size()-m;
        cout<<m<<endl;
    }
}


/*
8888888888888888888888888888
    Md. Masud Mazumder
    University of Chittagong
    Department of CSE
8888888888888888888888888888
*/


Compiler output:
a.cc: In function 'int main()':
a.cc:16:33: error: 'k' was not declared in this scope
   16 |             for(int j=0;j<m;j++,k++)
      |                                 ^
Language: C++

#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")

#include <iostream> // cout, endl, cin
#include <iomanip>
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <math.h>
using namespace std;

int main(){
    string S, T;
    getline(cin, S);
    getline(cin, T);
    int s, t;
    s = S.size();
    t = T.size();

    int minC = 1000;
    for(int i = 0; i < s; i++){
        int cnt = 0;
        for(int j = 0; j < t; j++){
            if(i + j >= t){
                cout << minC << endl;
                return 0;
            };
            else if(T.at(j) != S.at(i + j)) cnt++;
        }
        minC = min(minC, cnt);
    }
    cout << minC << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:13: error: 'else' without a previous 'if'
   42 |             else if(T.at(j) != S.at(i + j)) cnt++;
      |             ^~~~
Language: C++

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

typedef long long ll;
typedef unsigned long long ull;

#define MOD 1000000007
#define frn(i,n) for(i=0;i<n;i++)
#define test int t;cin>>t;while(t--)
#define br break
#define pb push_back
#define fast_io ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); 

/*int gcd(int a,int b)
{
	if(a==0)
		return b;
	return( b % a, a);
}
ll power(ll x, ll y, ll p) 
{ 
    ll res = 1; 
    x = x % p;  
    while (y > 0)
    { 
        if (y & 1)
            res = (res * x) % p;
        y = y >> 1; 
        x = (x * x) % p;
    }
    return res; 
}*/
int main() 
{
    fast_io;
    string s,t;
    cin>>s>>t;
    string sub;
    int n,mini=INT_MAX;
    n=t.length();
  m=s.length();
    for(int i=0;i<(m-n);i++)
    {
        sub=s.substr(i,n);
        int c=0;
        for(int j=0;j<n;j++)
        {
            if(t[j]!=sub[j])
            {
                c++;
            }
        }
        mini=min(mini,c);
    }
    cout<<mini;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:42:3: error: 'm' was not declared in this scope
   42 |   m=s.length();
      |   ^
Language: C++

#include <bits/stdc++.h> 
using namespace std; 
  
// Function to find the minimum number of 
// characters to be replaced in string S2, such 
// that S1 is a substring of S2 
int main()
{ string s1,s2;
 cin>>s2>>s1;
    int n = S1.size(), m = S2.size(); 
  
    int ans = INT_MAX; 
    for (int i = 0; i < m - n + 1; i++) { 
        int minRemovedChar=0; 
        for (int j = 0; j < n; j++) { 
            if (S1[j] != S2[i + j]) { 
                minRemovedChar++; 
            } 
        }
        ans = min(minRemovedChar, ans); 
    } 
 
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: 'S1' was not declared in this scope; did you mean 's1'?
   10 |     int n = S1.size(), m = S2.size();
      |             ^~
      |             s1
a.cc:13:25: error: 'm' was not declared in this scope
   13 |     for (int i = 0; i < m - n + 1; i++) {
      |                         ^
a.cc:16:26: error: 'S2' was not declared in this scope; did you mean 's2'?
   16 |             if (S1[j] != S2[i + j]) {
      |                          ^~
      |                          s2
Language: C++

// CPP program to find the minimum number of
// characters to be replaced in string S2, such
// that S1 is a substring of S2

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <queue>
#include <deque>
#include <bitset>
#include <iterator>
#include <list>
#include <stack>
#include <map>
#include <unordered_map>
#include <set>
#include <functional>
#include <numeric>
#include <utility>
#include <limits>
#include <time.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>using namespace std;

// Function to find the minimum number of
// characters to be replaced in string S2, such
// that S1 is a substring of S2
int minimumChar(string S1, string S2)
{
    // Get the sizes of both strings
    int n = S1.size(), m = S2.size();

    int ans = INT_MAX;

    // Traverse the string S2
    for (int i = 0; i < m - n + 1; i++)
    {
        int minRemovedChar = 0;

        // From every index in S2, check the number of
        // mis-matching characters in substring of
        // length of S1
        for (int j = 0; j < n; j++)
        {
            if (S1[j] != S2[i + j])
            {
                minRemovedChar++;
            }
        }

        // Take minimum of prev and current mis-match
        ans = min(minRemovedChar, ans);
    }

    // return answer
    return ans;
}

// Driver Code
int main()
{
    string S1, S2;
    cin >> S1 >> S2;

    cout << minimumChar(S2, S1);

    return 0;
}


Compiler output:
a.cc:28:26: warning: extra tokens at end of #include directive
   28 | #include <assert.h>using namespace std;
      |                          ^~~~~~~~~
a.cc:28:10: fatal error: assert.h>usin: No such file or directory
   28 | #include <assert.h>using namespace std;
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

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

#define MAX 2000

void change(char*, char,int ,int );
int co(char*, char*, int, int);

int main()
{
	char s[MAX];
	char t[MAX];
	char search[MAX];
	int min, c;
	int count = 0;
	int cu=0;

	scanf("%s", s);
	scanf("%s", t);

	if(strcmp(s,t)!=0) {
		min = strlen(s);
		for (int i = 0; i < strlen(s) - strlen(t) + 1; i++) {
			change(search, s, i, strlen(t));
			count = co(search, t, 0, strlen(search));
			if (count < min) 
				min = count;
		}

		count = min;

	}

	printf("%d\n", count);

	return 0;
}

int co(char* search, char* s, int start, int length)
{
	int count = 0;

	for (int i = 0; i < length; i++) {
		if (s[start + i] != search[i])
			count++;
	}

	return count;
}

void change(char* search, char* s,int start,int length)
{
	int i;

	search[0] = '\0';

	for (i = 0; i < length; i++) 
		search[i] = s[start + i];

	search[i] = '\0';

}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:40: error: invalid conversion from 'char*' to 'char' [-fpermissive]
   25 |                         change(search, s, i, strlen(t));
      |                                        ^
      |                                        |
      |                                        char*
a.cc:7:20: note:   initializing argument 2 of 'void change(char*, char, int, int)'
    7 | void change(char*, char,int ,int );
      |                    ^~~~
Language: Java

import java.util.Scanner;
public class MainB {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		String t = scan.next();
		char[] cs = new char[s.length()];
		char[] ct = new char[t.length()];
		boolean[] count = new boolean[1001];
		int max = 0;
		
		for(int i=0;i<s.length();i++) {
			cs[i] = s.charAt(i);
		}
		
		for(int i=0;i<t.length();i++) {
			ct[i] = t.charAt(i);
		}
		
		for(int i=0;i<=s.length()-t.length();i++) {
			int n = 0;
			for(int j=0;j<t.length();j++) {
				if(cs[i+j] == ct[j]) {
					n++;
				}
			}
			max = Math.max(max, n);
			count[n] = true;
		}
		
		System.out.println(t.length()-max);

	}

}

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

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
  string s; string t;
  cin>>s;
  cin>>t;
  ll sl=s.length();
  ll tl=t.length();
  ll min=INT_MAX;
  for(ll i=0;i<=sl-tl;i++)
  {
    string st=s.substr(i,tl);
    for(ll j=0;j<tl;j++)
    {
      if(st[j]!=t[j])
        c++;
    }
    if(c<min)
      min=c;
  }
  return 0;
 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:9: error: 'c' was not declared in this scope
   18 |         c++;
      |         ^
a.cc:20:8: error: 'c' was not declared in this scope
   20 |     if(c<min)
      |        ^
Language: C++

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

int main(){
  string s,t;
  cin >> s;
  cin >> t;
  int num = 0;
  for(int i = t.size(); i > 0 ; i--){
    for(int j = 0; j < i; j++){
      auto aaa = s.find(t.substr(j,i-j));
      if(aaa <= 1000){
        num = t.size() - i;
        cout << num;
        return 0;
    }
  }
}


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

#include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i=0;i<(int)(n);i++)
using ll = long long;
using P = pair<int, int>;
int main(){
    string s, t;
    cin >> s >> t;
    int i=0,sz;
    if (s.size()==t.size()){
      sz=1;
    } else {
      sx=s.size()-t.size();
    }
    vector<int> zure(sz,0);
    do{
        rep(j, t.size()){
            if(s[i+j]!=t[j]){
                zure[i]++;
            }
        }
        i++;
    }while(i< s.size()-t.size());
    sort(zure.begin(),zure.end());
    cout << zure[0] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:7: error: 'sx' was not declared in this scope; did you mean 'sz'?
   13 |       sx=s.size()-t.size();
      |       ^~
      |       sz
Language: C++

import sys
input = lambda: sys.stdin.readline().rstrip()

def main():
    s = input()
    t = input()
    
    ans = 100000
    for i in range(len(s)-len(t)+1):
        tmp = s[i:i+len(t)]
        cnt = 0
        for j in range(len(t)):
            if t[j] != tmp[j]:
                cnt += 1
        ans = min(ans, cnt)
        
    print(ans)
    
if __name__ == '__main__':
    main()

Compiler output:
a.cc:19:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   19 | if __name__ == '__main__':
      |                ^~~~~~~~~~
a.cc:1:1: error: 'import' does not name a type
    1 | import sys
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include<iostream>
using namespace std;
int main()
{
  string s,t;
  cin>>s>>t;
  int i,l1,l2,ans;
  ans=INT_MAX;
  for(i=0;i<l1-l2+1;i++)
  {
    int remchar=0;
    for(int j=0;j<l2;j++)
    {
      if(s[j]!=t[i+j])
      {
        remchar++;
      }
    }
    ans=min(remchar,ans);
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: 'INT_MAX' was not declared in this scope
    8 |   ans=INT_MAX;
      |       ^~~~~~~
a.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    1 | #include<iostream>
  +++ |+#include <climits>
    2 | using namespace std;
Language: C++

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

int main(){
  string S, T;
  int sum_of_substr;
  cin >> S >> T;
  if (S.size() >= T.size()){
    for (int i = 0; i <= S.size() - T.size(); i++){
      if (T == S.substr(i, T.size())){
        sum_of_substr++;
      }
    }
  }
  cout << sum_of_str << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:11: error: 'sum_of_str' was not declared in this scope; did you mean 'sum_of_substr'?
   15 |   cout << sum_of_str << endl;
      |           ^~~~~~~~~~
      |           sum_of_substr
Language: C++

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


//defines...
#define ll long long
#define tata return;
#define pb push_back
#define mp make_pair
#define in insert
#define run ios_base::sync_with_stdio(false);cin.tie(NULL);
#define yes cout<<"Yes"<<endl;
#define no cout<<"No"<<endl;
#define vec vector<ll>
#define setl set<ll>
#define mapl map<ll,ll>
#define shunno cout<<0<<endl;
#define pi 2*acos(0.0)1
#define hobena cout<<-1<<endl;








void oka()
{
    string a,b;
    cin>>a>>b;
    ll i,j,k,mx=0,cnt=0;

        for(k=0;k<b.size();k++){
                j=k;
                for(i=0;i<a.size();i++){
        if(a[i]==b[j]&&j<=i)
            j++,cnt++;
        else
            mx=max(mx,cnt),j=k,cnt=0;
        }

    }
    mx=max(mx,cnt)
    //cout<<mx<<endl;
    cout<<min((ll)b.size(),(ll)b.size()-mx)<<endl;





}






int main()
{
   //string g="abcd";
    //g.erase(g.begin()+3);
    //cout<<g<<endl;
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);

    run
    ll i,t;
    t=1;
   //cin>>t;


    for(i=1;i<=t;i++)
    {


    oka();
    }






}


Compiler output:
a.cc: In function 'void oka()':
a.cc:44:19: error: expected ';' before 'cout'
   44 |     mx=max(mx,cnt)
      |                   ^
      |                   ;
   45 |     //cout<<mx<<endl;
   46 |     cout<<min((ll)b.size(),(ll)b.size()-mx)<<endl;
      |     ~~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
  string s,t;
  cin>>s>>t;
  int i,l1,l2,ans;
  ans=2000;
  for(i=0;i<l1-l2+1;i++)
  {
    int remchar=0;
    for(j=0;j<l2;j++)
    {
      if(s[j]!=t[i+j])
      {
        remchar++;
      }
    }
    ans=min(remchar,ans);
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'j' was not declared in this scope
   12 |     for(j=0;j<l2;j++)
      |         ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i=0;i<(int)(n);i++)
using ll = long long;
using P = pair<int, int>;
int main(){
    string s, t;
    cin >> s >> t;
    int i=0;
    if (s.size()==t.size()){
      vector<int> zure(1,0);
    } else {
      vector<int> zure(s.size()-t.size(),0);
    }
    do{
        rep(j, t.size()){
            if(s[i+j]!=t[j]){
                zure[i]++;
            }
        }
        i++;
    }while(i< s.size()-t.size());
    sort(zure.begin(),zure.end());
    cout << zure[0] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:17: error: 'zure' was not declared in this scope
   18 |                 zure[i]++;
      |                 ^~~~
a.cc:23:10: error: 'zure' was not declared in this scope
   23 |     sort(zure.begin(),zure.end());
      |          ^~~~
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);
             
    		if(S.contains(Tt[i])){
        		x = Tl - i + 1;
        	}
        	else{
       			break;
       		}
         }
    }
 }

Compiler output:
Main.java:7: error: cannot find symbol
    	int Tl = T.length;	
    	          ^
  symbol:   variable length
  location: variable T of type String
1 error
Language: C++

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

int main(){
  string S, T;
  int sum_of_substr = 0;
  cin >> S >> T;
  if (S.size() >= T.size()){
    for (int i = 0; i <= S.size() - T.size(); i++){
      if (T == S.substr(i, T.size())){
        sum_of_str++;
      }
    }
  }
  cout << sum_of_str << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'sum_of_str' was not declared in this scope; did you mean 'sum_of_substr'?
   11 |         sum_of_str++;
      |         ^~~~~~~~~~
      |         sum_of_substr
a.cc:15:11: error: 'sum_of_str' was not declared in this scope; did you mean 'sum_of_substr'?
   15 |   cout << sum_of_str << endl;
      |           ^~~~~~~~~~
      |           sum_of_substr
Language: C++

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

using namespace std;

char s[1010];
char t[1010];

int main() {
  int l1, l2;
  scanf ("%s%s", s, t)
  l1 = strlen(s);
  l2 = strlen(t);
  int ans = 1010;
  for (int i = 0; i + l2 < l1; i++) {
    int ts = 0;
    for (int j = i; j < i + l2; j++) {
      ts += s[i] != t[j];
    }
    ans = min(ans, ts);
  }
  printf("%d\n", ans);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:23: error: expected ';' before 'l1'
   12 |   scanf ("%s%s", s, t)
      |                       ^
      |                       ;
   13 |   l1 = strlen(s);
      |   ~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
  string s,t;
  cin>>s>>t;
  int i,l1,l2,ans;
  ans=INT_MAX;
  for(i=0;i<l1-l2+1;i++)
  {
    int remchar=0;
    for(j=0;j<l2;j++)
    {
      if(s[j]!=t[i+j])
      {
        remchar++;
      }
    }
    ans=min(remchar,ans);
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: 'INT_MAX' was not declared in this scope
    8 |   ans=INT_MAX;
      |       ^~~~~~~
a.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    1 | #include<iostream>
  +++ |+#include <climits>
    2 | using namespace std;
a.cc:12:9: error: 'j' was not declared in this scope
   12 |     for(j=0;j<l2;j++)
      |         ^
Language: C++

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

int main(){
  string S, T;
  int sum_of_substr;
  cin >> S >> T;
  if (S.size() >= T.size()){
    for (int i = 0; i <= S.size() - T.size(); i++){
      if (T == S.substr(i, T.size())){
        sum_of_str++;
      }
    }
  }
  cout << sum_of_str << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'sum_of_str' was not declared in this scope; did you mean 'sum_of_substr'?
   11 |         sum_of_str++;
      |         ^~~~~~~~~~
      |         sum_of_substr
a.cc:15:11: error: 'sum_of_str' was not declared in this scope; did you mean 'sum_of_substr'?
   15 |   cout << sum_of_str << endl;
      |           ^~~~~~~~~~
      |           sum_of_substr
Language: C

#include<stdio.h>
#include<string.h>
int main(void){
  char s[1000],t[1000];
  scanf("%s %s",s,t);
  int i;count[strlen(s)-strlen(t)],p,j,min;
  for(i=0;i<strlen(s)-strlen(t)+1;i++){
    count[i]=0;
    for(j=i,p=0;j<i+strlen(t);j++,p++){
      if(s[j]!=t[p])count[i]++;
    }
  }
  for(i=1,min=count[0];i<strlen(s);i++){
    if(min>count[i])min=count[i];
  }
  printf("%d",min);
  return 0;
}
  
  


Compiler output:
main.c: In function 'main':
main.c:6:9: error: 'count' undeclared (first use in this function)
    6 |   int i;count[strlen(s)-strlen(t)],p,j,min;
      |         ^~~~~
main.c:6:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:36: error: 'p' undeclared (first use in this function)
    6 |   int i;count[strlen(s)-strlen(t)],p,j,min;
      |                                    ^
main.c:6:38: error: 'j' undeclared (first use in this function)
    6 |   int i;count[strlen(s)-strlen(t)],p,j,min;
      |                                      ^
main.c:6:40: error: 'min' undeclared (first use in this function); did you mean 'main'?
    6 |   int i;count[strlen(s)-strlen(t)],p,j,min;
      |                                        ^~~
      |                                        main
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);
             
    		if(S.contains(Tl[i])){
        		x = tl - i + 1;
        	}
        	else{
       			break;
       		}
         }
    }
 }

Compiler output:
Main.java:7: error: cannot find symbol
    	int Tl = T.length;	
    	          ^
  symbol:   variable length
  location: variable T of type String
Main.java:14: error: array required, but int found
    		if(S.contains(Tl[i])){
    		                ^
Main.java:15: error: cannot find symbol
        		x = tl - i + 1;
        		    ^
  symbol:   variable tl
  location: class Main
3 errors
Language: C++

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

int main() {
  string S, T;
  cin >> S >> T;
  int ans = T.size();
  for (int i = 0; i < (int)S.size() - (int)T.size() + 1; i++){
    int cnt = 0;
    for (int j = 0; j < T.size(); j++){
      if (T[j] == S[i + j]) cnt++;
    }
    ans = min(ans, T.size() - cnt);
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:14: error: no matching function for call to 'min(int&, std::__cxx11::basic_string<char>::size_type)'
   13 |     ans = min(ans, T.size() - cnt);
      |           ~~~^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:13:14: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'})
   13 |     ans = min(ans, T.size() - cnt);
      |           ~~~^~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:13:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   13 |     ans = min(ans, T.size() - cnt);
      |           ~~~^~~~~~~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
string s,c;
  cin>>s>>c;int sum=0,ma=INT_MAX;
  for(long int i=0;i<s.length()-c.length()+1;i++){int k=0;sum=0;
  for(long int j=i;j<i+c.length();j++){
  if(s[j]==c[k])
    sum++;
    k++;
  
  }
  ma=min(ma,(c.length()-sum));
  
  }

cout<<ma;

return 0;}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: no matching function for call to 'min(int&, std::__cxx11::basic_string<char>::size_type)'
   13 |   ma=min(ma,(c.length()-sum));
      |      ~~~^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:13:9: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'})
   13 |   ma=min(ma,(c.length()-sum));
      |      ~~~^~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:13:9: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   13 |   ma=min(ma,(c.length()-sum));
      |      ~~~^~~~~~~~~~~~~~~~~~~~~
Language: C

#include<stdio.h>
#include<string.h>
int main(void){
char a[1000],b[1000];
int c,d,count1=0,count2=0,count3=0;
while(1){
c=scanf("%s",&a);
if(c==0)break;
}
while(1){
d=scanf("%s",&b);
if(d==0)break;
}
count1=strlen(a);
count2=strlen(b);
for(int i=0;i<count1;i++){
if(a[i]==b[0])break;
}
for(int j=0;j<count2;j++){
if(a[ i+j]!=b[j]) count3++;
}
printf("%d",count3);
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:20:7: error: 'i' undeclared (first use in this function)
   20 | if(a[ i+j]!=b[j]) count3++;
      |       ^
main.c:20:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  string s,t;
  cin>>s>>t;
  int n=s.length();
  int m=t.length();
  int i,j,c,ans=0;
  for(i=0;i<=n-m;i++)
  {
    c=0;
    for(j=i;j<i+m;j++)
    {
      if(s[j]==t[j-i]
         c++;
    }
    ans=max(ans,c);
  }
  cout<<m-ans;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:22: error: expected ';' before 'c'
   15 |       if(s[j]==t[j-i]
      |                      ^
      |                      ;
   16 |          c++;
      |          ~            
a.cc:17:5: error: expected primary-expression before '}' token
   17 |     }
      |     ^
a.cc:16:14: error: expected ')' before '}' token
   16 |          c++;
      |              ^
      |              )
   17 |     }
      |     ~         
a.cc:15:9: note: to match this '('
   15 |       if(s[j]==t[j-i]
      |         ^
a.cc:17:5: error: expected primary-expression before '}' token
   17 |     }
      |     ^
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);
             
    		if(S.contains(Tl[i])){
        		x = tl - i + 1;
        	}
        	else{
       			break;
       		}
         }
    }
 }

Compiler output:
Main.java:7: error: cannot find symbol
    	int tl = T.length;	
    	          ^
  symbol:   variable length
  location: variable T of type String
Main.java:8: error: cannot find symbol
        String[] Tt = new String[Tl];
                                 ^
  symbol:   variable Tl
  location: class Main
Main.java:11: error: cannot find symbol
      	for (int i = 0; i < Tl; i++){
      	                    ^
  symbol:   variable Tl
  location: class Main
Main.java:14: error: cannot find symbol
    		if(S.contains(Tl[i])){
    		              ^
  symbol:   variable Tl
  location: class Main
4 errors
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){
  string s, t;
  cin >> s;
  cin >> t;
  int k = (int)s.size() - (int)t.size();
  int ans = 1e9;
  for(int i = 0; i <= k; i++){
    int x = 0;
    for(int j = 0; j < (int)t.size(); j++){
      if(s[i+j] != t[j]){
        x++;
      }
    }
    if(x < ans) ans = x;
  }
  cout << ans;
  return 0;
}
}

Compiler output:
a.cc:22:1: error: expected declaration before '}' token
   22 | }
      | ^
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);
             
    		if(S.contains(Tl[i]){
        		x = tl - i + 1;
        	}
        	else{
       			break;
       		}
         }
    }
 }

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

#include<stdio.h>
#include<string.h>
int main(void){
char a[1000],b[1000];
int c,d,count1=0,count2=0,count3=0;
while(1){
c=scanf("%s",&a);
if(c==0)break;
}
while(1){
d=scanf("%s",&b);
if(d==0)break;
}
count1=strlen(a);
count2=strlen(b);
for(int i=0;i<count1;i++){
if(a[i]==b[0])break;
}
for(int j=0;j<count2;j++){
if(a[i+j]!=b[j]) count3++;
}
printf("%d",count3);
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:20:6: error: 'i' undeclared (first use in this function)
   20 | if(a[i+j]!=b[j]) count3++;
      |      ^
main.c:20:6: note: each undeclared identifier is reported only once for each function it appears in
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);
             
    		if(S.contains(Tl[i]){
        		x = tl - i + 1;
        	}
        	else{
       			break;
       		}
         }
    }
 }

Compiler output:
Main.java:8: error: ';' expected
        String[] Tt = new String[Tl]
                                    ^
Main.java:14: error: ')' expected
    		if(S.contains(Tl[i]){
    		                    ^
2 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  string s,t;
  cin>>s>>t;
  int n=s.length();
  int m=t.length();
  int i,j,c,ans=0;
  for(i=0;i<=n-m;i++)
  {
    c=0;
    for(j=i;j<i+m;ij++)
    {
      if(s[j]==t[j-i]
         c++;
    }
    ans=max(ans,c);
  }
  cout<<m-ans;
  return 0;
}
         
      

Compiler output:
a.cc: In function 'int main()':
a.cc:13:19: error: 'ij' was not declared in this scope; did you mean 'j'?
   13 |     for(j=i;j<i+m;ij++)
      |                   ^~
      |                   j
a.cc:15:22: error: expected ';' before 'c'
   15 |       if(s[j]==t[j-i]
      |                      ^
      |                      ;
   16 |          c++;
      |          ~            
a.cc:17:5: error: expected primary-expression before '}' token
   17 |     }
      |     ^
a.cc:16:14: error: expected ')' before '}' token
   16 |          c++;
      |              ^
      |              )
   17 |     }
      |     ~         
a.cc:15:9: note: to match this '('
   15 |       if(s[j]==t[j-i]
      |         ^
a.cc:17:5: error: expected primary-expression before '}' token
   17 |     }
      |     ^
Language: C++

#coding: utf-8

S = input()
T = input()

match = len(T) 
for i in range(len(S) - len(T)):
    cand = len(T)
    for j in range(len(T)):
        if S[i+j] == T[j]:
            cand -= 1
    match = min(cand, match)

print(match)


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #coding
    1 | #coding: utf-8
      |  ^~~~~~
a.cc:3:1: error: 'S' does not name a type
    3 | S = input()
      | ^