criyle/codenet-compile-errors huggingface dataset:
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:19:6: error: 'i' undeclared (first use in this function)
   19 | if(a[i+j]!=b[j]) count3++;
      |      ^
main.c:19:6: note: each undeclared identifier is reported only once for each function it appears in
main.c:23:1: error: expected declaration or statement at end of input
   23 | }
      | ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:12:7: error: 'num' was not declared in this scope; did you mean 'enum'?
   12 |       num = t.size() - i;
      |       ^~~
      |       enum
Language: Java

import java.util.*;

public class Main{
  public static void main(String args[]){
    Scanner sc=new Scanner(System.in);
    String S=sc.nextLine();
    String T=sc.nextLine();
    int shortest=1001;
	int data=0;
    char[] Schar=S.toCharArray();
    char[] Tchar=T.toCharArray();
    for(int i=0;i<Schar.length-Tchar.length+1;i++){
      for(int j=0;j<Tchar.length[];j++){
       	if(Schar[i+j]!=Tchar[j]){
          data++;
        }
      }
	  if(data<shortest){
        shortest=data;
      }
       data=0;
    }

    
  
  }
}

Compiler output:
Main.java:13: error: '.class' expected
      for(int j=0;j<Tchar.length[];j++){
                                  ^
1 error
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 < S.size() - T.size() + 1; ++i) {
    int cnt = 0;
    for (int k = 0, int j = i; j < i + T.size(); ++j, ++k) {
      cnt += S[j] != S[k];
    }
    ans = min(ans, cnt);
  }
  printf("%d\n", ans);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:21: error: expected unqualified-id before 'int'
   10 |     for (int k = 0, int j = i; j < i + T.size(); ++j, ++k) {
      |                     ^~~
a.cc:10:20: error: expected ';' before 'int'
   10 |     for (int k = 0, int j = i; j < i + T.size(); ++j, ++k) {
      |                    ^~~~
      |                    ;
a.cc:10:48: error: expected ')' before ';' token
   10 |     for (int k = 0, int j = i; j < i + T.size(); ++j, ++k) {
      |         ~                                      ^
      |                                                )
a.cc:10:52: error: 'j' was not declared in this scope
   10 |     for (int k = 0, int j = i; j < i + T.size(); ++j, ++k) {
      |                                                    ^
a.cc:10:57: error: 'k' was not declared in this scope
   10 |     for (int k = 0, int j = i; j < i + T.size(); ++j, ++k) {
      |                                                         ^
Language: C++

#include<bits/stdc++.h>
using namespac std;
int main(void)
{
	string a;
  	string b;
  	cin << a;
  	cin << b;
  	int n = a.size();
  	int m = b.size();
  	int count = 0;
  	int min = INT_MAX;
  	for(int i=0;i+m-1<n;i++)
    {
      	count = 0;
    	for(int j=0;j<m;j++)
        {
        	if(a[i+j]==b[j])
            {
            	count++;
            }
        }
      	if(min>count)
        {
          min = count;
        }
    }
  	cout << min << endl;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespac'
    2 | using namespac std;
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:5:9: error: 'string' was not declared in this scope
    5 |         string a;
      |         ^~~~~~
a.cc:5:9: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:6:15: error: expected ';' before 'b'
    6 |         string b;
      |               ^~
      |               ;
a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |         cin << a;
      |         ^~~
      |         std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:16: error: 'a' was not declared in this scope
    7 |         cin << a;
      |                ^
a.cc:8:16: error: 'b' was not declared in this scope
    8 |         cin << b;
      |                ^
a.cc:28:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   28 |         cout << min << endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:28:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   28 |         cout << min << endl;
      |                        ^~~~
      |                        std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
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<cont2;j++){
if(a[I+j]!=b[j]) count3++;
}
printf("%d",count3);
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:18:15: error: 'cont2' undeclared (first use in this function); did you mean 'count2'?
   18 | for(int j=0;j<cont2;j++){
      |               ^~~~~
      |               count2
main.c:18:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:19:6: error: 'I' undeclared (first use in this function)
   19 | if(a[I+j]!=b[j]) count3++;
      |      ^
main.c:23:1: error: expected declaration or statement at end of input
   23 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
string s,c;
  cin>>s>>c;int sum=0,ma=INT_MAX;
  for(int i=0;i<s.length()-c.length()+1;i++){int k=0;sum=0;
  for(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 <bits/stdc++.h>
using namespace std;

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


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

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

int main(){
	string S,T;
	cin >> S >> T;
    int tlength = T.Length();
    int slength = S.Length();
    int i=0;
    string sub;
    int count = 0;
    int counts[];
    while(slength >= tlength + i){
        count=0;
    	sub = S.substr(i, tlength);
        for(int j=0; j<tlength; j++){
          if(sub[j] != T[j]){
            count++;
          }
        }
      counts.append(count);
    }
  cout << counts.max() << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:21: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'Length'; did you mean 'length'?
    9 |     int tlength = T.Length();
      |                     ^~~~~~
      |                     length
a.cc:10:21: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'Length'; did you mean 'length'?
   10 |     int slength = S.Length();
      |                     ^~~~~~
      |                     length
a.cc:14:9: error: storage size of 'counts' isn't known
   14 |     int counts[];
      |         ^~~~~~
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)]={},p,j,min;
  for(i=0;i<strlen(s)-strlen(t)+1;i++){
    for(j=i,p=0;j<i+strlen(t);j++,p++){
      if(s[j]!=t[p])count[j]++;
    }
  }
  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)]={},p,j,min;
      |         ^~~~~
main.c:6:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:26: error: expected expression before '{' token
    6 |   int i;count[strlen(s)]={},p,j,min;
      |                          ^
main.c:8:9: error: 'j' undeclared (first use in this function)
    8 |     for(j=i,p=0;j<i+strlen(t);j++,p++){
      |         ^
main.c:8:13: error: 'p' undeclared (first use in this function)
    8 |     for(j=i,p=0;j<i+strlen(t);j++,p++){
      |             ^
main.c:12:11: error: 'min' undeclared (first use in this function); did you mean 'main'?
   12 |   for(i=1,min=count[0];i<strlen(s);i++){
      |           ^~~
      |           main
Language: C++

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

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

    int ans = 999999;
    int size = static_cast<int>(S.size() - T.size());
    int t_size = static_cast<int>(T.size());
    for(int i = 0; i =< size; i++) {
        string s = S.substr(i, t_size);

        int count = 0;
        rep(j, 0, t_size){
            if(s[j] != T[j])
            ++count;
        }
        ans = min(count, ans);
    }

    cout << ans << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:23: error: expected primary-expression before '<' token
   14 |     for(int i = 0; i =< size; i++) {
      |                       ^
Language: C++

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

#inlcude<iostream>
#include<string>
using namespace std;
int main() {
  string S,T;
  cin >> S >> T;
  int ans = 2000000000,t;
  int i,j;
  for(i=0;i<=S.length()-T.length();i++) {
    t = 0;
    for(j=0;j<T.length();j++) {
      if(S[i+j] != T[j])t++;
    }
    ans = min(ans,t);
  }
  cout << ans << endl;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    1 | #inlcude<iostream>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> S >> T;
      |   ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include<string>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:16:3: error: 'cout' was not declared in this scope
   16 |   cout << ans << endl;
      |   ^~~~
a.cc:16:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:18: error: 'endl' was not declared in this scope
   16 |   cout << ans << endl;
      |                  ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include<string>
  +++ |+#include <ostream>
    3 | using namespace std;
Language: C++

			break;
		} else {
			int n = t.size();
			rep(j,n){
				if(s[i+j] != t[j]){
					now++;
				}
			}
			ans = min(now,ans);
		}
	}
	cout << ans << endl;
}


Compiler output:
a.cc:1:25: error: expected unqualified-id before 'break'
    1 |                         break;
      |                         ^~~~~
a.cc:2:17: error: expected declaration before '}' token
    2 |                 } else {
      |                 ^
a.cc:2:19: error: expected unqualified-id before 'else'
    2 |                 } else {
      |                   ^~~~
a.cc:11:9: error: expected declaration before '}' token
   11 |         }
      |         ^
a.cc:12:9: error: 'cout' does not name a type
   12 |         cout << ans << endl;
      |         ^~~~
a.cc:13:1: error: expected declaration before '}' token
   13 | }
      | ^
Language: C++

V                #include <bits/stdc++.h>
                using namespace std;
                #define int long long
                #define fi first
                #define se second
                #define pi pair<int,int>  
                #define pb push_back

                // dont forget to initialize global variables inside main() ;
                int mod = 1e9 + 7;
                
                int func(string &s,string &t,int k){
                    int ans=0;
                    for(int i=k;i<k+t.size();i++){
                        if( s[i]!=t[i-k] )
                            ans++;
                    }
                    return ans;
                }
                int32_t main() {
                
                ios::sync_with_stdio(false);
                cin.tie(0);
                cout.tie(0);

                int tt=1;//;cin>>tt; 
                
                
                while( tt-- ){

                    string s,t;
                    cin>>s>>t;
                    int ans = INT_MAX;
                    for(int i=0;i<=s.size()-t.size();i++){
                        int k = func(s,t,i);
                      //  cout<<k<<endl;
                        ans = min(ans,k);

                    }
                    cout<<ans<<endl;
                }
                return 0;
            }

                        


Compiler output:
a.cc:1:18: error: stray '#' in program
    1 | V                #include <bits/stdc++.h>
      |                  ^
a.cc:1:1: error: 'V' does not name a type
    1 | V                #include <bits/stdc++.h>
      | ^
a.cc:12:26: error: 'string' was not declared in this scope
   12 |                 int func(string &s,string &t,int k){
      |                          ^~~~~~
a.cc:12:34: error: 's' was not declared in this scope; did you mean 'se'?
   12 |                 int func(string &s,string &t,int k){
      |                                  ^
      |                                  se
a.cc:12:36: error: 'string' was not declared in this scope
   12 |                 int func(string &s,string &t,int k){
      |                                    ^~~~~~
a.cc:12:44: error: 't' was not declared in this scope
   12 |                 int func(string &s,string &t,int k){
      |                                            ^
a.cc:3:29: error: expected primary-expression before 'long'
    3 |                 #define int long long
      |                             ^~~~
a.cc:12:46: note: in expansion of macro 'int'
   12 |                 int func(string &s,string &t,int k){
      |                                              ^~~
a.cc:12:51: error: expression list treated as compound expression in initializer [-fpermissive]
   12 |                 int func(string &s,string &t,int k){
      |                                                   ^
a.cc:20:17: error: 'int32_t' does not name a type
   20 |                 int32_t main() {
      |                 ^~~~~~~
a.cc:1:1: note: 'int32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
  +++ |+#include <cstdint>
    1 | V                #include <bits/stdc++.h>
Language: C++

#include <stdio.h>
int main(){
	char a[1001],b[1001];
	gets(a);
	gets(b);
	int len1=strlen(a),len2=strlen(b),max=0,num=0;
	for(int i=0;i<=len1-len2;i++){
		num=0;
		for(int j=0;j<len2;j++){
			if(a[i+j]==b[j])num++;
		}
		if(num>max)max=num;
	}
	printf("%d",len2-max);
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
    4 |         gets(a);
      |         ^~~~
      |         getw
a.cc:6:18: error: 'strlen' was not declared in this scope
    6 |         int len1=strlen(a),len2=strlen(b),max=0,num=0;
      |                  ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <stdio.h>
  +++ |+#include <cstring>
    2 | int main(){
a.cc:7:29: error: 'len2' was not declared in this scope; did you mean 'len1'?
    7 |         for(int i=0;i<=len1-len2;i++){
      |                             ^~~~
      |                             len1
a.cc:8:17: error: 'num' was not declared in this scope; did you mean 'enum'?
    8 |                 num=0;
      |                 ^~~
      |                 enum
a.cc:12:24: error: 'max' was not declared in this scope
   12 |                 if(num>max)max=num;
      |                        ^~~
a.cc:14:21: error: 'len2' was not declared in this scope; did you mean 'len1'?
   14 |         printf("%d",len2-max);
      |                     ^~~~
      |                     len1
a.cc:14:26: error: 'max' was not declared in this scope
   14 |         printf("%d",len2-max);
      |                          ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
	char a[1001],b[1001];
	gets(a);
	gets(b);
	int len1=strlen(a),len2=strlen(b),max=0,num=0;
	for(int i=0;i<=len1-len2;i++){
		num=0;
		for(int j=0;j<len2;j++){
			if(a[i+j]==b[j])num++;
		}
		if(num>max)max=num;
	}
	printf("%d",len2-max);
	return 0;
}


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

#include<bits/stdc++.h>
#define rep(i,a,n) for(ll i=a;i<n;i++)
using namespace std;
typedef long long ll;
int main(){
  string s,t;
  cin>>s;
  cin>>t;
  ll ans=1000;
  ll memo=0;
  ll i=0;
  ll t_size = sizeof(t);
  ll s_size = sizeof(s);
  while(1){
    memo=0;
    rep(j,0,t_size){
      if(s[i+j]!=t[j])memo++;
    }
    if(memo<ans)ans=memo;
    if(i+j==s_size-1)break;
  }
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:10: error: 'j' was not declared in this scope
   20 |     if(i+j==s_size-1)break;
      |          ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:18: error: expected ';' before '\U0000ff1b'
   16 |               i++；
      |                  ^~
      |                  ;
Language: C++

#include<iostream>
using namespace std;
int main(){
string s,t;
  cin>>s>>t;
  int n=s.size(),m=t.size();
  int dp[n+1][m+1];
  for(int i=0;i<=n;i++){
  for(int j=0;j<=m;j++){
  	if(i==0||j==0)
      	lcs[i][j]=0;
    else if(s[i-1]==t[j-1])
      lcs[i][j]=lcs[i-1][j-1]+1;
    else
      lcs[i][j]=max(lcs[i-1][j],lcs[i][j-1]);
  
  
  }}
cout<<m-lcs[n][m]<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'lcs' was not declared in this scope
   11 |         lcs[i][j]=0;
      |         ^~~
a.cc:13:7: error: 'lcs' was not declared in this scope
   13 |       lcs[i][j]=lcs[i-1][j-1]+1;
      |       ^~~
a.cc:15:7: error: 'lcs' was not declared in this scope
   15 |       lcs[i][j]=max(lcs[i-1][j],lcs[i][j-1]);
      |       ^~~
a.cc:19:9: error: 'lcs' was not declared in this scope
   19 | cout<<m-lcs[n][m]<<endl;
      |         ^~~
Language: C++


//Inshallah , Boys played well..!!

#pragma GCC optimize("Ofast")
#pragma GCC optimize ("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
/*#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;*/
using namespace std;
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
#define find_by_order(container,k) *container.find_by_order(k)
#define order_of_key(container,key) container.order_of_key(key)
#define endl '\n'
#define ll long long
#define pb push_back
#define pf push_front
#define mk make_pair
#define f(i,j,n) for(ll i=j;i<n;i++)
#define r(i,n,j) for(ll i=n-1;i>=j;i--)
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define Test int t;cin>>t;while(t--)
#define mod 1000000007
#define md 998244353
#define MIN INT_MIN
#define MAX INT_MAX
#define inf LLONG_MAX
#define all(container) container.begin() , container.end()
#define rall(container) container.rbegin() , container.rend()
#define sz(container) (int)container.size()
#define v vector<long long>
#define pii pair <int , int>
#define fi first
#define se second
#define setp(x) setprecision(x)
#define meme(x,i) memset(x,i,sizeof(x))
const int N = 100005;
ll power(ll x, ll y) {
	x %= mod;
	y %= mod;
	ll var = x, ans = 1;
	while (y) {
		if (y & 1)
			ans = ((ans % mod) * (var % mod)) % mod;
		var = ((var % mod) * (var % mod)) % mod;
		y = y >> 1;
	}
	return ans;
}
void solve() {
	string s, t;
	cin >> s >> t;
	int n = s.size();
	int m = t.size();
	int ans = m;
	for (int i = 0; i <= n - m; i++) {
		int x = 0;
		for (int j = 0; j < m; j++) {
			if (t[j] != s[i + j])
				x++;
		}
		ans = min(x, ans);
	}
	cout << ans ;
}
int main() {
	fast;
	int t = 1;
	//cin >> t;
	while (t--)	solve();
}


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

#include<bits/stdc++.h>

#define all(x) (x).begin(),(x).end()
#define YES() printf("YES\n")
#define NO() printf("NO\n")
#define Yes() printf("Yes\n")
#define No() printf("No\n")
#define ll long long
#define ld long double
#define pb push_back
#define MOD 1000000007
#define LLMN LONG_LONG_MIN
#define LLMX LONG_LONG_MAX
#define LDMX LDBL_MAX
#define LDMN LDBL_MIN
#define MAX 1000000
#define pll pair<ll, ll>
#define vl vector<ll>
#define vll vector< vector<ll> >
#define vb vector<bool>
#define vbb vector< vector<bool> >    

using namespace std;   


        
int main()
 {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
	string s, t;
  	cin>>s>>t;
  	ll n = s.length();
  	ll m = t.length();
  
  	ll maxi = 0;
  	for(ll i =0;i<n;i++){
      	ll count = 0;
      	ll l =i;
		for(ll j =0;j<m && l<n;j++, l++){
          {
            if(t[j] == s[l]) count++;
          }
          maxi = max(maxi,count);
      }
	  cout<<m-maxi<<endl;
	return 0;
}

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

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

}

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

#include <bits/stdc++.h>

#define FOR0(i,n) for (int i = 0; i < n; i++)
#define FOR(i,j, n) for (int i = j; i < n; i++)
// bool isEven(ll n) {return (n%2!=0)?false:true;};
#define INF 1000000000 // 1 billion, safer than 2B for Floyd Warshall’s

#define f(i,a,b) for(i=a;i<b;i++)
#define rep(i,n) f(i,0,n)
#define fd(i,a,b) for(i=a;i>=b;i--)
#define pb push_back
#define mp make_pair
#define vi vector< int >
#define vl vector< ll >
#define ss second
#define ff first
#define ll long long
#define pii pair< int,int >
#define pll pair< ll,ll >
#define sz(a) a.size()
#define inf (1000*1000*1000+5)
#define all(a) a.begin(),a.end()
#define tri pair<int,pii>
#define vii vector<pii>
#define vll vector<pll>
#define viii vector<tri>
#define mod (1000*1000*1000+7)
#define pqueue priority_queue< int >
#define pdqueue priority_queue< int,vi ,greater< int > >
// #define int ll

using namespace std;

//atcode abc 177

int inPlaceSame(string a, string b){
    int count =0;
    int al = a.length()

    for (int i = 0; i < al; ++i)
    {
        if(a[i]==b[i])
            count++;
    }
    return count;
}


int main(){
    string s, t;
    cin>>s;
    cin>>t;

    int result = 0;

    int sl = s.length();
    int tl = t.length();

    for (int i = 0; i < sl; ++i)
    {
        result = max(result, inPlaceSame(s.substr(i, tl), t));
    }

    cout<<tl-result<<endl;
}


Compiler output:
a.cc: In function 'int inPlaceSame(std::string, std::string)':
a.cc:40:5: error: expected ',' or ';' before 'for'
   40 |     for (int i = 0; i < al; ++i)
      |     ^~~
a.cc:40:21: error: 'i' was not declared in this scope
   40 |     for (int i = 0; i < al; ++i)
      |                     ^
Language: C++

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

#define int long long
#define endl "\n"
#define mod 1000000007
#define pb push_back
#define ff first
#define ss second
#define FIO ios_base::sync_with_stdio(false); cin.tie(NULL);


main(){
	FIO
	int t;
	t=1;
	while(t--){
		string s,tt;
		cin>>s>>tt;
		int i,j,k=INT_MAX;
		int n = s.length();
		for(i=0;i<n;i++){
			int l=0;
			for(j=0;j<tt.length();j++){
				if(s[i+j]!=t[j]){
					l++;
				}
			}
			k = min(k,l);
		}
		cout<<k<<endl;
	}
}

Compiler output:
a.cc:13:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   13 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:25:45: error: invalid types 'long long int[long long int]' for array subscript
   25 |                                 if(s[i+j]!=t[j]){
      |                                             ^
Language: C

#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization ("unroll-loops")
#include<bits/stdc++.h>
using namespace std;
typedef long long int lli;
typedef unsigned long long int ulli;
typedef long double ld;
#define S 500005
#define M 100000000
#define nl cout<<"\n";
#define er  cout<<"\n***********\n";
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define test lli t;  cin>>t; while(t--)
#define all(x) (x).begin(),(x).end()
#define sz(x) (lli)(x.size())
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define Y cout<<"YES\n";
#define N cout<<"NO\n";
#define print(x)                 cout<<#x<<": "<<x<<endl;
#define print2(x, y)             cout<<#x<<": "<<x<<" | "<<#y<<": "<<y<<endl;
#define print3(x, y, z)          cout<<#x<<":" <<x<<" | "<<#y<<": "<<y<<" | "<<#z<<": "<<z<<endl;
#define print4(a, b, c, d)       cout<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<endl;
#define print5(a, b, c, d, e)    cout<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<endl;
#define print6(a, b, c, d, e, f) cout<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<" | "<<#f<<": "<<f<<endl;

void solve()
{

    string s,t;
    cin>>s>>t;
    lli s1=sz(s),s2=sz(t);
    lli ans=s2;
    for(lli i=0;i<s1;i++)
    {
        if((i+s2-1)<s1)
        {
            lli ct=0;
            for(lli j=i,k=0;k<s2;k++,j++)
            {
                if(s[j]!=t[k])
                    ct++;
            }
            ans=min(ans,ct);
        }
    }


    cout<<ans;
}


int main()
{
    fast
    #ifndef ONLINE_JUDGE
     freopen("inputa.txt", "r", stdin);
     freopen("outputa.txt", "w", stdout);
    #endif    
     
     // test
     {
          solve();
          nl
     }
}
//a+b=a?b+2?(a&b)
//__builtin_popcnt(number)
//cout<<fixed<<setprecision(8)<<output<<"\n";

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

#include<bits/stdc++.h>
#define rep(i,a,n) for(int i=a;i<n;i++)
using namespace std;
typedef long long ll;
int main(){
  string s,t;
  cin>>s;
  cin>>t;
  int ans=1000;
  int memo=0;
  int i=0;
  while(1){
    memo=0;
    rep(j,0,t.size()){
      if(s[i+j]!=t[j])memo++;
    }
    if(memo<ans)ans=memo;
    if(i+j==s.size()-1)break;
  }
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:10: error: 'j' was not declared in this scope
   18 |     if(i+j==s.size()-1)break;
      |          ^
Language: C++

#include<bits/stdc++.h>

#define all(x) (x).begin(),(x).end()
#define YES() printf("YES\n")
#define NO() printf("NO\n")
#define Yes() printf("Yes\n")
#define No() printf("No\n")
#define ll long long
#define ld long double
#define pb push_back
#define MOD 1000000007
#define LLMN LONG_LONG_MIN
#define LLMX LONG_LONG_MAX
#define LDMX LDBL_MAX
#define LDMN LDBL_MIN
#define MAX 1000000
#define pll pair<ll, ll>
#define vl vector<ll>
#define vll vector< vector<ll> >
#define vb vector<bool>
#define vbb vector< vector<bool> >    

using namespace std;   


        
int main()
 {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
	string s, t;
  	cin>>s>>t;
  	ll n = s.length();
  	ll m = t.length();
  
  	ll maxi = 0;
  	for(ll i =0;i<n;i++){
      	ll count = 0;
      	ll l =i;
		for(ll j =0;j<m && l<n;j++, l++){
          {
            if(t[j] == s[l]) count++;
          }
          maxi = max(max,count);
      }
	  cout<<m-maxi<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:44:21: error: no matching function for call to 'max(<unresolved overloaded function type>, long long int&)'
   44 |           maxi = max(max,count);
      |                  ~~~^~~~~~~~~~~
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:257:5: note: candidate: 'constexpr const _Tp& std::max(const _Tp&, const _Tp&) [with _Tp = long long int]'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:20: note:   no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const long long int&'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |         ~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303: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:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:44:21: note:   couldn't deduce template parameter '_Tp'
   44 |           maxi = max(max,count);
      |                  ~~~^~~~~~~~~~~
a.cc:48:2: error: expected '}' at end of input
   48 | }
      |  ^
a.cc:28:2: note: to match this '{'
   28 |  {
      |  ^
Language: C++

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

int main(){
    string s,t;
    cin>>s>>t;
    int minj=1000;
    rep(i,s.size()-t.size()+1){
        int count=0;
        rep(j,t.size()){
            if(s[i+j]!=t[j])count++;
        }
        minj=min(minj,count);
    }
    cout<<minj<<endl;
   

Compiler output:
a.cc: In function 'int main()':
a.cc:17:22: error: expected '}' at end of input
   17 |     cout<<minj<<endl;
      |                      ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
Language: C++

#include<iostream>
#include<variant>
#include<vector>
#include<string>
#include<algorithm>
#include<cmath>
#include<stack>
#include<queue>

using namespace std;

int main(void) {
	string s, t;
	cin >> s;
	cin >> t;
	int min = INT_MAX;
	int tot = 0;
	for (int i = 0; i < s.size() - t.size()+1; i++) {
		tot = 0;
		for (int k = 0; k < t.size(); k++) {
			if (s[i+k] != t[k])tot++;
		}
		if (min > tot)min = tot;
	}
	cout << min;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:19: error: 'INT_MAX' was not declared in this scope
   16 |         int min = INT_MAX;
      |                   ^~~~~~~
a.cc:9:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    8 | #include<queue>
  +++ |+#include <climits>
    9 |
Language: C++

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

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

#include<bits/stdc++.h>
using namespace std;
#define int long long
#define fr(i,a,b) for(int i=a;i<b;i++)
int32_t main(){
  string s,t;
  cin>>s>>t;
  int n = s.length();
  int m = t.length();
  int ans = m;
  fr(i,0,n-m+1){
    int k = t;
    fr(j,i,i+m){
    	if(t[j-i] == s[j])k--;
    }
    ans = min(ans,k);
  }
  cout<<ans;
}

Compiler output:
a.cc: In function 'int32_t main()':
a.cc:12:13: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'long long int' in initialization
   12 |     int k = t;
      |             ^
      |             |
      |             std::string {aka std::__cxx11::basic_string<char>}
Language: C++

#include <algorithm>
#include <bitset>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <sstream>
#include <queue>
#include <unordered_map>
#include <unordered_set>
#include <vector>

#define rep(i, n) for (int i = 0; i < n; ++i)
#define debug(s, param) std::cerr << s << param << std::endl;

using namespace std;
using ll = long long;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:31:23: error: expected '}' at end of input
   31 |   cout << ans << endl;
      |                       ^
a.cc:18:12: note: to match this '{'
   18 | int main() {
      |            ^
Language: C++

#include<bits/stdc++.h>
#define rep(i,a,n) for(ll i=a;i<n;i++)
using namespace std;
typedef long long ll;
int main(){
  string s,t;
  cin>>s;
  cin>>t;
  ll ans=1000;
  ll memo=0;
  ll i=0;
  while(1){
    memo=0;
    rep(j,0,t.size()){
      if(s[i+j]!=t[j])memo++;
    }
    if(memo<ans)ans=memo;
    if(i+j==s.size()-1)break;
  }
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:10: error: 'j' was not declared in this scope
   18 |     if(i+j==s.size()-1)break;
      |          ^
Language: C++

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

}

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

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

#define ll  long long
#define PII pair<ll,ll>
#define VI  vector<ll>
#define VB  vector<bool>
#define VC  vector<char>
#define VVI vector<vector<ll>>
#define VVC vector<vector<char>>
#define VS  vector<string>
#define VP  vector<PII>
#define lf(i,a,b) for(ll i=a;i<=b;i++)
#define lr(i,a,b) for(ll i=a;i>=b;i--)
#define lfl(i,v) for(ll i=0;i<v.size();i++)
#define lrl(i,v) for(ll i=(ll)(v.size())-1;i>=0;i--)
#define chk2(a,b) cout<<"check :  "<<a<<" "<<b<<endl
#define chk3(a,b,c) cout<<"check :  "<<a<<" "<<b<<" "<<c<<endl
#define chk4(a,b,c,d) cout<<"check :  "<<a<<" "<<b<<" "<<c<<" "<<d<<endl
#define chk5(a,b,c,d,e) cout<<"check :  "<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<endl
#define l_b(v,k)  lower_bound(v.begin(),v.end(),k)-v.begin()
#define u_b(v,k)  upper_bound(v.begin(),v.end(),k)-v.begin()
#define mod 1000000007
#define sort(v) sort(v.begin(),v.end())
#define p_b push_back
#define p_f push_front
#define m_p make_pair
#define fir first
#define sec second
#define sz size()


int main() 
{	ll T;
	T=1;
	while(T--)
	{	string s,t;cin>>s>>t;
		ll ns=s.length();
		ll nt=t.length();
		ll mini=INT_MAX;
		lf(i,0,ns-nt)
		{	ll cnt=0;
			lf(j,0,nt-1)
			{	if(s[i+j]!=t[j])
					cnt++;
			}
			mini=mini(mini,cnt);
		}
		cout<<mini<<endl;
	}  		
}      


Compiler output:
a.cc: In function 'int main()':
a.cc:47:34: error: 'mini' cannot be used as a function
   47 |                         mini=mini(mini,cnt);
      |                              ~~~~^~~~~~~~~~