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

#include<bits/stdc++.h>
#include<algorithm>
#include<cmath>
#define long long int
using namespace std;
int32_t main()
{ string s,t;
cin >> s >> t;
int ans=INT_MAX;
for(int i=0; i<s.length(); i++)
{ int cnt=0;
for(int j=0; j<t.length(); j++)
{ if(i+j>=s.length())
{
    break;
}
if(s[i+j]==t[j])
{
    cnt++;
}




}
ans =min(ans,t.length()-cnt);


}
cout << ans << endl;


}


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

#include<iostream>
#include<algorithm>
#include<cmath>
#define long long int
using namespace std;
int32_t main()
{ string s,t;
cin >> s >> t;
int ans=INT_MAX;
for(int i=0; i<s.length(); i++)
{ int cnt=0;
for(int j=0; j<t.length(); j++)
{ if(i+j>=s.length())
{
    break;
}
if(s[i+j]==t[j])
{
    cnt++;
}




}
ans =min(ans,t.length()-cnt);


}
cout << ans << endl;


}


Compiler output:
a.cc: In function 'int32_t main()':
a.cc:9:9: error: 'INT_MAX' was not declared in this scope
    9 | int ans=INT_MAX;
      |         ^~~~~~~
a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    3 | #include<cmath>
  +++ |+#include <climits>
    4 | #define long long int
a.cc:26:9: error: no matching function for call to 'min(int&, std::__cxx11::basic_string<char>::size_type)'
   26 | ans =min(ans,t.length()-cnt);
      |      ~~~^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 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:26:9: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'})
   26 | 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,
                 from a.cc:2:
/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:26:9: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   26 | ans =min(ans,t.length()-cnt);
      |      ~~~^~~~~~~~~~~~~~~~~~~~
Language: C++

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

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

    int ans = T.size();

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:24: error: expected ';' before '<' token
   15 |         for (int i=0, i < T.size; i++)
      |                        ^~
      |                        ;
a.cc:15:25: error: expected primary-expression before '<' token
   15 |         for (int i=0, i < T.size; i++)
      |                         ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:36: error: expected ';' before 'else'
   13 |             dp[i][j]=1+dp[i-1][j-1]
      |                                    ^
      |                                    ;
   14 |           else
      |           ~~~~
Language: C++

#include "stdafx.h"
#include <iostream>
#include <string>
#include <algorithm>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define repr(i, n) for(int i = n; i >= 0; i--)
#define ll long long
using namespace std;
template <typename T> bool chmin(T &a, const T &b) { if (a > b) { a = b; return true; } return false; }
template <typename T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return true; } return false; }
const ll INF = 1000000000000000000;
const ll MOD = 1e9 + 7;

int main()
{
	string a, t;
	cin >> a >> t;
	int ans = MOD;
	rep(i, a.length()) {
		int tmp = 0;
		rep(j, t.length()) {
			if (i + j == a.length())
			{
				tmp = MOD;
				break;
			}
			if (a[i + j] != t[j])
			{
				tmp++;
			}
		}
		ans = min(ans, tmp);
	}
	cout << ans << endl;
	system("pause");
}



Compiler output:
a.cc:1:10: fatal error: stdafx.h: No such file or directory
    1 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <math.h>
#include <numeric>
#include <iomanip>
#include <map>
#include <queue>
#include <list>

#define REP(i, n ,N) for(ll i = (n); i < (N); i++)
//#define RREP(i, n ,N) for(ll i = (N-1); i >= (n); i--)
#define p(s) cout<<(s)<<endl
#define p2(a, b) cout<<(a)<<" "<<(b)<<endl

#define vint vector<int>
#define vll vector<ll>

#define INF 1e9
#define PI 3.14159265359

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }

using namespace std;
typedef long long  ll;

const long long MOD = 1e9+7;


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

    int i = 0;
    int ans = ;
    while( i < s.size() - t.size()){
        string sub = s.substr(i, t.size());
        int tmp = 0;
        REP(j, 0, t.size()){
            if(t[j] != sub[j]){
                tmp += 1;
            }
        }
        ans = min(ans, tmp);
        i += t.size();
    }

    p(ans);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:37:15: error: expected primary-expression before ';' token
   37 |     int ans = ;
      |               ^
Language: C++

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

int main() {
	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;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:49: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   12 |         for(int start = 0;start <= s.size() - t.size;start++)
      |                                               ~~^~~~
      |                                                     ()
a.cc:18:28: error: 'T' was not declared in this scope
   18 |                         if(T[i] != s[start + i])
      |                            ^
a.cc:23:26: error: no matching function for call to 'min(bool)'
   23 |                 ans = min(ans< diff);
      |                       ~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 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:   candidate expects 2 arguments, 1 provided
/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, 1 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:3:
/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:   template argument deduction/substitution failed:
a.cc:23:26: note:   mismatched types 'std::initializer_list<_Tp>' and 'bool'
   23 |                 ans = min(ans< diff);
      |                       ~~~^~~~~~~~~~~
/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:   candidate expects 2 arguments, 1 provided
Language: C

#include<stdio.h>
int main(void){
char s[1001],t[1001];
  scanf("%s",&s);
  scanf("%s",&t);
  int c=0,min=1001;
  for(int i=0;i<=strlen(s)-strlen(t);i++){
	for(int j=i;j<i+strlen(t);j++){
     // printf("%c vs %c\n",s[j],t[j-i]);
		if(s[j]!=t[j-i])c++;
    }
    if(c<=min)min=c;
    c=0;
  }
  printf("%d",min);
  return 0;
}

#include<stdio.h>
int main(void){
char s[1001],t[1001];
  scanf("%s",&s);
  scanf("%s",&t);
  int c=0,min=1001;
  for(int i=0;i<=strlen(s)-strlen(t);i++){
	for(int j=i;j<i+strlen(t);j++){
     // printf("%c vs %c\n",s[j],t[j-i]);
		if(s[j]!=t[j-i])c++;
    }
    if(c<=min)min=c;
    c=0;
  }
  printf("%d",min);
  return 0;
}



Compiler output:
main.c: In function 'main':
main.c:7:18: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
    7 |   for(int i=0;i<=strlen(s)-strlen(t);i++){
      |                  ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen'
    1 | #include<stdio.h>
  +++ |+#include <string.h>
    2 | int main(void){
main.c:7:18: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
    7 |   for(int i=0;i<=strlen(s)-strlen(t);i++){
      |                  ^~~~~~
main.c:7:18: note: include '<string.h>' or provide a declaration of 'strlen'
main.c: At top level:
main.c:20:5: error: redefinition of 'main'
   20 | int main(void){
      |     ^~~~
main.c:2:5: note: previous definition of 'main' with type 'int(void)'
    2 | int main(void){
      |     ^~~~
main.c: In function 'main':
main.c:25:18: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
   25 |   for(int i=0;i<=strlen(s)-strlen(t);i++){
      |                  ^~~~~~
main.c:25:18: note: include '<string.h>' or provide a declaration of 'strlen'
Language: C++

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

int main() {
  string S, T;

  cin >> S;
  cin >> T;

  int min_count = T.size();
  for (int i = T.size() - 1; i < S.size(); i++) {
    int count = 0;
    for (int j = i; j >= i - T.size() - 1; j--) {
      for (int k = T.size(); k >= 0; k--) {
        if (S.at(j) == T.at(k)) {
          count++;
        }
      }
    }
    min_count = min(min_count, (int)T.size() - count);
  }
  cout << max_count << endl;
}


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

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

int main() {
  string S, T;

  cin >> S;
  cin >> T;

  int min_count = T.size();
  for (int i = T.size() - 1; i < S.size(); i++) {
    int count = 0;
    for (int j = i; j >= i - T.size() - 1; j--) {
      for (int k = T.size(); k >= 0; k--) {
        if (S.at(j) == T.at(k)) {
          count++;
        }
      }
    }
    min_count = min(min_count, T.size() - count);
  }
  cout << max_count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:20: error: no matching function for call to 'min(int&, std::__cxx11::basic_string<char>::size_type)'
   20 |     min_count = min(min_count, 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:20:20: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'})
   20 |     min_count = min(min_count, 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:20:20: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   20 |     min_count = min(min_count, T.size() - count);
      |                 ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:22:11: error: 'max_count' was not declared in this scope; did you mean 'min_count'?
   22 |   cout << max_count << endl;
      |           ^~~~~~~~~
      |           min_count
Language: C++

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

int main() {
  string S, T;

  cin >> S;
  cin >> T;

  int max_count = 0;
  for (int i = T.size() - 1; i < S.size(); i++) {
    count = 0;
    for (int j = i; j >= 0; j--) {
      for (int k = T.size(); k >= 0; k--) {
        if (S.at(j) == T.at(k)) {
          count++;
        }
      }
    }
    max_count = max(max_count, count);
  }
  cout << max_count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: overloaded function with no contextual type information
   12 |     count = 0;
      |             ^
a.cc:16:16: error: no post-increment operator for type
   16 |           count++;
      |                ^~
a.cc:20:20: error: no matching function for call to 'max(int&, <unresolved overloaded function type>)'
   20 |     max_count = max(max_count, 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 = int]'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:36: note:   no known conversion for argument 2 from '<unresolved overloaded function type>' to 'const 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:20:20: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   20 |     max_count = max(max_count, count);
      |                 ~~~^~~~~~~~~~~~~~~~~~
Language: C++

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

int main() {
  string S, T;

  cin >> S;
  cin >> T;

  int max_count = 0;
  for (int i = T.size() - 1; i < S.size(); i++) {
    count = 0
    for (int j = i; j >= 0; j--) {
      for (int k = T.size(); k >= 0; k--) {
        if (S.at(j) == T.at(k)) {
          count++;
        }
      }
    }
    max_count = max(max_count, count);
  }
  cout << max_count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: overloaded function with no contextual type information
   12 |     count = 0
      |             ^
a.cc:13:21: error: 'j' was not declared in this scope
   13 |     for (int j = i; j >= 0; j--) {
      |                     ^
a.cc:20:20: error: no matching function for call to 'max(int&, <unresolved overloaded function type>)'
   20 |     max_count = max(max_count, 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 = int]'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:36: note:   no known conversion for argument 2 from '<unresolved overloaded function type>' to 'const 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:20:20: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   20 |     max_count = max(max_count, count);
      |                 ~~~^~~~~~~~~~~~~~~~~~
Language: Java

#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using ll = long long;
using namespace std;        
#define pb push_back
#define eb emplace_back
#define F first
#define S second
#define ar array
#define pi pair<int,int>


void solve(){
	string a,b;
	cin>>a>>b;
	int n=a.size();
	int m=b.size();
	int ans=1e9;
	for(int i=0;i<n;i++){
		if(i+m-1>n) break;
		int l=0;
		for(int j=0;j<m;j++){
			if(a[i+j]!=b[j]) l++;
		}
		ans=min(ans,l);
	}	
	cout<<ans<<endl;
	

}

int main(){
	ios_base::sync_with_stdio(false);
    	cin.tie(NULL);
//	freopen("input.txt",r,"stdin");
	int t=1;
// cin>>t;
	while(t--){
		solve();
	}
	return 0;
}





Compiler output:
Main.java:1: error: illegal character: '#'
#include <bits/stdc++.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <bits/stdc++.h>
         ^
Main.java:2: error: illegal character: '#'
#pragma GCC optimize("O3")
^
Main.java:4: error: class, interface, enum, or record expected
using namespace std;        
^
Main.java:5: error: illegal character: '#'
#define pb push_back
^
Main.java:6: error: illegal character: '#'
#define eb emplace_back
^
Main.java:7: error: illegal character: '#'
#define F first
^
Main.java:8: error: illegal character: '#'
#define S second
^
Main.java:9: error: illegal character: '#'
#define ar array
^
Main.java:10: error: illegal character: '#'
#define pi pair<int,int>
^
Main.java:15: error: class, interface, enum, or record expected
	cin>>a>>b;
	^
Main.java:16: error: unnamed classes are a preview feature and are disabled by default.
	int n=a.size();
	^
  (use --enable-preview to enable unnamed classes)
Main.java:19: error: class, interface, enum, or record expected
	for(int i=0;i<n;i++){
	^
Main.java:19: error: class, interface, enum, or record expected
	for(int i=0;i<n;i++){
	            ^
Main.java:19: error: class, interface, enum, or record expected
	for(int i=0;i<n;i++){
	                ^
Main.java:22: error: class, interface, enum, or record expected
		for(int j=0;j<m;j++){
		^
Main.java:22: error: class, interface, enum, or record expected
		for(int j=0;j<m;j++){
		            ^
Main.java:22: error: class, interface, enum, or record expected
		for(int j=0;j<m;j++){
		                ^
Main.java:24: error: class, interface, enum, or record expected
		}
		^
Main.java:26: error: class, interface, enum, or record expected
	}	
	^
Main.java:30: error: class, interface, enum, or record expected
}
^
Main.java:34: error: class, interface, enum, or record expected
    	cin.tie(NULL);
    	^
Main.java:38: error: class, interface, enum, or record expected
	while(t--){
	^
Main.java:40: error: class, interface, enum, or record expected
	}
	^
Main.java:42: error: class, interface, enum, or record expected
}
^
25 errors
Language: C++

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

int main(){
	string S, T;
  	cin >> S >> T;
  	
  	int ans = T.size();
  	for(int i = 0; i <= S.size() - T.size(); i++){
    	int a = 0;
      for(int j = 0; j < T.size(); j++){
      	if(T.at(j) != S.at(i + j)) a++
      }
      ans = max(ans, a)
    }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:39: error: expected ';' before '}' token
   12 |         if(T.at(j) != S.at(i + j)) a++
      |                                       ^
      |                                       ;
   13 |       }
      |       ~                                
a.cc:14:24: error: expected ';' before '}' token
   14 |       ans = max(ans, a)
      |                        ^
      |                        ;
   15 |     }
      |     ~
Language: C++

#include<stdio.h>
#include<math.h>
#include<iostream>
#include<string>
#include<vector>
#include<Bits.h>
using namespace std;
#include<stdio.h>
#include<math.h>
#include<iostream>
#include<string>
#include<vector>
using namespace std;
int main()
{
    string s, t;
    cin >> s >> t;
    int sizes = s.size(), sizet = t.size(), count = 0, m = 0;

    for (int i = 0; i < sizes - sizet + 1; i++)
    {
        for (int j = 0; j < sizet; j++)
        {
            if (t[j] == s[i + j])
            {
                count++;
            }
            if (m < count)
            {
                m = count;
            }
        }
        count = 0;
    }
    cout << sizet - m << endl;
}

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

#include <iostream>
#include <string>
using namespace std;
int main(){
  string normal_string, key_string;
  int correct_num=0;
  cin>>normal_string;
  cin>>key_string;
  for(int i=0;i<(int)normal_string.length();i++){
    int counter=0;
	for (int j=0;j<(int)key_string.length();j++){
		if(normal_string[i+j]==keystring[j]){
          counter++;
        }
      	else{
			break;
        }
    }
    if(counter>correct_num){
		correct_num=counter;
    }
  }
  cout<<(int)normal_string().length-correct_num;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:40: error: 'keystring' was not declared in this scope; did you mean 'key_string'?
   12 |                 if(normal_string[i+j]==keystring[j]){
      |                                        ^~~~~~~~~
      |                                        key_string
a.cc:23:27: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) ()'
   23 |   cout<<(int)normal_string().length-correct_num;
      |              ~~~~~~~~~~~~~^~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){
  string normal_string, key_string;
  int correct_num=0;
  cin>>normal_string;
  cin>>key_string;
  for(int i=0;i<(int)normal_string.length();i++){
    int counter=0;
	for (int j=0;j<(int)key_string.length();j++){
		if(normal_string[i+j]==keystring[j]){
          counter++;
        }
      	else{
			break;
        }
    }
    if(counter>correct_num){
		correct_num=counter;
    }
  }
  cout<<(int)normal_string().length-correctnum;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:40: error: 'keystring' was not declared in this scope; did you mean 'key_string'?
   12 |                 if(normal_string[i+j]==keystring[j]){
      |                                        ^~~~~~~~~
      |                                        key_string
a.cc:23:27: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) ()'
   23 |   cout<<(int)normal_string().length-correctnum;
      |              ~~~~~~~~~~~~~^~
a.cc:23:37: error: 'correctnum' was not declared in this scope; did you mean 'correct_num'?
   23 |   cout<<(int)normal_string().length-correctnum;
      |                                     ^~~~~~~~~~
      |                                     correct_num
Language: C++

#include<stdio.h>
#include<math.h>
#include<iostream>
#include<string>
#include<vector>
#include<Bits.h>
using namespace std;
int main() {
    string S;
    string T;
    cin >> S;
    cin >> T;
    string P;
    int n;
    n = 0;
    int t;
    t = T.size();
    int s;
    s = S.size();
    int t2;
    t2 = 0;
    int j;
    j = 0;
    int max;
    max = 0;
    int h;
    h = 0;
    for (int i = 0; i <= s; i++) {
        if (T[1] = S[n]) {
            n++;
            int z = 0;
            P.append(z, n);
        }
        for (int k = 0; k <= t; k++) {
            if (T[t2] = S[n]) {
                j++;
            }
            t2++;
            n++;
        }
        if (max < j) {
            max = j;
            j = 0;
        }
    }
    cout << t - max << endl;
}


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

#include <iostream>
#include <string>
using namespace std;
int main(){
  string normal_string, key_string;
  int correct_num=0;
  cin>>normal_string;
  cin>>keystring;
  for(int i=0;i<(int)normal_string.length();i++){
    int counter=0;
	for (int j=0;j<(int)key_string.length();j++){
		if(normal_string[i+j]==keystring[j]){
          counter++;
        }
      	else{
			break;
        }
    }
    if(counter>correct_num){
		correct_num=counter;
    }
  }
  cout<<(int)normal_string.length-correctnum;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: 'keystring' was not declared in this scope; did you mean 'key_string'?
    8 |   cin>>keystring;
      |        ^~~~~~~~~
      |        key_string
a.cc:23:28: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   23 |   cout<<(int)normal_string.length-correctnum;
      |              ~~~~~~~~~~~~~~^~~~~~
      |                                  ()
a.cc:23:35: error: 'correctnum' was not declared in this scope; did you mean 'correct_num'?
   23 |   cout<<(int)normal_string.length-correctnum;
      |                                   ^~~~~~~~~~
      |                                   correct_num
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){
  string normal_string, key_string;
  int correct_num=0;
  cin>>normal_string;
  cin>>keystring;
  for(int i=0;i<normal_string.length();i++){
    int counter=0;
	for (int j=0;j<key_string.length();j++){
		if(normal_string[i+j]==keystring[j]){
          counter++;
        }
      	else{
			break;
        }
    }
    if(counter>correct_num){
		correct_num=counter;
    }
  }
  cout<<normal_string.length-correctnum;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: 'keystring' was not declared in this scope; did you mean 'key_string'?
    8 |   cin>>keystring;
      |        ^~~~~~~~~
      |        key_string
a.cc:23:30: error: 'correctnum' was not declared in this scope; did you mean 'correct_num'?
   23 |   cout<<normal_string.length-correctnum;
      |                              ^~~~~~~~~~
      |                              correct_num
Language: C++

#include<stdio.h>
#include<math.h>
#include<iostream>
#include<string>
#include<vector>
#include<Bits.h>
using namespace std;
int main() {
    string S;
    string T;
    cin >> S;
    cin >> T;
    string P;
    int n;
    n = 0;
    int t;
    t = T.size();
    int s;
    s = S.size();
    int t2;
    t2 = 0;
    int j;
    j = 0;
    int max;
    max = 0;
    int h;
    h = 0;
    for (int i = 0; i <= t; i++) {
        if (T[t2] = S[n]) {
            j++;
        }
        t2++;
        n++;
        if (T[t2] = S[n]) {
            j++;
            int z = 0;
            P.append(z, n);
        }
        if (max < j) {
            max = j;
            j = 0;
        }
    }
    cout << t - max << endl;
}


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

#include<stdio.h>
#include<math.h>
#include<iostream>
#include<string>
#include<vector>
#include<Bits.h>
using namespace std;
int main() {
    string S;
    string T;
    cin >> S;
    cin >> T;
    string P;
    int n;
    n = 0;
    int t;
    t = T.size();
    int s;
    s = S.size();
    int t2;
    t2 = 0;
    int j;
    j = 0;
    int max;
    max = 0;
    int h;
    h = 0;
    for (int i = 0; i <= t; i++) {
        if (T[t2] = S[n]) {
            j++;
        }
        t2++;
        n++;
        if (T[t2] = S[n]) {
            s++;
            int z = 0;
            P.append(z, n);
        }
        if (max < j) {
            max = j;
            j = 0;
        }
    }
    cout << t - max << endl;
}


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

#include <bits/stdc++.h>
#define int long long

using namespace std;

signed main(){
  string s,t;
  cin>>s>>t;
  int ans = 1000000000;
  for(int i = 0; i <= (s.length()-t.length()); i++){
    int cnt = 0;
    for(all j: t)
      if(s[i+j]!=t[j]) cnt++;
    ans=min(ans,cnt);
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'all' was not declared in this scope; did you mean 'std::filesystem::perms::all'?
   12 |     for(all j: t)
      |         ^~~
      |         std::filesystem::perms::all
In file included from /usr/include/c++/14/filesystem:51,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200,
                 from a.cc:1:
/usr/include/c++/14/bits/fs_fwd.h:158:7: note: 'std::filesystem::perms::all' declared here
  158 |       all               =  0777,
      |       ^~~
a.cc:15:3: error: expected primary-expression before '}' token
   15 |   }
      |   ^
a.cc:14:22: error: expected ')' before '}' token
   14 |     ans=min(ans,cnt);
      |                      ^
      |                      )
   15 |   }
      |   ~                   
a.cc:12:8: note: to match this '('
   12 |     for(all j: t)
      |        ^
a.cc:15:3: error: expected primary-expression before '}' token
   15 |   }
      |   ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int a;
  cin>>a;
  int b,c;
  cin>>b>>c;
	string s
    cin>>s;
  cout<<(a+b+c)<<" "<<s;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: expected initializer before 'cin'
   10 |     cin>>s;
      |     ^~~
a.cc:11:23: error: 's' was not declared in this scope
   11 |   cout<<(a+b+c)<<" "<<s;
      |                       ^
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main()
{
  string S,T;
  cin>>S>>T;
  int a=T.size();
  for(int x=0; x=< S.size()- T.size(); x++)
  { 
    int diff=0;
    for(int i=0;i<= T.size();i++)
    {
      if(T[i]!=S[x+1])
      {
        diff++;
      }
    }
    a=min(a,diff);
  }
  cout<<a<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: expected primary-expression before '<' token
   10 |   for(int x=0; x=< S.size()- T.size(); x++)
      |                  ^
Language: C++

#include<iostream>
#include<string.h>
#include<algorithm.h>
using namespace std;
int main()
{
  string S,T;
  cin>>S>>T;
  int a=T.size();
  for(int x=0; x=< S.size()- T.size(); x++)
  { 
    int diff=0;
    for(int i=0;i<= T.size();i++)
    {
      if(T[i]!=S[x+1])
      {
        diff++;
      }
    }
    a=min(a,diff);
  }
  cout<<a<<endl;
}

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

// In the nAme Of Allah
#include<bits/stdc++.h>
#define pb push_back
#define ins insert
#define f first
#define pp pop_back
#define ll long long int
#define fst  ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
using namespace std;
string s,t;
priority_queue<ll> pq;
ll main()
{
   fst;
   ll p=0,l=0;
  cin>>s>>t;
  if(s.size()==t.size())
  {
      for(ll i=0;i<s.size();i++)
      {
          if(s[i]==t[i])
            p++;
      }
      cout<<s.size()-p;
  }
  else{
  for(ll i=t.size()-1;i<s.size();i++)
  {
     for(ll j=i-t.size()-1;j<=i;j++)
     {
         if(t[j]==s[l])
         {
   p++;
         }
         l++;
             }
             l=0;
             pq.push(p);
             p=0;
  }
  cout<<t.size()-pq.top();
  }
   return 0;
}


Compiler output:
a.cc:7:22: error: '::main' must return 'int'
    7 | #define ll long long int
      |                      ^~~
a.cc:12:1: note: in expansion of macro 'll'
   12 | ll main()
      | ^~
Language: C++

#include <iostream>
using namespace std;

int main() {
	string s,t;
	cin >> s >> t;
	int same[s.length() - t.length()] = { 0 };
	for(int i = 0; i < s.length()-t.length(); i++) {
		int same = 0;
		for(int j = 0; j < t.length(); j++) {
			if(t[j] == s[i+j]) {
				same[i]++;
			}
		}
	}
	int max = -1;
	for(int i = 0; i < s.length() - t.length(); i++) {
		if(same[i] > max) {
			max = same[i];
		}
	}
	int res = t.length() - max;
	cout << res << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:37: error: invalid types 'int[int]' for array subscript
   12 |                                 same[i]++;
      |                                     ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:19:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   19 |     cout << ans << endl;
      |             ^~~
      |             abs
Language: C

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



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

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

int main(){
    string s,t;
    int count=0;
    cin>>s>>t;
    int n=s.length();
    int m=t.length();
    int k;
    int ans=1000000;
    for(int r=0;r<=n-m;r++){
        count = 0;
        k = i;
        for(int i=0;i<m;i++){
            if(s[k]!=t[i]){
                count++;
                k++;
            }
        }
        ans=min(ans,count);
    }
    
    cout<<ans;
}


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

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

int main(){
    string s,t;
    int count=0;
    cin>>s>>t;
    int n=s.length();
    int m=t.length();
    int ans=1000000;
    for(int r=0;r<=n-m;r++){
        cnt=0;
        for(int i=0;i<m;i++){
            if(s[i+r]!=t[i]){
                count++;
            }
        }
        ans=min(ans,count);
    }
    
    cout<<ans;
}


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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'll' was not declared in this scope
    6 |   ll res=0,ans=0;
      |   ^~
a.cc:8:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
    8 |         ans=0;
      |         ^~~
      |         abs
a.cc:13:4: error: 'res' was not declared in this scope
   13 |    res=max(res,ans);
      |    ^~~
a.cc:16:18: error: 'res' was not declared in this scope
   16 |   cout<<b.size()-res<<endl;
      |                  ^~~
Language: C++

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

#define rep(a,b) for(ll ii=a;ii<b;ii++)
#define ll long long int
#define test() int tt; cin>>tt; while(tt--) 
#define fst_io ios_base::sync_with_stdio(false);cin.tie(NULL);
#define endl '\n'
#define lg 1000000000

int main()
{
  int i, j, min = INT_MAX;	
  string s, ss;
  cin>>s>>ss;

  for(i = 0; i<=s.length()-ss.length(); i++)
  {
  	c = 0;
  	for(j = 0; j<ss.length(); j++)
  	{
  	  if(s[i+j] != ss[j]) c++;	
  	}
  	if(c<min) min = c;
  }
  cout<<min<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:9: error: 'c' was not declared in this scope
   19 |         c = 0;
      |         ^
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#define rep(i,l,r)for(int i=(l);i<(r);i++)

int min(int a,int b){
  if(a<=b) return a;
  else retuarn b;
}

int main(void){
  char s[1000],t[1000];
  scanf("%s",s);
  scanf("%s",t);
  int ans = strlen(t);
  rep(i,0,strlen(s)-strlen(t)+1){
    int diff = 0;
    rep(j,0,strlen(t)){
      if(t[j] != s[i+j]){
	diff++;
      }
    }
    ans = min(ans,diff);
  }
  printf("%d",ans);
return 0;
}

Compiler output:
main.c: In function 'min':
main.c:9:8: error: 'retuarn' undeclared (first use in this function)
    9 |   else retuarn b;
      |        ^~~~~~~
main.c:9:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:15: error: expected ';' before 'b'
    9 |   else retuarn b;
      |               ^~
      |               ;
Language: C++

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

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

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: expected primary-expression before '.' token
    7 |   for(i=0;i<.size()-t.size()+1;i++){
      |             ^
a.cc:14:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   14 |     ans=min(ans,x);
      |     ^~~
      |     abs
a.cc:16:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   16 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: expected primary-expression before '.' token
    7 |   for(i=0;i<.size()-t.size()+1;i++){
      |             ^
a.cc:14:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   14 |     ans=min(ans,x)
      |     ^~~
      |     abs
a.cc:16:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   16 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C++

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

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

#include <iostream>
#include <algorithm>
#include <string>

using namespace std

int main(){
    string s,t;
    
    cin>>s>>t;
    
    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:5:20: error: expected ';' before 'int'
    5 | using namespace std
      |                    ^
      |                    ;
    6 | 
    7 | int main(){
      | ~~~                 
a.cc: In function 'int main()':
a.cc:19:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   19 |         ans=min(ans,diff):
      |         ^~~
      |         abs
a.cc:21:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   21 |     cout<<ans<<endl;
      |           ^~~
      |           abs
Language: C++

#include <iostream>
using namespace std;

int main() {
    string S, T; cin >> S >> T;
    int ans = T.size();
    for (int i = 0; i + T.size() <= S.size(); i++) {
        int c = 0;
        for (int j = 0; j < T.size(); j++) {
            c += S[i + j]! = T[j];
        }
        if (ans > c)
            ans = c;
    }
    cout << ans << "\n";
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:26: error: expected ';' before '!' token
   10 |             c += S[i + j]! = T[j];
      |                          ^
      |                          ;