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

#include<bits/stdc++.h>
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
    for(int i=0;i<t.size();i++){
    if(s[start+i]!=t[i]){
      diff++;
    }
    }
    ans = min(ans,diff);
  }
  cout<<ans<<"\n";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: expected initializer before 'for'
    9 |     for(int i=0;i<t.size();i++){
      |     ^~~
a.cc:9:17: error: 'i' was not declared in this scope
    9 |     for(int i=0;i<t.size();i++){
      |                 ^
a.cc:14:19: error: 'diff' was not declared in this scope
   14 |     ans = min(ans,diff);
      |                   ^~~~
Language: C++

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

typedef unsigned long long ll;
#define mod 1000000007
#define all(x) (x).begin(),(x).end()

void solve(){
  string s,t;
  cin>>s>>t;
  int cnt=t.size();
  for (int start = 0; start <= s.size() - tsize(); start++)
    {
        int diff = 0;
        for (int i = 0; i < t.size(); i++)
        {
            if (t[i] != s[start + i]) {
                diff++;
            }
        }
        cnt = min(cnt, diff);
    }
  cout<<cnt<<endl;  
}

int main()
{
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  solve(); 
  return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:12:43: error: 'tsize' was not declared in this scope
   12 |   for (int start = 0; start <= s.size() - tsize(); start++)
      |                                           ^~~~~
Language: C++

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

int main() {
  string s, t;
  int maxCount;
  
  cin >> s;
  cin >> t;
  
  for(int i = 0; i < s.size()-t.size(); i++){
    int count = 0
    for(int j = 0; j < t.size(); t++){
      if(s.at(i+j) != t.at(j)){
      	count++;
      }
    }
    if(count > maxCount){
      maxCount = count;
  }

  cout << maxCount << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: expected ',' or ';' before 'for'
   13 |     for(int j = 0; j < t.size(); t++){
      |     ^~~
a.cc:13:20: error: 'j' was not declared in this scope
   13 |     for(int j = 0; j < t.size(); t++){
      |                    ^
a.cc:13:35: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
   13 |     for(int j = 0; j < t.size(); t++){
      |                                  ~^~
a.cc:23:2: error: expected '}' at end of input
   23 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
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 diff=0;
for(int j=0;j<t.size();j++)
{
if(t[j]!=s[i+j])
dif++;
}
}
ans=min(ans.diff);
cout<<ans;
return 0;
}

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

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


/********************************************************************/
#define M1 1000000007	//Standard primes used in modulo operations
#define M2 998244353
#define PI 3.1415926536
const int INF = INT_MAX;
#define ll long long
#define pll pair<ll,ll>
#define REP(i, a, b) for(ll i=a;i<b;i++)
#define REPR(i, a, b) for(ll i=b-1;i>=a;i--)
#define forr(i, n) for(ll i=0;i<n;i++)
#define ff first
#define ss second
#define pb push_back
#define ppb pop_back
#define mp make_pair
#define MT make_tuple
#define V(a) vector<a>
#define vi vector<ll>
#define endl '\n'
#define ce(ele) cout<<ele<<' '
#define cs(ele) cout<<ele<<'\n'
#define CASE(t) ll t; cin>>t; while(t--)
#define space ' '
#define yes cout<<"Yes"<<endl
#define no cout<<"No"<<endl

void FAST() {	//FAST Input Output, DONT use both scnaf,printf / cin,cout , Use any ONE system
	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
}
ll gcd(ll x, ll y) {	//returns gcd of two long long ints
	if (x == 0) return y;
	return gcd(y % x, x);
}

ll powM(ll x, ll y, ll m) {	//returns (a^b)%m ( ^ is exponent )
	ll ans = 1, r = 1;
	x %= m;
	while (r > 0 && r <= y)
	{
		if (r & y)
		{
			ans *= x;
			ans %= m;
		}
		r <<= 1;
		x *= x;
		x %= m;
	}
	return ans;
}

map<long long, long long> factorize(long long n) {	//returns map containing factor and multiplicity, Eg: 60 = {{2,2},{3,1},{5,1}}
	map<long long, long long> ans;
	for (long long i = 2; i * i <= n; i++) {
		while (n % i == 0) {
			ans[i]++;
			n /= i;
		}
	}
	if (n > 1) {
		ans[n]++;
		n = 1;
	}
	return ans;
}
/* **********END OF TEMPLATE*********** */

int main() {
	/*  Codeforces #595 Div.3 :)*/
	FAST();
	string s,t;
	cin>>s>>t;
	int ns,nt;
	ns = s.length();
	nt = t.length();
	vector<int>v;
	REP(i,0,ns-nt){
		int cnt=0;
		REP(j,0,nt){
			if(s[i+j]==t[j]){
				cnt++;
			}
		}
		v.push_back(cnt);
	}
	sort(v.begin(),v.end());
	if(v.sixe()>0){
	cout<<nt-v[v.size()-1]<<endl;
	}
	else{
		cout<<nt<<endl;
	}
		
	
	}

		


Compiler output:
a.cc: In function 'int main()':
a.cc:93:14: error: 'class std::vector<int>' has no member named 'sixe'; did you mean 'size'?
   93 |         if(v.sixe()>0){
      |              ^~~~
      |              size
Language: C++

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


/********************************************************************/
#define M1 1000000007	//Standard primes used in modulo operations
#define M2 998244353
#define PI 3.1415926536
const int INF = INT_MAX;
#define ll long long
#define pll pair<ll,ll>
#define REP(i, a, b) for(ll i=a;i<b;i++)
#define REPR(i, a, b) for(ll i=b-1;i>=a;i--)
#define forr(i, n) for(ll i=0;i<n;i++)
#define ff first
#define ss second
#define pb push_back
#define ppb pop_back
#define mp make_pair
#define MT make_tuple
#define V(a) vector<a>
#define vi vector<ll>
#define endl '\n'
#define ce(ele) cout<<ele<<' '
#define cs(ele) cout<<ele<<'\n'
#define CASE(t) ll t; cin>>t; while(t--)
#define space ' '
#define yes cout<<"Yes"<<endl
#define no cout<<"No"<<endl

void FAST() {	//FAST Input Output, DONT use both scnaf,printf / cin,cout , Use any ONE system
	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
}
ll gcd(ll x, ll y) {	//returns gcd of two long long ints
	if (x == 0) return y;
	return gcd(y % x, x);
}

ll powM(ll x, ll y, ll m) {	//returns (a^b)%m ( ^ is exponent )
	ll ans = 1, r = 1;
	x %= m;
	while (r > 0 && r <= y)
	{
		if (r & y)
		{
			ans *= x;
			ans %= m;
		}
		r <<= 1;
		x *= x;
		x %= m;
	}
	return ans;
}

map<long long, long long> factorize(long long n) {	//returns map containing factor and multiplicity, Eg: 60 = {{2,2},{3,1},{5,1}}
	map<long long, long long> ans;
	for (long long i = 2; i * i <= n; i++) {
		while (n % i == 0) {
			ans[i]++;
			n /= i;
		}
	}
	if (n > 1) {
		ans[n]++;
		n = 1;
	}
	return ans;
}
/* **********END OF TEMPLATE*********** */

int main() {
	/*  Codeforces #595 Div.3 :)*/
	FAST();
	string s,t;
	cin>>s>>t;
	int ns,nt;
	ns = s.length();
	nt = t.length();
	vector<int>v;
	REP(i,0,ns-nt){
		int cnt=0;
		REP(j,0,nt){
			if(s[i+j]==t[j]){
				cnt++;
			}
		}
		v.push_back(cnt);
	}
	sort(v.begin(),v.end());
	if(v.sixe()>0){
	cout<<nt-v[v.size()-1]<<endl;
	}}
	else{
		cout<<nt<<endl;
	}
		
	
	

		


Compiler output:
a.cc: In function 'int main()':
a.cc:93:14: error: 'class std::vector<int>' has no member named 'sixe'; did you mean 'size'?
   93 |         if(v.sixe()>0){
      |              ^~~~
      |              size
a.cc: At global scope:
a.cc:96:9: error: expected unqualified-id before 'else'
   96 |         else{
      |         ^~~~
Language: C++

#include<iostream>
#include<cstring>

using namespace std;

const int N=1010;
char s[N];
char t[N];

int main(){
    scanf("%s",s);
    scanf("%s",t);
    int len1=strlen(s);
    int len2=strlen(t);
    int res=N;
    for(int i=0;i+len2<=len1;++i){
        int cnt=0;1
        for(int j=0;j<len2;++j){
            if(t[j]!=s[i+j]) cnt++;
        }
        res=min(res,cnt);
    }
    cout<<res<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:20: error: expected ';' before 'for'
   17 |         int cnt=0;1
      |                    ^
      |                    ;
   18 |         for(int j=0;j<len2;++j){
      |         ~~~         
a.cc:18:21: error: 'j' was not declared in this scope
   18 |         for(int j=0;j<len2;++j){
      |                     ^
Language: C++

#include <iostream>
#include <algorithm>
#include <iomanip>
#include <string>
#include<cmath>
#include <ctype.h>
#include <stdlib.h>
#include <vector>
#include <math.h>
#include <stack>
#define PI 3.14159265
#define ll long long
#define endl '\n'
#define sz(s) (int)(s.size())
#define all(v) v.begin(),v.end()
const int N = 1e6;
using namespace std;
void RUN() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	// freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
}
//vector<int>v1(10000), v2(100005), v3(100005);

int main() {
	RUN();

	string s, t;
	cin >> s >> t;
	int mn = INT_MAX;
	for (int i = 0; i < sz(s); i++) {
		for (int j = 0; j < sz(s); j++) {
			if (j - i + 1 == sz(t)) {
				int indx = 0, c = 0;
				for (int k = i; k <= j; k++) {
					if (s[k] != t[indx]) {
						c++;
					}
					indx++;
				}
				if (c < mn) {
					mn = c;
				}
			}
		}
	}
	cout << mn;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:18: error: 'INT_MAX' was not declared in this scope
   32 |         int mn = INT_MAX;
      |                  ^~~~~~~
a.cc:11:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   10 | #include <stack>
  +++ |+#include <climits>
   11 | #define PI 3.14159265
Language: C++

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

#define for0(i, n) for (int i = 0; i < (int)(n); ++i) 
#define for1(i, n) for (int i = 1; i <= (int)(n); ++i)
#define forc(i, l, r) for (int i = (int)(l); i <= (int)(r); ++i) 
#define forr0(i, n) for (int i = (int)(n) - 1; i >= 0; --i)
#define forr1(i, n) for (int i = (int)(n); i >= 1; --i)
#define deb(x) cout << #x << "= " << x << endl
#define pb push_back
#define all(x) x.begin(), x.end()
#define sortall(x) sort(all(x))
#define tr(x) for(auto it = x.begin(); x != x.end(); it++)
#define fast ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define MOD 1000000007

typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef double ld;

int main() {
	fast;
    int t=1;
    while(t--){
        //begin code here
        string s,t;
        cin>>s>>t;
        int slen = s.length();
        int tlen = t.length();
        int ans=tlen;
        for (int start = 0; start <= slen - tlen; start++){
            int diff = 0;
            for (int i = 0; i < T.size(); i++){
                if (T[i] != S[start + i]) {
                    diff++;
                }
            }
            ans = min(ans, diff);
        }
        cout << ans << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:33: error: 'T' was not declared in this scope
   39 |             for (int i = 0; i < T.size(); i++){
      |                                 ^
a.cc:40:29: error: 'S' was not declared in this scope
   40 |                 if (T[i] != S[start + i]) {
      |                             ^
Language: C

#include<bits/stdc++.h>
using namespace std;
int main(){
  string S,T;
  cin>>S>>T;
  int counter=0;
  for(int i=0;i<=(S.size()-T.size());i++){
    int counter2=0;
    for(int j=0;j<T.size();j++){
      if(S[j+i]==T[j])counter2++;
    }
    if(counter2>counter)counter=counter2;
  }
  int c=T.size()-counter;
  cout<<c<<endl;
  return 0;
}

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(void){
  string S,T;
  cin>>S>>T;
  int a=S.size()-T.size(), b=T.size(), counter=0;
  for(int i=0;i<=a;i++){
    for(int j=0;j<b;j++){
      int counter2=0;
      if(S[j+i]==T[j])counter2++;
    }
    if(counter2>counter)counter=counter2;
  }
  int c=T.size()-counter;
  cout<<c<<endl;
  return 0;
}

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

#include<bits/stdc++.h>
int main(void){
  string S,T;
  cin>>S>>T;
  int a=S.size()-T.size(), b=T.size(), counter=0;
  for(int i=0;i<=a;i++){
    for(int j=0;j<b;j++){
      int counter2=0;
      if(S[j+i]==T[j])counter2++;
    }
    if(counter2>counter)counter=counter2;
  }
  int c=T.size()-counter;
  cout<<c<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'string' was not declared in this scope
    3 |   string S,T;
      |   ^~~~~~
a.cc:3:3: 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:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   cin>>S>>T;
      |   ^~~
      |   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:4:8: error: 'S' was not declared in this scope
    4 |   cin>>S>>T;
      |        ^
a.cc:4:11: error: 'T' was not declared in this scope
    4 |   cin>>S>>T;
      |           ^
a.cc:7:19: error: 'b' was not declared in this scope
    7 |     for(int j=0;j<b;j++){
      |                   ^
a.cc:11:8: error: 'counter2' was not declared in this scope
   11 |     if(counter2>counter)counter=counter2;
      |        ^~~~~~~~
a.cc:11:17: error: 'counter' was not declared in this scope
   11 |     if(counter2>counter)counter=counter2;
      |                 ^~~~~~~
a.cc:13:18: error: 'counter' was not declared in this scope
   13 |   int c=T.size()-counter;
      |                  ^~~~~~~
a.cc:14:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |   cout<<c<<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:14:12: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   14 |   cout<<c<<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>
int main(void){
  string S,T;
  cin>>S>>T;
  int a=S.size()-T.size(), b=T.size(), counter=0;
  for(int i=0;i<=a;i++){
    for(int j=0;j<b;j++){
      int counter2=0;
      if(S[j+i]==T[j])counter2++;
    }
    if(counter2>counter)counter=counter2;
  }
  int c=T.size()-counter;
  cout<<c<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'string' was not declared in this scope; did you mean 'stdin'?
    3 |   string S,T;
      |   ^~~~~~
      |   stdin
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   cin>>S>>T;
      |   ^~~
a.cc:4:8: error: 'S' was not declared in this scope
    4 |   cin>>S>>T;
      |        ^
a.cc:4:11: error: 'T' was not declared in this scope
    4 |   cin>>S>>T;
      |           ^
a.cc:7:19: error: 'b' was not declared in this scope
    7 |     for(int j=0;j<b;j++){
      |                   ^
a.cc:11:8: error: 'counter2' was not declared in this scope
   11 |     if(counter2>counter)counter=counter2;
      |        ^~~~~~~~
a.cc:11:17: error: 'counter' was not declared in this scope
   11 |     if(counter2>counter)counter=counter2;
      |                 ^~~~~~~
a.cc:13:18: error: 'counter' was not declared in this scope
   13 |   int c=T.size()-counter;
      |                  ^~~~~~~
a.cc:14:3: error: 'cout' was not declared in this scope
   14 |   cout<<c<<endl;
      |   ^~~~
a.cc:14:12: error: 'endl' was not declared in this scope
   14 |   cout<<c<<endl;
      |            ^~~~
Language: C

#include<stdio.h>
int main(void){
  string S,T;
  scanf("%s&s", &S, &T);
  int a=S.size()-T.size, b=T.size(), counter=0;
  for(int i=0;i<=a;i++){
    for(int j=0;j<b;j++){
      int counter2=0;
      if(S[j+i]==T[j])counter2++;
    }
    if(counter2>counter)counter=counter2;
  }
  int c=T.size()-counter;
  printf("%d",c);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:3: error: unknown type name 'string'; did you mean 'stdin'?
    3 |   string S,T;
      |   ^~~~~~
      |   stdin
main.c:5:10: error: request for member 'size' in something not a structure or union
    5 |   int a=S.size()-T.size, b=T.size(), counter=0;
      |          ^
main.c:5:19: error: request for member 'size' in something not a structure or union
    5 |   int a=S.size()-T.size, b=T.size(), counter=0;
      |                   ^
main.c:5:29: error: request for member 'size' in something not a structure or union
    5 |   int a=S.size()-T.size, b=T.size(), counter=0;
      |                             ^
main.c:9:11: error: subscripted value is neither array nor pointer nor vector
    9 |       if(S[j+i]==T[j])counter2++;
      |           ^
main.c:9:19: error: subscripted value is neither array nor pointer nor vector
    9 |       if(S[j+i]==T[j])counter2++;
      |                   ^
main.c:11:8: error: 'counter2' undeclared (first use in this function); did you mean 'counter'?
   11 |     if(counter2>counter)counter=counter2;
      |        ^~~~~~~~
      |        counter
main.c:11:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:10: error: request for member 'size' in something not a structure or union
   13 |   int c=T.size()-counter;
      |          ^
Language: C

#include<stdio.h>
int main(void){
  string S,T;
  scanf("%s&s", &S, &T);
  int a=S.size()-T.size, b=T.size(), counter=0;
  for(int i=0;i<=a;i++){
    for(int j=0;j<b;j++){
      int counter2=0;
      if(S[j]==T[j])counter2++;
    }
    if(counter2>counter)counter=counter2;
  }
  int c=T.size-counter;
  printf("%d",c);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:3: error: unknown type name 'string'; did you mean 'stdin'?
    3 |   string S,T;
      |   ^~~~~~
      |   stdin
main.c:5:10: error: request for member 'size' in something not a structure or union
    5 |   int a=S.size()-T.size, b=T.size(), counter=0;
      |          ^
main.c:5:19: error: request for member 'size' in something not a structure or union
    5 |   int a=S.size()-T.size, b=T.size(), counter=0;
      |                   ^
main.c:5:29: error: request for member 'size' in something not a structure or union
    5 |   int a=S.size()-T.size, b=T.size(), counter=0;
      |                             ^
main.c:9:11: error: subscripted value is neither array nor pointer nor vector
    9 |       if(S[j]==T[j])counter2++;
      |           ^
main.c:9:17: error: subscripted value is neither array nor pointer nor vector
    9 |       if(S[j]==T[j])counter2++;
      |                 ^
main.c:11:8: error: 'counter2' undeclared (first use in this function); did you mean 'counter'?
   11 |     if(counter2>counter)counter=counter2;
      |        ^~~~~~~~
      |        counter
main.c:11:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:10: error: request for member 'size' in something not a structure or union
   13 |   int c=T.size-counter;
      |          ^
Language: C++

#include <bits/stdc++.h>
typedef long long ll;
const int inf = 1e9;
using namespace std;






int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);

    string s, t;
    cin >> s >> t;
    int cnt = 1e9;
    for(int i = 0; i < s.size(); i++){
        int ans = 0;
        for(int j = 0; j < t.size(); j++){
            if(i+j >= s.size()){
                ans = 1e9;
                break;
            }
            if(s[i+j] != t[j]){
                ans++;
            }
        }
        ans = min(ans, cnt);
    }
    cout << ans << '\n';

    return 0;
}


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

#include <bits/stdc++.h>
typedef long long ll;
const int inf = 1e9;
using namespace std;






int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);

    string s, t;
    cin >> s >> t;
    int cnt = 1e9;
    for(int i = 0; i < s.size(); i++){
        int ans = 0;
        for(int j = 0; j < t.size(); j++){
            if(i+j >= s.size()){
                ans = 1e9;
                break;
            }
            if(s[i+j] != t[j]){
                ans++;
            }
        }
        ans = min(ans, cnt)
    }
    cout << ans << '\n';

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:28: error: expected ';' before '}' token
   29 |         ans = min(ans, cnt)
      |                            ^
      |                            ;
   30 |     }
      |     ~                       
a.cc:31:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   31 |     cout << ans << '\n';
      |             ^~~
      |             abs
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:14: error: 'j' was not declared in this scope
   15 |       if(S[i+j]!=T[i])
      |              ^
Language: C++


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



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

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

int main() {
  string s,t;
  cin >> s >> t ;
  int a=s.size();
  int b=t.size()
  int x=0;
  for (int i=0; i<a-b ; i++)
  {
    int y=0;
    for (int j=0; j<b ; j++)
    if(s[j]==t[i+j])
    {
      y++;
    }
    x=max(x,y);
  }
  cout << b-x <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'int'
    9 |   int x=0;
      |   ^~~
a.cc:18:5: error: 'x' was not declared in this scope
   18 |     x=max(x,y);
      |     ^
a.cc:20:13: error: 'x' was not declared in this scope
   20 |   cout << b-x <<endl;
      |             ^
Language: C++

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


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

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

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

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

int main() {
  string s,t;
  cin >> s >> t ;
  int a=s.size();
  int x=0;
  for (int i=0; i<t.size()-s.size(); i++)
  {
    int y=0;
    for (int j=0; j<s.size(); j++)
    if(s[j]==t[i+j])
    {
      y++;
    }
    x=max(x,y);
  }
  cout << s.size()-y <<endl;
}


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

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

int main() {
  string s,t:
  cin >> s >> t ;
  int a=s.size();
  int x=0;
  for (int i=0; i<t.size()-s.size(); i++)
  {
    int y=0;
    for (int j=0; j<s.size(); j++)
    if(s[j]==t[i+j])
    {
      y++;
    }
    x=max(x,y);
  }
  cout << s.size()-y <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:13: error: found ':' in nested-name-specifier, expected '::'
    5 |   string s,t:
      |             ^
      |             ::
a.cc:5:12: error: 't' has not been declared
    5 |   string s,t:
      |            ^
a.cc:6:7: error: qualified-id in declaration before '>>' token
    6 |   cin >> s >> t ;
      |       ^~
a.cc:9:19: error: 't' was not declared in this scope
    9 |   for (int i=0; i<t.size()-s.size(); i++)
      |                   ^
a.cc:19:20: error: 'y' was not declared in this scope
   19 |   cout << s.size()-y <<endl;
      |                    ^
Language: C++

#include <stdio.h>
#include <string.h>
 
int main() {
	
	char S[1001] = {'\0'};
  	char T[1001] = {'\0'};
	 
	int count = 0, min = 1000;
	 
	gets(S);
	gets(T);
	int len1 = strlen(S);
	int len2 = strlen(T);
 
	for(int i=0; i + len2 <= len1;i++){
	    count = 0;
	    for(int j=0; j<len2; j++){
	      	if(S[i+j] != T[j]){
	        	count++;
	      	}
	    }
	    if(min > count) min = count;
  	}
  	printf("%d\n",min);
 
 
  return 0;
}

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

public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String S = scanner.nextLine();
        String T = scanner.nextLine();
        int min = Integer.MAX_VALUE;
        for(int i = 0; i<S.length()-T.length(); i++){
            min = Math.min(min, find(S.substring(i, i+T.length()), T));
        }
        System.out.println(min);
    }

    public static int find(String a, String b){
        int calc = 0;
        for(int x = 0; x<a.length(); x++){
            if(a.charAt(x) != b.charAt(x)){
                calc++;
            }
        }
        return calc;
    }

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: C++

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

int main() {
	
	int max=0, num=0;
	char x[1001], y[1001];
	
	fgets(x);
	fgets(y);
	
	int len1 = strlen(x);
	int len2 = strlen(y);
	
	for(int i=0; i<len1-len2; i++) {
		num=0;
		for(int j=0; j<len2; j++) {
			if(x[i+j] == y[j]) {
				num++;
			}
			if(num > max) {
				max = num;
			}
		}
	}
	
	printf("%d", len2 - max);
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: too few arguments to function 'char* fgets(char*, int, FILE*)'
    9 |         fgets(x);
      |         ~~~~~^~~
In file included from a.cc:1:
/usr/include/stdio.h:654:14: note: declared here
  654 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
      |              ^~~~~
a.cc:10:14: error: too few arguments to function 'char* fgets(char*, int, FILE*)'
   10 |         fgets(y);
      |         ~~~~~^~~
/usr/include/stdio.h:654:14: note: declared here
  654 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
      |              ^~~~~
Language: C++

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

int main() {
	
	int max=0, num=0;
	char x[1001], y[1001];
	
	gets(x);
	gets(y);
	
	int len1 = strlen(x);
	int len2 = strlen(y);
	
	for(int i=0; i<len1-len2; i++) {
		num=0;
		for(int j=0; j<len2; j++) {
			if(x[i+j] == y[j]) {
				num++;
			}
			if(num > max) {
				max = num;
			}
		}
	}
	
	printf("%d", len2 - max);
	
	return 0;
}

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

#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;

typedef long long ll;
typedef map<int, int> M;
typedef pair<int, int> P;

#define REP(i, n) for (int i = 0; i < n; i++)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define ALL(v) v.begin(), v.end()
#define SIZE(x) ((int)(x).size())

int main() {
  string s, t;
  cin >> s >> t;
  int tmp, result = 1001;
  REP(i, SIZE(s) - SIZE(t) + 1) {
    tmp = 0;
    REP(j, SIZE(T)) {
      if (s[i+j] != t[j]) tmp++;
    }
    if (tmp < result) result = tmp;
  }
  cout << result << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:17: error: 'T' was not declared in this scope
   20 |     REP(j, SIZE(T)) {
      |                 ^
a.cc:9:39: note: in definition of macro 'REP'
    9 | #define REP(i, n) for (int i = 0; i < n; i++)
      |                                       ^
a.cc:20:12: note: in expansion of macro 'SIZE'
   20 |     REP(j, SIZE(T)) {
      |            ^~~~
Language: C++

#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;

typedef long long ll;
typedef map<int, int> M;
typedef pair<int, int> P;

#define REP(i, n) for (int i = 0; i < n; i++)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define ALL(v) v.begin(), v.end()
#define SIZE(x) ((ll)(x).size())

int main() {
  string s, t;
  cin >> s >> t;
  int tmp, result = 1001;
  REP(i, SIZE(s) - SIZE(t) + 1) {
    tmp = 0;
    REP(j, SIZE(T)) {
      if (s[i+j] != t[j]) tmp++;
    }
    if (tmp < result) result = tmp;
  }
  cout << result << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:17: error: 'T' was not declared in this scope
   20 |     REP(j, SIZE(T)) {
      |                 ^
a.cc:9:39: note: in definition of macro 'REP'
    9 | #define REP(i, n) for (int i = 0; i < n; i++)
      |                                       ^
a.cc:20:12: note: in expansion of macro 'SIZE'
   20 |     REP(j, SIZE(T)) {
      |            ^~~~
Language: C++

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

int main() {
	string S, T;
	cin >> S >> T;
	int res = 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 + 1]) {
	            diff++;
	        }
	    }
	    res = min(res, diff);
	}
	cout >> res >> endl;
}


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

#include <iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: expected initializer before 'for'
   10 |             for (int i = 0; i < T.size(); i++) {
      |             ^~~
a.cc:10:29: error: 'i' was not declared in this scope
   10 |             for (int i = 0; i < T.size(); i++) {
      |                             ^
a.cc:15:28: error: 'diff' was not declared in this scope
   15 |             res = min(res, diff);
      |                            ^~~~
a.cc:17:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   17 |         cout >> ans >> endl;
      |                 ^~~
      |                 abs
Language: C++

#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: expected ',' or ';' before 'for'
    8 |         for (int start = 0; start <= S.size() - T.size(); start ++) {
      |         ^~~
a.cc:8:29: error: 'start' was not declared in this scope
    8 |         for (int start = 0; start <= S.size() - T.size(); start ++) {
      |                             ^~~~~
a.cc:17:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   17 |         cout >> ans >> endl;
      |                 ^~~
      |                 abs
Language: C++

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

int main() {
	string longW,shortW;
	int a, b, c,ans=INT_MAX;
	cin >> longW >> shortW;
	a = longW.size();
	b = shortW.size();
	c = a - b;
	for (int i=0;i<=c;i++) {
		int d = 0;
		for (int j=0;j<shortW.size();j++) {
			d+=(longW.at(i+j)!=shortW.at(j));
		}
		ans = min(ans, d);
		cout << ans << endl;

	}
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:25: error: 'INT_MAX' was not declared in this scope
    8 |         int a, b, c,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<vector>
  +++ |+#include <climits>
    4 | using namespace std;
Language: C++

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

int main(){
    string s,t;
    int j = 0;
    cin >> s >> t;
    auto found = s.find(t[0]);
    int total = 0;
    int t_size = t.size();
    int s_size = s.size();
    for (int i = found; i <= s_size; i++){
        if (j >= t_size())
            break;
        if (s[i] != t[j])
            total += 1;
        j += 1;
    }
    cout << total;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:13:24: error: 't_size' cannot be used as a function
   13 |         if (j >= t_size())
      |                  ~~~~~~^~
Language: C++

#include<iostream>
using namespace std;
int main(){
  string S;
  string T;
  int count =0;
  int max=0;
  cin >> S >> T;
  for(i=0; i<S.size()-T.size()+1;i++){
    for(j=0; j<T.size(); j++){
      if(S.at(i+j)==T.at(j)){
        count++;
      }
    }
    if(max< count){
      max=count;
    }
    count=0;
  }
  cout<< T.size()-max<< endl;
}

  
      
        


Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: 'i' was not declared in this scope
    9 |   for(i=0; i<S.size()-T.size()+1;i++){
      |       ^
a.cc:10:9: error: 'j' was not declared in this scope
   10 |     for(j=0; j<T.size(); j++){
      |         ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  string S;
  string T;
  int count =0;
  int max=0;
  cin >> S >> T;
  for(i=0; i<S.size()-T.size()+1;i++){
    for(j=0; j<T.size(); j++){
      if(S.at(i+j)==T.at(j)){
        count++;
      }
    }
    if(max< count){
      max=count;
    }
    count=0;
  }
  cout<< T.size()-max<< endl;
}

  
      
        

Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: 'i' was not declared in this scope
    9 |   for(i=0; i<S.size()-T.size()+1;i++){
      |       ^
a.cc:10:9: error: 'j' was not declared in this scope
   10 |     for(j=0; j<T.size(); j++){
      |         ^
Language: Java


import java.util.Scanner;

/**
 * Created by enpingkuang on 2020/9/10 10:58 下午
 */
public class B {
    public static void Main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.next();
        String t = scanner.next();
        int ans = 10000;
        for(int i = 0;i<s.length()-t.length();i++){
            int x = 0;
            for(int j = 0;j<t.length();j++){
                if(s.charAt(i+j) != t.charAt(j)){
                    x++;
                }
            }
            ans = Math.min(ans,x);
        }
        System.out.println(ans);
    }
}


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


import java.util.Scanner;

/**
 * Created by enpingkuang on 2020/9/10 10:58 下午
 */
public class B {
    public static void Main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.next();
        String t = scanner.next();
        int ans = 10000;
        for(int i = 0;i<t.length();i++){
            for(int j = 0;j<s.length();j++){
                int x = 0;
                int index_t = i;
                int index_s = j;
                while(index_t<t.length() && index_s<s.length() && t.charAt(index_t) == s.charAt(index_s)){
                    x++;
                    index_s++;
                    index_t++;
                }
                ans = Math.min(s.length() - x,ans);
            }
        }
        System.out.println(ans);
    }
}


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

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

int main() {
  int kekka,kari;
  kekka=0;
  kari=0;
  string iti,ni;
  cin >> iti >> ni;
  for(int i=0;i<iti.size()-ni.size();i++) {
    for(int s=o;s<ni.size();i++) {
      if(iti.at(i)==ni.at(s)) {
        kari++;
      }
    }
    if(kekka<kari) {
      kekka=kari;
    }
    kari=0;
  }
  cout << kekka << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: 'o' was not declared in this scope
   11 |     for(int s=o;s<ni.size();i++) {
      |               ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
template<class T> inline bool chmax(T& a, T b) {
  if (a < b) { a = b; return 1; }
  return 0; }
template<class T> inline bool chmin(T& a, T b) {
  if (a > b) { a = b; return 1; }
  return 0; }
ll MOD = 1000000007;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:17:23: error: 'sn' was not declared in this scope; did you mean 's'?
   17 |   for(int i = 0; i <= sn - tn; i++){
      |                       ^~
      |                       s
a.cc:17:28: error: 'tn' was not declared in this scope; did you mean 't'?
   17 |   for(int i = 0; i <= sn - tn; i++){
      |                            ^~
      |                            t
Language: C++

#include <bits/stdc++.h>
#include <atcoder/dsu>
using ll = long long;
using namespace std;
using namespace atcoder;
#define rep(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; i++)
#define reps(i, n) for (int i = 1, i##_len = (int)(n); i <= i##_len; i++)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define rreps(i, n) for (int i = ((int)(n)); i > 0; i--)
#define repi(i, x) \
	for (auto i = (x).begin(), i##_fin = (x).end(); i != i##_fin; i++)
#define all(x) (x).begin(), (x).end()
#define F first
#define S second
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define eb emplace_back
string solve(bool a) { return ((a) ? "Yes" : "No"); }
typedef vector<int> Vi;
typedef vector<Vi> VVi;
typedef pair<int, int> Pi;
typedef vector<Pi> VPi;
typedef vector<long long> V;
typedef vector<V> VV;
typedef pair<long long, long long> P;
typedef vector<P> VP;
template <class T>
inline bool chmax(T& a, T b) {
	if (a < b) {
		a = b;
		return 1;
	}
	return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
	if (a > b) {
		a = b;
		return 1;
	}
	return 0;
}
template <class T, class U>
ostream& operator<<(ostream& os, const pair<T, U>& p) {
	os << "(" << p.first << "," << p.second << ")";
	return os;
}
template <class T>
ostream& operator<<(ostream& os, const vector<T>& v) {
	os << "{";
	rep(i, v.size()) {
		if (i) os << ",";
		os << v[i];
	}
	os << "}";
	return os;
}
template <class T, class U>
istream& operator>>(istream& is, pair<T, U>& p) {
	is >> p.first >> p.second;
	return is;
}
template <class T>
istream& operator>>(istream& is, vector<T>& v) {
	rep(i, v.size()) { is >> v[i]; }
	return is;
}
const long long INFLL = 1LL << 60;
const int INF         = 1 << 30;
const double PI       = acos(-1);
int main() {
return 1;
	int n, q;
	int ans = 0;
	cin >> n >> q;
	dsu d(n);
	int t, u, v;
	rep(i, q) {
		cin >> t >> u >> v;
		if (t == 0) {
			d.merge(u, v);
		} else {
			cout << d.same(u, v) << endl;
		}
	}
}

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