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

#include<stdio.h>
#include<string.h>
int main(void)
{
	char s[1001],t[1001];
	int min,i,j,len1,len2,cnt,mn;
	min=1000000;
	cnt=0;
	scanf("%s %s",s,t);
	len1=strlen(s);
	len2=strlen(t);
	for(i=0;i<len1-len2+1;i++){
		for(j=0;j<len2;j++){
			if(s[i+j]!=t[j]){]
			cnt++;
			}
			mn=min(cnt,mn)
			}
		}
			printf("%d\n",cnt);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:42: error: expected statement before ']' token
   14 |                         if(s[i+j]!=t[j]){]
      |                                          ^
main.c:17:28: error: called object 'min' is not a function or function pointer
   17 |                         mn=min(cnt,mn)
      |                            ^~~
main.c:6:13: note: declared here
    6 |         int min,i,j,len1,len2,cnt,mn;
      |             ^~~
main.c:17:39: error: expected ';' before '}' token
   17 |                         mn=min(cnt,mn)
      |                                       ^
      |                                       ;
   18 |                         }
      |                         ~              
main.c: At top level:
main.c:22:9: error: expected identifier or '(' before 'return'
   22 |         return 0;
      |         ^~~~~~
main.c:23:1: error: expected identifier or '(' before '}' token
   23 | }
      | ^
Language: C

#include<stdio.h>
#include<string.h>
int main(void)
{
	char s[1001],t[1001];
	int min,i,j,len1,len2,cnt,mn;
	min=1000000;
	cnt=0;
	scanf("%s %s",s,t);
	len1=strlen(s);
	len2=strlen(t);
	for(i=0;i<len1-len2+1;i++){
		for(j=0;j<len2;j++){
			if(s[i+j]!=t[j]){]
			cnt++;
			}
			mn=min(cnt,mn)
			}
		}
	}
	printf("%d\n",cnt);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:42: error: expected statement before ']' token
   14 |                         if(s[i+j]!=t[j]){]
      |                                          ^
main.c:17:28: error: called object 'min' is not a function or function pointer
   17 |                         mn=min(cnt,mn)
      |                            ^~~
main.c:6:13: note: declared here
    6 |         int min,i,j,len1,len2,cnt,mn;
      |             ^~~
main.c:17:39: error: expected ';' before '}' token
   17 |                         mn=min(cnt,mn)
      |                                       ^
      |                                       ;
   18 |                         }
      |                         ~              
main.c: At top level:
main.c:21:16: error: expected declaration specifiers or '...' before string constant
   21 |         printf("%d\n",cnt);
      |                ^~~~~~
main.c:21:23: error: unknown type name 'cnt'; did you mean 'int'?
   21 |         printf("%d\n",cnt);
      |                       ^~~
      |                       int
main.c:22:9: error: expected identifier or '(' before 'return'
   22 |         return 0;
      |         ^~~~~~
main.c:23:1: error: expected identifier or '(' before '}' token
   23 | }
      | ^
Language: C

#include<stdio.h>
#include<string.h>
int main(void)
{
	char s[1001],t[1001];
	int min,i,j,len1,len2,cnt,mn;
	min=1000000;
	cnt=0;
	scanf("%s %s",s,t);
	len1=strlen(s);
	len2=strlen(t);
	for(i=0;i<len1-len2+1;i++){
		for(j=0;j<len2;j++){
			if(s[i+j]!=t[j]){]
			cnt++;
			}
			mn=min(cnt,mn)
			printf("%d\n",cnt);
			}
		}
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:42: error: expected statement before ']' token
   14 |                         if(s[i+j]!=t[j]){]
      |                                          ^
main.c:17:28: error: called object 'min' is not a function or function pointer
   17 |                         mn=min(cnt,mn)
      |                            ^~~
main.c:6:13: note: declared here
    6 |         int min,i,j,len1,len2,cnt,mn;
      |             ^~~
main.c:17:39: error: expected ';' before 'printf'
   17 |                         mn=min(cnt,mn)
      |                                       ^
      |                                       ;
   18 |                         printf("%d\n",cnt);
      |                         ~~~~~~         
main.c: At top level:
main.c:22:9: error: expected identifier or '(' before 'return'
   22 |         return 0;
      |         ^~~~~~
main.c:23:1: error: expected identifier or '(' before '}' token
   23 | }
      | ^
Language: C

#include<stdio.h>
#include<string.h>
int main(void)
{
	char s[1001],t[1001];
	int min,i,j,len1,len2;
	min=1000000;
	cnt=0;
	scanf("%s %s",s,t);
	len1=strlen(s);
	len2=strlen(t);
	for(i=0;i<len1-len2+1;i++){
		for(j=0;j<len2;j++){
			if(min>t[i+j]){
			min=t[i+j];
			cnt++;
			printf("%d\n",cnt);
			}
		}
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:9: error: 'cnt' undeclared (first use in this function); did you mean 'int'?
    8 |         cnt=0;
      |         ^~~
      |         int
main.c:8:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include<string.h>
int main(void)
{
	char s[1001],t[1001];
	int min;
	min=1000000;
	scanf("%s %s",s,t);
	len1=string(s);
	len2=string(t);
	for(i=0;i<len1-len2+1;i++){
		for(j=0;j<len2;j++){
			if(min>t[j]){
			min=t[i+j];
			}
		}
	}
	printf("%d\n",min);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:9: error: 'len1' undeclared (first use in this function)
    9 |         len1=string(s);
      |         ^~~~
main.c:9:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:14: error: implicit declaration of function 'string'; did you mean 'stdin'? [-Wimplicit-function-declaration]
    9 |         len1=string(s);
      |              ^~~~~~
      |              stdin
main.c:10:9: error: 'len2' undeclared (first use in this function)
   10 |         len2=string(t);
      |         ^~~~
main.c:11:13: error: 'i' undeclared (first use in this function)
   11 |         for(i=0;i<len1-len2+1;i++){
      |             ^
main.c:12:21: error: 'j' undeclared (first use in this function)
   12 |                 for(j=0;j<len2;j++){
      |                     ^
Language: Java

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        String T = sc.next();
        int changeCount =  T.length();
        //比較する最初の文字を決める
        for(int start=0; start<=S.length()-T.length(); start++) {
            int count = 0;
            for(int i=0; i<T.length(); i++) {
                if(S[start] != T[i])  {
                    count ++;
                }
            }
            if(changeCount > count) {
                changeCount = count;
            }
        }
        System.out.println(changeCount);
    }
}

Compiler output:
Main.java:13: error: array required, but String found
                if(S[start] != T[i])  {
                    ^
Main.java:13: error: array required, but String found
                if(S[start] != T[i])  {
                                ^
2 errors
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;

public class B {
	public static void main(String[] args) {
		FastScanner sc = new FastScanner(System.in);
		char[] s = sc.next().toCharArray();
		char[] ss = sc.next().toCharArray();
		int[] a = new int[ss.length];
		for(int i = 0; i < s.length - ss.length; i++) {
			int count = 0;
			int k = 0;
			for(int j = 0; j < ss.length; j++) {
				if(ss[i+k] == s[j+i]) {
					k++;
					count++;
				}
			}
			a[i] = count;
		}
		Arrays.sort(a);
		System.out.println(ss.length-a[ss.length-1]);
	}

	static class FastScanner {
		private BufferedReader reader = null;
	    private StringTokenizer tokenizer = null;
	    public FastScanner(InputStream in) {
	        reader = new BufferedReader(new InputStreamReader(in));
	        tokenizer = null;
	    }

	    public String next() {
	        if (tokenizer == null || !tokenizer.hasMoreTokens()) {
	            try {
	                tokenizer = new StringTokenizer(reader.readLine());
	            } catch (IOException e) {
	                throw new RuntimeException(e);
	            }
	        }
	        return tokenizer.nextToken();
	    }

	    public String nextLine() {
	        if (tokenizer == null || !tokenizer.hasMoreTokens()) {
	            try {
	                return reader.readLine();
	            } catch (IOException e) {
	                throw new RuntimeException(e);
	            }
	        }

	        return tokenizer.nextToken("\n");
	    }

	    public long nextLong() {
	        return Long.parseLong(next());
	    }

	    public int nextInt() {
	        return Integer.parseInt(next());
	    }

	    public double nextDouble() {
	         return Double.parseDouble(next());
	     }

	    public int[] nextIntArray(int n) {
	        int[] a = new int[n];
	        for (int i = 0; i < n; i++)
	            a[i] = nextInt();
	        return a;
	    }

	    public long[] nextLongArray(int n) {
	        long[] a = new long[n];
	        for (int i = 0; i < n; i++)
	            a[i] = nextLong();
	        return a;
	    }
	}
}


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

//| #######################|
//|  ADARSH SINGH KUSHWAHA |
//| ###################### |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define Bahut_tej_gand_faad ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
#define fr(i,a,b) for(ll i=a;i<b;i++)
#define frb(i, a, b) for(ll i = a - 1; i >= b; i--)
#define pb push_back
#define ff first
#define ss second
#define mp map<ll,ll>
#define mps map<char,ll>
#define v vector<ll>
#define srt(v) sort(v.begin(),v.end())
#define mod 1000000007
#define max 1000001
void solve() {
    string s, t;
    cin >> s;
    cin >> t;
    ll  ans = INT_MAX;
    for (ll i = 0; i <= s.size() - t.size(); i++) {
        c = 0;
        for (ll j = 0; j < t.size(); j++) {
            if (s[i + j] != t[j]) {
                c++;
            }
        }
        if (c < ans) {
            ans = c;
        }
    }
    cout << ans << endl;
}
int main() {
    Bahut_tej_gand_faad;
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    //int t;
    //cin >> t;
    //while (t--) {
    solve();
    //}
    return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:25:9: error: 'c' was not declared in this scope
   25 |         c = 0;
      |         ^
Language: C++

//| #######################|
//|  ADARSH SINGH KUSHWAHA |
//| ###################### |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define Bahut_tej_gand_faad ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
#define fr(i,a,b) for(ll i=a;i<b;i++)
#define frb(i, a, b) for(ll i = a - 1; i >= b; i--)
#define pb push_back
#define ff first
#define ss second
#define mp map<ll,ll>
#define mps map<char,ll>
#define v vector<ll>
#define srt(v) sort(v.begin(),v.end())
#define mod 1000000007
#define max 1000001
void solve() {
    string s, t;
    cin >> s;
    cin >> t;
    ll ans = INT_MAX;
    for (ll i = 0; i < =s.size() - t.size(); i++) {
        ll c = 0;
        for (ll j = 0; j < t.size(); j++) {
            if (s[i + j] != t[j]) {
                c++;
            }
        }
        if (c < ans) {
            ans = c;
        }
    }
    cout << ans << endl;
}
int main() {
    Bahut_tej_gand_faad;
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    //int t;
    //cin >> t;
    //while (t--) {
    solve();
    //}
    return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:24:24: error: expected primary-expression before '=' token
   24 |     for (ll i = 0; i < =s.size() - t.size(); i++) {
      |                        ^
Language: C++

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

     long long int n,i,j=1,c=0,f=10000000000,l,k,x,y,z,m,b,a=10000000;
     string s,w,s1;
     cin>>s>>w;
       for(i=0;i<s.length();i++)
       {
           c=0;
            s1=s.substr(i,w.length());
               for(j=0;j<w.length();j++)
               {
                   if(s1[j]==w[j])
                    c++;
                       
           }
          a=min(a,w.length()-c);
          
       }
       cout<<a<<endl;
      }


Compiler output:
a.cc: In function 'int main()':
a.cc:19:16: error: no matching function for call to 'min(long long int&, long long unsigned int)'
   19 |           a=min(a,w.length()-c);
      |             ~~~^~~~~~~~~~~~~~~~
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:19:16: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'long long unsigned int')
   19 |           a=min(a,w.length()-c);
      |             ~~~^~~~~~~~~~~~~~~~
/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:19:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   19 |           a=min(a,w.length()-c);
      |             ~~~^~~~~~~~~~~~~~~~
Language: C++

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

     long long int n,i,j=1,c=0,f=10000000000,l,k,x,y,z,m,b,a=10000000;
     string s,w,s1;
     cin>>s>>w;
       for(i=0;i<s.length();i++)
       {
           c=0;
            s1=s.substr(i,w.length());
               for(j=0;j<w.length();j++)
               {
                   if(s1[j]==w[j])
                    c++;
                        //cout<<s[j]<<" "<<w[j]<<endl;
           }
          a=min(a,w.length()-c);
          //break;
       }
       cout<<a<<endl;
      }

Compiler output:
a.cc: In function 'int main()':
a.cc:19:16: error: no matching function for call to 'min(long long int&, long long unsigned int)'
   19 |           a=min(a,w.length()-c);
      |             ~~~^~~~~~~~~~~~~~~~
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:19:16: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'long long unsigned int')
   19 |           a=min(a,w.length()-c);
      |             ~~~^~~~~~~~~~~~~~~~
/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:19:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   19 |           a=min(a,w.length()-c);
      |             ~~~^~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
//f<<":"<<endl;
     long long int n,i,j=1,c=0,f=10000000000,l,k,x,y,z,m,b,a=10000000;
     string s,w="",s1;
     char o;
     set <int, greater <int> > st;
     stack<string>sta,backk,forwardd;
     //int a[5];
    //long long  int arr[n+2][n+2];
     vector<char>ch(27);
     vector<string>str;
     vector<int>vect,vect3;
     map<long long int ,long long int>mp;
       cin>>s>>w;
       for(i=0;i<s.length();i++)
       {
           c=0;
            s1=s.substr(i,w.length());
               for(j=0;j<w.length();j++)
               {
                   if(s1[j]==w[j])
                    c++;
                        //cout<<s[j]<<" "<<w[j]<<endl;
           }
          a=min(a,w.length()-c);
          //break;
       }
       cout<<a<<endl;
      }



Compiler output:
a.cc: In function 'int main()':
a.cc:28:16: error: no matching function for call to 'min(long long int&, long long unsigned int)'
   28 |           a=min(a,w.length()-c);
      |             ~~~^~~~~~~~~~~~~~~~
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:28:16: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'long long unsigned int')
   28 |           a=min(a,w.length()-c);
      |             ~~~^~~~~~~~~~~~~~~~
/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:28:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   28 |           a=min(a,w.length()-c);
      |             ~~~^~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
//f<<":"<<endl;
     long long int n,i,j=1,c=0,f=10000000000,l,k,x,y,z,m,b,a=10000000;
     string s,w="",s1;
     char o;
     set <int, greater <int> > st;
     stack<string>sta,backk,forwardd;
     //int a[5];
    //long long  int arr[n+2][n+2];
     vector<char>ch(27);
     vector<string>str;
     vector<int>vect,vect3;
     map<long long int ,long long int>mp;
       cin>>s>>w;
       for(i=0;i<s.length();i++)
       {
           c=0;
            s1=s.substr(i,w.length());
               for(j=0;j<w.length();j++)
               {
                   if(s1[j]==w[j])
                    c++;
                        //cout<<s[j]<<" "<<w[j]<<endl;
           }
          a=min(a,w.length()-c);
          //break;
       }
       cout<<a<<endl;
      }


Compiler output:
a.cc: In function 'int main()':
a.cc:28:16: error: no matching function for call to 'min(long long int&, long long unsigned int)'
   28 |           a=min(a,w.length()-c);
      |             ~~~^~~~~~~~~~~~~~~~
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:28:16: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'long long unsigned int')
   28 |           a=min(a,w.length()-c);
      |             ~~~^~~~~~~~~~~~~~~~
/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:28:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   28 |           a=min(a,w.length()-c);
      |             ~~~^~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
//f<<":"<<endl;
     long long int n,i,j=1,c=0,f=10000000000,l,k,x,y,z,m,b,a=10000000;
     string s,w="",s1;
     char o;
     set <int, greater <int> > st;
     stack<string>sta,backk,forwardd;
     //int a[5];
    //long long  int arr[n+2][n+2];
     vector<char>ch(27);
     vector<string>str;
     vector<int>vect,vect3;
     map<long long int ,long long int>mp;
       cin>>s>>w;
       for(i=0;i<s.length();i++)
       {
           c=0;
            s1=s.substr(i,w.length());
               for(j=0;j<w.length();j++)
               {
                   if(s1[j]==w[j])
                    c++;
                        //cout<<s[j]<<" "<<w[j]<<endl;
           }
          a=min(a,w.length()-c);
          //break;
       }
       cout<<a<<endl;
      }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:16: error: no matching function for call to 'min(long long int&, long long unsigned int)'
   28 |           a=min(a,w.length()-c);
      |             ~~~^~~~~~~~~~~~~~~~
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:28:16: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'long long unsigned int')
   28 |           a=min(a,w.length()-c);
      |             ~~~^~~~~~~~~~~~~~~~
/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:28:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   28 |           a=min(a,w.length()-c);
      |             ~~~^~~~~~~~~~~~~~~~
a.cc: At global scope:
a.cc:33:1: error: expected declaration before '}' token
   33 | }
      | ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  string s,t;cin>>s>>t;
  int ans=0;
  for(int i=0;i<=s.length()-t.length();i++){
    int cnt=0;
    for(int j=0;j<t.length();j++){
      if(s[j+i]==t[j])cnt++;
    }
  }
  ans=max(ans,cnt);
  cout<<s.length()-ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: 'cnt' was not declared in this scope; did you mean 'int'?
   12 |   ans=max(ans,cnt);
      |               ^~~
      |               int
Language: C++

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

string s1,s2;

main(){
  
  cin>>s1>>s2;
  int ans =0,min1=0;
  
  
  for(int i=0;i<=s1.size()-s2.size();i++){
    
    	for(int j=i;j<s2.size();j++) {
          
          	if(s1[i]!=s2[j] min1++;
               
               }
               
               ans=min(ans,min1);
               
               }
               
               cout<<ans;}

Compiler output:
a.cc:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    6 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:16:32: error: expected ';' before 'min1'
   16 |                 if(s1[i]!=s2[j] min1++;
      |                                ^~~~~
      |                                ;
a.cc:18:16: error: expected primary-expression before '}' token
   18 |                }
      |                ^
a.cc:16:40: error: expected ')' before '}' token
   16 |                 if(s1[i]!=s2[j] min1++;
      |                   ~                    ^
      |                                        )
   17 | 
   18 |                }
      |                ~                        
a.cc:18:16: error: expected primary-expression before '}' token
   18 |                }
      |                ^
Language: C++

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

string s1,s2;

main(){
  
  cin>>s1>>s2;
  int ans =0,min=0;
  
  
  for(int i=0;i<=s1.size()-s2.size();i++){
    
    	for(int j=i;j<s2.size();j++) {
          
          	if(s1[i]!=s2[j] min++;
               
               }
               
               ans=min(ans,min);
               
               }
               
               cout<<ans;}
          
          

Compiler output:
a.cc:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    6 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:16:32: error: expected ';' before 'min'
   16 |                 if(s1[i]!=s2[j] min++;
      |                                ^~~~
      |                                ;
a.cc:18:16: error: expected primary-expression before '}' token
   18 |                }
      |                ^
a.cc:16:39: error: expected ')' before '}' token
   16 |                 if(s1[i]!=s2[j] min++;
      |                   ~                   ^
      |                                       )
   17 | 
   18 |                }
      |                ~                       
a.cc:18:16: error: expected primary-expression before '}' token
   18 |                }
      |                ^
a.cc:20:23: error: 'min' cannot be used as a function
   20 |                ans=min(ans,min);
      |                    ~~~^~~~~~~~~
Language: C++

#include <iostream>
using namespace std;
#define IOS ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);

int main(int argc, char const *argv[])
{   
    IOS;
	string s, t;
	cin >> s >> t;
	int n=t.length();
	int ans=INT_MAX;
	for(int i=0; i<=s.length()-n; ++i) {
		int sum=0;
		string r=s.substr(i);
		for(int j=0; j<=n; ++j) if(r[j]!=t[j]) ++sum;
		ans=min(ans, sum);
	}
	cout << ans;
    //cerr<<" Execution : "<<(1.0*clock())/CLOCKS_PER_SEC<<"s \n";
    return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:11:17: error: 'INT_MAX' was not declared in this scope
   11 |         int 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>
#include<iostream>
#include<vector>
#include<map>
//#include <iomanip>
#include<cstring>
#include<string>
#include<cmath>
//#include<queue>
//#include<stack>
#include<algorithm>
#define ll long long
#define eps 1e-10
#define endl "\n"
using namespace std;
void timediff(int hm,int mm,int hg,int mg,int *hd,int *md)
{
   *hd=hg-hm;
    *md=mg+(60-mm);
    if(*md>=60)
    {
        *hd++;
        *md=*md-60;
    }



}

int main()
{
    //ios_base::sync_with_stdio(false);
    // cin.tie(NULL);
    string s,t;
    cin>>s>>t;
    int sl=s.length();
    int tl=t.length();
    int maxi=INT_MAX;
    int ct=0;
    for(int i=0;i<=sl-tl;i++)
    {
        ct=0;
        int k=0;
        for(int j=0;j<tl;j++)
        {
            if(s[i+k]!=t[j])
            {
                ct++;
            }
            k++;
        }
        maxi=min(ct,maxi);
    }
    cout<<maxi<<endl;






    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:38:14: error: 'INT_MAX' was not declared in this scope
   38 |     int maxi=INT_MAX;
      |              ^~~~~~~
a.cc:12:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   11 | #include<algorithm>
  +++ |+#include <climits>
   12 | #define ll long long
Language: C++

//#include<bits/stdc++.h>
#include<iostream>
#include<vector>
#include<map>
//#include <iomanip>
#include<cstring>
//#include<string>
#include<cmath>
//#include<queue>
//#include<stack>
#include<algorithm>
#define ll long long
#define eps 1e-10
#define endl "\n"
using namespace std;
void timediff(int hm,int mm,int hg,int mg,int *hd,int *md)
{
   *hd=hg-hm;
    *md=mg+(60-mm);
    if(*md>=60)
    {
        *hd++;
        *md=*md-60;
    }



}

int main()
{
    //ios_base::sync_with_stdio(false);
    // cin.tie(NULL);
    string s,t;
    cin>>s>>t;
    int sl=s.length();
    int tl=t.length();
    int maxi=INT_MAX;
    int ct=0;
    for(int i=0;i<=sl-tl;i++)
    {
        ct=0;
        int k=0;
        for(int j=0;j<tl;j++)
        {
            if(s[i+k]!=t[j])
            {
                ct++;
            }
            k++;
        }
        maxi=min(ct,maxi);
    }
    cout<<maxi<<endl;






    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:38:14: error: 'INT_MAX' was not declared in this scope
   38 |     int maxi=INT_MAX;
      |              ^~~~~~~
a.cc:12:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   11 | #include<algorithm>
  +++ |+#include <climits>
   12 | #define ll long long
Language: C++

#include<bits/stdc++.h>
#define ll long long
#define mod 1000000007
using namespace std;
int main()
{
	string s,t;
	cin>>s>>t;
	ll ans=t.length();
	for(ll p=0;p<s.length()-t.length()+1;p++)
	{
		ll cnt=0;
		for(ll j=0;j<t.length();j++)
		{
			if(s[p+j]==t[j]) cnt++;
		}
		ll kj=t.length();
		ans=min(ans,z-cnt);
	}
	cout<<ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:29: error: 'z' was not declared in this scope
   18 |                 ans=min(ans,z-cnt);
      |                             ^
Language: C++

#include<bits/stdc++.h>
#define ll long long
#define mod 1000000007
using namespace std;
int main()
{
	string s,t;
	cin>>s>>t;
	ll ans=t.length();
	for(ll p=0;p<s.length()-t.length()+1;p++)
	{
		ll cnt=0;
		for(ll j=0;j<t.length();j++)
		{
			if(s[p+j]==t[j]) cnt++;
		}
		ans=min(ans,t.length()-cnt);
	}
	cout<<ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:24: error: no matching function for call to 'min(long long int&, long long unsigned int)'
   17 |                 ans=min(ans,t.length()-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:17:24: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'long long unsigned int')
   17 |                 ans=min(ans,t.length()-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:17:24: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   17 |                 ans=min(ans,t.length()-cnt);
      |                     ~~~^~~~~~~~~~~~~~~~~~~~
Language: C++

s = input()
t = input()
n = len(t)
ans, res = 0, len(s)
for i in range (0, len(s) - len(t) + 1) :
    a = s[i : i + n]
    for i in range(0, n) :
        if (a[i] != t[i]): ans += 1 
    res = min(res, ans)
    ans = 0 
print(res)

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

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

void solve1() {
  string s, t;
  cin >> s >> t;
  int d = t.size();
  for (int i = 0; i <= s.size() - t.size(); i++) {
    int j = 0, k = i;
    // treat same part
    // bug report:
    // ÁúüÊ≠£Êú™ÈÄöËøáÁöÑÂéüÂõ†Â∫îËØ•ÊòØÂΩìÊ£ÄÈ™åstring s‰∏≠s.size() - t.size() < i < s.size()‰∏≠ÁöÑÂÖÉÁ¥†Êó∂Âá∫Áé∞ÁöÑÈóÆÈ¢ò--ÊäädÂÖ®ÈÉ®ËÆæ‰∏∫‰∫Üt.size()
    // bug1: ÂØπ‰∫és‰∏≠‰∏çÁ≠â‰∫ét[0]ÁöÑÈ°πÊú™ËøõË°åÊ£ÄÈ™åÔºàÊàñËÄÖËØ¥ÈÄöËøá‰∫ÜreverseÊñπÊ≥ïÊ£ÄÈ™å‰∫ÜÔºâ
    for (; k < s.size() && j < t.size() && s[k] == t[j]; k++, j++) {
      ;
    }
    // have all
    if (j == t.size()) {
      d = 0;
      break;
    }
    // have one or two...
    // treat different part
    int c = 0;
    for (; j < t.size() && k < s.size(); k++, j++) {
      if (s[k] != t[j]) {
        c++;
      }
    }
    // s.size() - t.size() < k <= s.size() - 1
    // bug2 : (
    // if (j < t.size()) {
    //   c = t.size();
    // }
    if (c < d) d = c;
  }
  cout << d << endl;
}

void solve2() {
  string s, t;
  cin >> s >> t;
  int c = t.size();
  // ÈúÄÊª°Ë∂≥Ëá≥Â∞ëËÉΩËØªÂà∞Â≠óÁ¨¶‰∏≤sÁöÑ4‰∏™Â≠óÁ¨¶
  for (int i = 0; i <= s.size() - t.size(); i++) {
    int count = 0;
    for (int j = 0, k = i; j < t.size(); j++, k++) {
      if (s[k] != t[j]) {
        count++;
      }
    }
    if (count < c) c = count;
  }
  cout << c << endl;
}

int main() {
  solve1();
  return 0;
}
G

Compiler output:
a.cc:62:1: error: 'G' does not name a type
   62 | G
      | ^
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main()
{
  string s,t;
  cin>>s>>t;
  int max=0,count=0;
  for(int i=0;i<s.length()-t.length()+1;++i)
  {
    if((s[i]==t[0])
    for(int j=i;j<i+t.length();++j)
    {
      if(s[j]==t[j-i])
      count++;
    }
    if(count>max)
      max=count;
  }
  cout<<t.length()-max;
}
      


Compiler output:
a.cc: In function 'int main()':
a.cc:11:20: error: expected ')' before 'for'
   11 |     if((s[i]==t[0])
      |       ~            ^
      |                    )
   12 |     for(int j=i;j<i+t.length();++j)
      |     ~~~             
a.cc:12:17: error: 'j' was not declared in this scope
   12 |     for(int j=i;j<i+t.length();++j)
      |                 ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:20: error: expected ')' before 'for'
   10 |     if((s[i]==t[0])
      |       ~            ^
      |                    )
   11 |     for(int j=i;j<i+t.length();++j)
      |     ~~~             
a.cc:11:17: error: 'j' was not declared in this scope
   11 |     for(int j=i;j<i+t.length();++j)
      |                 ^
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 minChanges = Integer.MAX_VALUE;
		for(int i = 0 ; i <= S.length() - T.length(); i++) {
			int iter = 0;
			int temp = 0;
			while(iter < T.length()) {
				if(S.charAt(i+iter) != T.charAt(iter)) {
					temp++;
				}
				iter++;
			}
			minChanges = Math.min(temp, minChanges);
		}
		System.out.println(minChanges);
	}
}

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;
    int na,nb,nc,a=0;
    cin >> s >> t;
    na=s.size();
    nb=t.size();
    nc=na-nb;
    for(int  i=0;i<=nc;i++){
         int diff=0;
         for(int i=0;i<nb;i++){
             if(t[i]!=s[i]){
                 diff++;
             }
             a=min(a,diff);
         }
    cout << a;
    return 0;
 }


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

#include <bits/stdc++.h>
#define rep(i,N) for (int i = 0; i < (N); ++i)
#define all(v) v.begin(), v.end()
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int inf{int(1e9)};
int main(void){
  string S, T;
  cin >> S >> T;

  int ans = T.size();

  for (int start = 0; start <= S.size() - T.size(); start++){
    int diff = 0;
    for (int i = 0; i < T.size(); i++){
      if (T[i] != S[start + i]){
        diff++;
      }
    }
    ans = min(ans, diff)
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:25: error: expected ';' before '}' token
   21 |     ans = min(ans, diff)
      |                         ^
      |                         ;
   22 |   }
      |   ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	string t,s;
  	int nt,ns;
  	cin>>s>>t;
  	ns=s.length(),nt=t.length();
  	int ans=0;
  	for(int i=0;i<nt;i++)
    {
     	if(s[i]!=t[i])ans++; 
    }
  	int cnt=ans;
  	for(;i<ns;i++)
    {
		if(s[i]!=t[i])cnt++;
      	if(s[i-nt]!=t[i-nt])cnt--;
      	ans=min(ans,cnt);
    }
  	cout<<ans<<"\n";
  	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:14: error: 'i' was not declared in this scope
   15 |         for(;i<ns;i++)
      |              ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	string t,s;
  	int nt,ns;
  	cin>>s>>t;
  	ns=s.legnth(),nt=t.length();
  	int ans=0;
  	for(int i=0;i<nt;i++)
    {
     	if(s[i]!=t[i])ans++; 
    }
  	int cnt=ans;
  	for(;i<ns;i++)
    {
		if(s[i]!=t[i])cnt++;
      	if(s[i-nt]!=t[i-nt])cnt--;
      	ans=min(ans,cnt);
    }
  	cout<<ans<<"\n";
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'legnth'; did you mean 'length'?
    8 |         ns=s.legnth(),nt=t.length();
      |              ^~~~~~
      |              length
a.cc:15:14: error: 'i' was not declared in this scope
   15 |         for(;i<ns;i++)
      |              ^
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Random;
import java.util.StringTokenizer;

public class ProbSubs {
     public static void main(String[] args) {
         FastScanner fs=new FastScanner();
         int T=1;
         int max = 0;
         int count = 0;
         for (int tt=0; tt<T; tt++) {
                    String s= fs.next();
                    String t = fs.next();
                    int k  =0;
                    int i = 0;
                    int j = 0;
                    while(i<s.length()){
                        while(j<t.length()){
                            if(s.charAt(i) == t.charAt(j)){
                                count++;
                                max = Math.max(count, max);
                            }
                            if(j == t.length()-1){
                                j = -1;
                                k+=1;
                                count = 0;
                                i = k-1;
                            }
                            i++;
                            j++;
                            if(i == s.length() || j == t.length()){
                                break;
                            }
                        }
                        
                    }
                    
                    System.out.println(t.length() - max);
                    // System.out.println(1);
                 }
}
 
 static class FastScanner {
     BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
     StringTokenizer st=new StringTokenizer("");
     String next() {
     while (!st.hasMoreTokens())
         try {
             st=new StringTokenizer(br.readLine());
         } catch (IOException e) {
             e.printStackTrace();
         }
         return st.nextToken();
     }
     
     int nextInt() {
         return Integer.parseInt(next());
     }
     int[] readArray(int n) {
         int[] a=new int[n];
         for (int i=0; i<n; i++) a[i]=nextInt();
         return a;
     }
     long nextLong() {
         return Long.parseLong(next());
     }
 }

 
}


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

//Bismillahir-Rahmanir-Rahim
#include<bits/stdc++.h>
typedef long long int ll;
typedef unsigned long long int llu;
#define f1(i,n) for(i=1;i<=n;i++)
#define f(i,n) for(i=0;i<n;i++)
#define Max 100009
#define pb push_back
#define mp make_pair
using namespace std;
int main()
{
     ll n,i,j,m,c,mx=0,T,ans=0,r,k=0,p=0,q,x,y,l;
     string s,t;
     cin>>s>>t;
     ll mn=INT_MAX;
     for(i=0;i<=s.size()-t.size();i++)
     {
         k=0;
         for(j=0;j<t.size();j++)
         {
             if(t[j]==s[i+j])
                k++;
         }
         mn=min(mn,(t.size()-k));
     }
     cout<<mn<<endl;
}






Compiler output:
a.cc: In function 'int main()':
a.cc:25:16: error: no matching function for call to 'min(ll&, long long unsigned int)'
   25 |          mn=min(mn,(t.size()-k));
      |             ~~~^~~~~~~~~~~~~~~~~
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:2:
/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:25:16: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'long long unsigned int')
   25 |          mn=min(mn,(t.size()-k));
      |             ~~~^~~~~~~~~~~~~~~~~
/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:25:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   25 |          mn=min(mn,(t.size()-k));
      |             ~~~^~~~~~~~~~~~~~~~~
Language: Java

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

public class Main {
	public static void main(String[] args)
    {
		Scanner sc=new Scanner(System.in);
			String s1=reader.next();
			int n1=s1.length();
			String s2=reader.next();
			int n2=s2.length();
			int min=Integer.MAX_VALUE;
			for(int i=0;i<n1-n2+1;i++) {
				String temp=s1.substring(i,i+n2);
				int count=0;
				for(int j=0;j<temp.length();j++) {
					if(temp.charAt(j)!=s2.charAt(j)) count++;
				}
				min=Math.min(count, min);
            }
			System.out.println(min);
	}
}

Compiler output:
Main.java:8: error: cannot find symbol
			String s1=reader.next();
			          ^
  symbol:   variable reader
  location: class Main
Main.java:10: error: cannot find symbol
			String s2=reader.next();
			          ^
  symbol:   variable reader
  location: class Main
2 errors