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

#include<iostream>
#include<string>

int main(){
  std::string S, T;
  std::cin >> S >> T;
  int count=0;
  int _min = T.size();
  for(int i=0; i<S.size();i++){
    count=0
    std::string R = S.substr(i, T.size());
    for(int j=0;i<T.size();j++){
        if(R[j]!=T[j]){
            count++;
        }
    }
    if(count<_min){
        _min=count;
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: expected ';' before 'std'
   10 |     count=0
      |            ^
      |            ;
   11 |     std::string R = S.substr(i, T.size());
      |     ~~~     
a.cc:13:12: error: 'R' was not declared in this scope
   13 |         if(R[j]!=T[j]){
      |            ^
Language: Java

import java.util.Scanner;
 
class Main {
  public static void main(String[] args) {
    final Scanner sc = new Scanner(System.in);
    final String s = sc.nextLine();
    final String t = sc.nextLine();
    int max = 0;
 	int j = 0;
    
    for(int i = 0; i < t.length(); i++) {  
      while(s.contains(t.substring(i, j))) {
        j++;
      }
      if(max < j) {
        max = j;
      }
    }
    
    System.out.println(s.length() - (max-1));
  }
}
import java.util.Scanner;
 
class Main {
  public static void main(String[] args) {
    final Scanner sc = new Scanner(System.in);
    final String s = sc.nextLine();
    final String t = sc.nextLine();
    int max = 0;
    
    for(int i = 0; i < t.length(); i++) {  
 	  int j = 0;
      while(s.contains(t.substring(i, j))) {
        j++;
      }
      if(max < j) {
        max = j;
      }
    }
    
    System.out.println(s.length() - (max-1));
  }
}
提出情報


Compiler output:
Main.java:23: error: class, interface, enum, or record expected
import java.util.Scanner;
^
Main.java:45: error: reached end of file while parsing
????
^
2 errors
Language: Java

import java.util.Scanner;
 
class Main {
  public static void main(String[] args) {
    final Scanner sc = new Scanner(System.in);
    final String s = sc.nextLine();
    final String t = sc.nextLine();
 	int j = 1;
    
    for(int i = 0; i < t.length(); i++) {  
      while(s.contains(t.substring(i, j))) {
        j++;
      }
    }
    
    System.out.println((s.length() - (j-1)).toString());
  }
}

Compiler output:
Main.java:16: error: int cannot be dereferenced
    System.out.println((s.length() - (j-1)).toString());
                                           ^
1 error
Language: Java

import java.util.Scanner;
 
class Main {
  public static void main(String[] args) {
    final Scanner sc = new Scanner(System.in);
    final String s = sc.nextLine();
    final String t = sc.nextLine();
 	int j = 1;
    
    for(int i = 0; i < t.length(); i++) {  
      while(s.contains(t.substring(i, j))) {
        j++;
      }
    }
    
    System.out.println((s.length - (j-1)).toString());
  }
}

Compiler output:
Main.java:16: error: cannot find symbol
    System.out.println((s.length - (j-1)).toString());
                         ^
  symbol:   variable length
  location: variable s of type String
1 error
Language: Java

import java.util.Scanner;
 
class Main {
  public static void main(String[] args) {
    final Scanner sc = new Scanner(System.in);
    final String s = sc.nextLine();
    final String t = sc.nextLine();

    for(int i = 0; i < t.length; i++) {
      for(int j = 1; j < s.contains(t.substring(i, j)); j++) {
      }
    }
    
    System.out.println((s.length - (j-1)).toString());
  }
}

Compiler output:
Main.java:9: error: cannot find symbol
    for(int i = 0; i < t.length; i++) {
                        ^
  symbol:   variable length
  location: variable t of type String
Main.java:10: error: bad operand types for binary operator '<'
      for(int j = 1; j < s.contains(t.substring(i, j)); j++) {
                       ^
  first type:  int
  second type: boolean
Main.java:14: error: cannot find symbol
    System.out.println((s.length - (j-1)).toString());
                         ^
  symbol:   variable length
  location: variable s of type String
Main.java:14: error: cannot find symbol
    System.out.println((s.length - (j-1)).toString());
                                    ^
  symbol:   variable j
  location: class Main
4 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string S; cin>>S;
  string T; cin>>T;
  int Ans=0;
  int K=0;
  int N=1001;
  int X=T.size();
  int L=S.size()-T.size();
  for(int j=0; j<L; j++){
    if(T.at(0)==S.at(j)){
      K++;
      if(N>j){
        N=j;
      }
    else continue;
  }
    if(K==0){
      cout<<T.size()<<endl;
    }
  else{
    for(int i=1; i<X; i++){
    if(T.at(i)!=S.at(N+1)){
      Ans++;
    }
      N++;
    }
    cout<<Ans<<endl;
  }
  }


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

#include<bits/stdc++.h>
using namespace std;
int main(){
  string S; cin>>S;
  string T; cin>>T;
  int Ans=0;
  int K=0;
  int N=1001;
  int L=S.size()-T.size();
  for(int j=0; j<L; j++){
    if(T.at(0)==S.at(j)){
      K++;
      if(N>j){
        N=j;
      }
    else continue;
  }
    if(K==0){
      cout<<T.size()<<endl;
    }
  else{
    for(int i=1; i<T.size(); i++){
    if(T.at(i)!=S.at(N+1)){
      Ans++;
    }
      N++;
    }
    cout<<Ans<<endl;
  }
  }

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

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

public class B {
    public static final long mod = (long)1e9+7;
    public static final long INF = Long.MAX_VALUE/2;
    public static final int inf = Integer.MAX_VALUE/2;

    static void solve(InputReader in, PrintWriter out){
        String s = in.ns();
        String t = in.ns();
        int min = 10000;
        for (int i = 0; i <= s.length()-t.length(); i++) {
            min = Math.min(min, not_same(s.substring(i, i+t.length()), t));
        }
        out.println(min);
    }
    public static int not_same(String s, String t){
        int res = 0;
        for (int i = 0; i < s.length(); i++) {
            if(s.charAt(i)!=t.charAt(i)) res++;
        }
        return res;
    }

    public static void main(String[] args){
        InputReader in = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);
        solve(in, out);
        out.close();
    }
    public static class InputReader{
        private BufferedReader br;
        private StringTokenizer st;
        public InputReader(InputStream is){
            br = new BufferedReader(new InputStreamReader(is));
            st = null;
        }
        public String ns(){
            if(st == null || !st.hasMoreTokens()){
                try{
                    st = new StringTokenizer(br.readLine());
                }catch (Exception e){
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        }
        public int ni(){
            return Integer.parseInt(ns());
        }
        public long nl(){
            return Long.parseLong(ns());
        }
        public double nd(){
            return Double.parseDouble(ns());
        }
        public char nc(){
            return ns().toCharArray()[0];
        }
        public int[] ni(int n){
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = ni();
            }
            return a;
        }
        public long[] nl(int n){
            long[] a = new long[n];
            for (int i = 0; i < n; i++) {
                a[i] = nl();
            }
            return a;
        }
        public double[] nd(int n){
            double[] a = new double[n];
            for (int i = 0; i < n; i++) {
                a[i] = nd();
            }
            return a;
        }
    }
}

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

import java.util.*;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        Char[] s = sc.next().toCharArray();
        Char[] t = sc.next().toCharArray();
        int unmatch = 0;
        int unmatch_min = 1000;
        int cyc_max=s.length-t.length;

        for (int i=0; i<cyc_max; i++){
            unmatch=0;
            for (int j=0; j<t.length; j++){
                if (!(s[j]==t[j])) unmatch++;
            }
            if (unmatch<unmatch_min) unmatch_min=unmatch;
        }

        System.out.println(unmatch_min);
    }
}

Compiler output:
Main.java:5: error: cannot find symbol
        Char[] s = sc.next().toCharArray();
        ^
  symbol:   class Char
  location: class Main
Main.java:6: error: cannot find symbol
        Char[] t = sc.next().toCharArray();
        ^
  symbol:   class Char
  location: class Main
2 errors
Language: C++

S = input()
T = input()
ans = 1e10
for i in range(len(S)):
    if i+len(T) > len(S):
        break
    cnt = 0
    for j in range(len(T)):
        if S[i+j] != T[j]:
            cnt += 1
    ans = min(cnt, ans)
print(ans)


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

import java.util.*;
 
class Main{
    static Scanner sc = new Scanner(System.in);
    public static void main(String args[]){
        String S=sc.next(),T=sc.next();
        long res=S.length();
        for(int i=0;i<=S.length()-T.length();i++){
            long count=0;
            for(int j=0;j<T.length();j++){
                if(S.charAt(i+j)!=T.charAt(j)){
                    count++;
                }
            }
        }
    }

Compiler output:
Main.java:16: error: reached end of file while parsing
    }
     ^
1 error
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:11:26: error: expected ';' before '{' token
   11 |       if(s[i]!=t[i+start]{
      |                          ^
      |                          ;
a.cc:14:22: error: expected ')' before ';' token
   14 |     ans=min(ans,diff);
      |                      ^
      |                      )
a.cc:11:9: note: to match this '('
   11 |       if(s[i]!=t[i+start]{
      |         ^
a.cc:17:2: error: expected '}' at end of input
   17 | }
      |  ^
a.cc:4:11: 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=1010;
  for(int start=0;start<s.size()-t.size();start++){
    int diff=o;
    for(int i=0;i<t.size();i++){
      if(s[i]!=t[i+start]{
        diff++;
      }
    ans=min(ans,diff);
  }
}
       


Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: 'o' was not declared in this scope
    9 |     int diff=o;
      |              ^
a.cc:11:26: error: expected ';' before '{' token
   11 |       if(s[i]!=t[i+start]{
      |                          ^
      |                          ;
a.cc:14:22: error: expected ')' before ';' token
   14 |     ans=min(ans,diff);
      |                      ^
      |                      )
a.cc:11:9: note: to match this '('
   11 |       if(s[i]!=t[i+start]{
      |         ^
a.cc:16:2: error: expected '}' at end of input
   16 | }
      |  ^
a.cc:4:11: 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=1010;
  for(int start=0;start<t.size()-s.size();start++){
    int diff=o;
    for(int i=0;i<s.size();i++){
      if(s[i]!=t[i+start]{
        diff++;
      }
    ans=min(ans,diff);
  }
}
       

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: 'o' was not declared in this scope
    9 |     int diff=o;
      |              ^
a.cc:11:26: error: expected ';' before '{' token
   11 |       if(s[i]!=t[i+start]{
      |                          ^
      |                          ;
a.cc:14:22: error: expected ')' before ';' token
   14 |     ans=min(ans,diff);
      |                      ^
      |                      )
a.cc:11:9: note: to match this '('
   11 |       if(s[i]!=t[i+start]{
      |         ^
a.cc:16:2: error: expected '}' at end of input
   16 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: Java

import java.io.*;
/**
 * MLASERP
 */
public class Main {

    
    static MyScanner in  = new MyScanner();
   static int mod  = 1000000007;
    static PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      static StringTokenizer st;
      static int []dr  = {1,-1,0,0};
      static int [] dc = {0,0,-1,1};
public static void main(String[] args) {
   String S = in.next();
   String T = in.next();
   int min = T.length();
   for(int i=0;i<=S.length()-T.length();i++){
        min = Math.min(compare(S.substring(i, i+T.length()),T),min);
   }
   out.println(min);
   out.flush();
}
private static int compare(String substring, String t) {
    int val = 0;
    for(int i=0;i<t.length();i++){
        if(t.charAt(i)!=substring.charAt(i))
            val++;
    }
    return val;
}
static int rcToxy(int r, int c,int W){
    return r*W+c;
}
static class Node{
    int r, c,prev,change;
    Node(int r, int c){
        this.r =r ;
        this.c = c;
    }
}
public static class MyScanner {
      BufferedReader br;
      StringTokenizer st;
 
      public MyScanner() {
         br = new BufferedReader(new InputStreamReader(System.in));
      }
 
      String next() {
          while (st == null || !st.hasMoreElements()) {
              try {
                  st = new StringTokenizer(br.readLine());
              } catch (IOException e) {
                  e.printStackTrace();
              }
          }
          return st.nextToken();
      }
 
      int nextInt() {
          return Integer.parseInt(next());
      }
 
      long nextLong() {
          return Long.parseLong(next());
      }
 
      double nextDouble() {
          return Double.parseDouble(next());
      }
 
      String nextLine(){
          String str = "";
	  try {
	     str = br.readLine();
	  } catch (IOException e) {
	     e.printStackTrace();
	  }
	  return str;
      }

   }
}

Compiler output:
Main.java:12: error: cannot find symbol
      static StringTokenizer st;
             ^
  symbol:   class StringTokenizer
  location: class Main
Main.java:45: error: cannot find symbol
      StringTokenizer st;
      ^
  symbol:   class StringTokenizer
  location: class MyScanner
Main.java:54: error: cannot find symbol
                  st = new StringTokenizer(br.readLine());
                           ^
  symbol:   class StringTokenizer
  location: class MyScanner
3 errors
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: 'j' was not declared in this scope
   12 |    if(s[i]==t[j]){
      |               ^
a.cc:15:5: error: 'j' was not declared in this scope
   15 |    }j++;
      |     ^
Language: C

Copy
Copy
#include <stdio.h>  
#include <string.h>
 
int main() {
  char T[1001];
  char S[1001];
  int i;
  int j;
  int lenT;
  int lenS;
  int maxspa = 0;
  int max = 0;
  int ans = 0;
  int count = 0;
  
  scanf("%s%s",T,S);
  
  lenS=strlen(S);
  lenT=strlen(T);
  maxspa = lenS - lenT;
  
  for(j = 0;j <= maxspa;j++){
    		count = 0;
  	for(i = 0;i<lenT;i++){
    	if(S[i+j] == T[i]){
      		count++;
    	}
    }
    if (max < count){
    		max = count;
    }
  }
  ans = lenT - max;
  printf("%d",ans);
  return 0;
}

Compiler output:
main.c:1:1: error: unknown type name 'Copy'
    1 | Copy
      | ^~~~
main.c:2:5: error: expected ';' before 'typedef'
    2 | Copy
      |     ^
      |     ;
Language: C

#include <stdio.h>  
#include <string.h>
 
int main() {
  char T[1001];
  char S[1001];
  int i;
  int j;
  int lenT;
  int lenS;
  int maxspa = 0;
  int max = 0;
  int ans = 0;
  
  scanf("%s%s",T,S);
  
  lenS=strlen(S);
  lenT=strlen(T);
  maxspa = lenS - lenT;
  
  for(j = 0;j<=maxspa;j++){
    		count = 0;
  	for(i = 0;i<len_T;i++){
    	if(S[i+j]=T[i]){
      		count++;
    	}
      if (max < count){
        	max = count;
      }
    }
  }
  ans = lenT - max;
  printf("%d",ans);
}

Compiler output:
main.c: In function 'main':
main.c:22:17: error: 'count' undeclared (first use in this function)
   22 |                 count = 0;
      |                 ^~~~~
main.c:22:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:23:21: error: 'len_T' undeclared (first use in this function); did you mean 'lenT'?
   23 |         for(i = 0;i<len_T;i++){
      |                     ^~~~~
      |                     lenT
Language: C

#include <stdio.h>  
#include <string.h>
 
int main() {
  char T[1001];
  char S[1001];
  int i;
  int j;
  int lenT;
  int lenS;
  int maxspa;
  int max;
  int ans;
  
  scanf("%s%s",T,S);
  
  lenS=strlen(S);
  lenT=strlen(T);
  maxspa = lenS - lenT;
  
  for(j = 0;j<=maxspa;j++){
    		count = 0;
  	for(i = 0;i<len_T;i++){
    	if(S[i+j]=T[i]){
      		count++;
    	}
      if (max < count){
        	max =count;
      }
    }
  }
  ans = lenT - max;
  printf("%d",ans);
}

Compiler output:
main.c: In function 'main':
main.c:22:17: error: 'count' undeclared (first use in this function)
   22 |                 count = 0;
      |                 ^~~~~
main.c:22:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:23:21: error: 'len_T' undeclared (first use in this function); did you mean 'lenT'?
   23 |         for(i = 0;i<len_T;i++){
      |                     ^~~~~
      |                     lenT
Language: C

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

int main() {
  char T[1001];
  char S[1001];
  int i;
  int lenT;
  int lenS;
  int Maxspa;
  int max;
  int ans;
  
  scanf("%s%s",T,S);
  
  lenS=strlen(S);
  lenT=strlen(T);
  maxspa = lenS - lenT;
  
  for(j = 0;j<=maxspa;j++){
    		count = 0;
  	for(i = 0;i<len_T;i++){
    	if(S[i+j]=T[i]){
      		count++;
    	}
      if (max < count){
        	max =count;
      }
    }
  }
  ans = lenT - max;
  printf("%d",ans);
}

Compiler output:
main.c: In function 'main':
main.c:18:3: error: 'maxspa' undeclared (first use in this function); did you mean 'Maxspa'?
   18 |   maxspa = lenS - lenT;
      |   ^~~~~~
      |   Maxspa
main.c:18:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:20:7: error: 'j' undeclared (first use in this function)
   20 |   for(j = 0;j<=maxspa;j++){
      |       ^
main.c:21:17: error: 'count' undeclared (first use in this function)
   21 |                 count = 0;
      |                 ^~~~~
main.c:22:21: error: 'len_T' undeclared (first use in this function); did you mean 'lenT'?
   22 |         for(i = 0;i<len_T;i++){
      |                     ^~~~~
      |                     lenT
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <map>
#include <set>

using namespace std;

const int dx[4] = { 1,0,-1,0 };
const int dy[4] = { 0,-1,0,1 };
const int LIT = -32768 * 100;

int n, m;
int arr[101];

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

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


Compiler output:
a.cc: In function 'void solve()':
a.cc:28:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   28 |   cout << ans;
      |           ^~~
      |           abs
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef unsigned long long int ll;
const ll INF=1000000000000;

int main(){
  string s,t;
  cin>>s>>t;
  int lens=s.size();
  int lent=t.size();
  ll ans=INF;
  for(int i=0;i<lent-lens;i++){
    int count=0;
    for(int j=0;j<lens;j++){
      if(s.at(i)!=t.at(j)){
        count++;
      }
    }
    ans=min(ans,count);
  }
  cout<<ans<<endel;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:12: error: no matching function for call to 'min(ll&, int&)'
   19 |     ans=min(ans,count);
      |         ~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:19:12: note:   deduced conflicting types for parameter 'const _Tp' ('long long unsigned int' and 'int')
   19 |     ans=min(ans,count);
      |         ~~~^~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:19:12: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long unsigned int'
   19 |     ans=min(ans,count);
      |         ~~~^~~~~~~~~~~
a.cc:21:14: error: 'endel' was not declared in this scope
   21 |   cout<<ans<<endel;
      |              ^~~~~
Language: Java

import java.util.*;
 
class Main{
    static Scanner sc = new Scanner(System.in);
    public static void main(String args[]){
        String S=sc.next(),T=sc.next();
        long res=S.length();
        for(int i=0;i<=S.length()-T.length();i++){
            long count=0;
            for(int j=0;j<T.length();j++){
                if(S.charAt(i+j)!=T.charAt(j)){
                    count++;
                }
            }

Compiler output:
Main.java:14: error: reached end of file while parsing
            }
             ^
1 error
Language: C++

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

int main(){
  string s, t; cin >> s >> t;
  int n = (int)s.size(), m = (int)t.size(), a = 1e9;
  rep(i, n-m+1){
    int t = 0;
    rep(j, m) if(s[i+j] == t[j]) ++t;
    a = min(a, t);
  }
  cout << a << "\n";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:29: error: invalid types 'int[int]' for array subscript
   10 |     rep(j, m) if(s[i+j] == t[j]) ++t;
      |                             ^
Language: C++

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

int main(){
  string s, t; cin >> s >> t;
  int n = s.size(), m = t.size(), a = 1e9;
  rep(i, n-m+1){
    int t = 0;
    rep(j, m) if(s[i+j] == t[j]) ++t;
    a = min(a, t);
  }
  cout << a << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:29: error: invalid types 'int[int]' for array subscript
   10 |     rep(j, m) if(s[i+j] == t[j]) ++t;
      |                             ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:26: 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 '()' ?)
    9 |       for(size_t j=0;j<T.length;j++){
      |                        ~~^~~~~~
      |                                ()
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:33: error: expected ';' before ')' token
    9 |       for(int j=0;j<T.size(),j++){
      |                                 ^
      |                                 ;
Language: C

#include <stdio.h>
int main(void) {
char S[],  T[];
scanf("%s %s",&S,&T);
int ans = sizeof S / sizeof S[0];
    for (int start = 0; start <=sizeof S / sizeof S[0] - sizeof T / sizeof T[0]; start++)
    {
        int diff = 0;
        for (int i = 0; i < sizeof T / sizeof T[0]; i++)
        {
            if (T[i] != S[start + i]) {
                diff++;
            }
        }
        ans = min(ans, diff);
    }
  printf("%c\n",ans);
}

Compiler output:
main.c: In function 'main':
main.c:3:6: error: array size missing in 'S'
    3 | char S[],  T[];
      |      ^
main.c:3:12: error: array size missing in 'T'
    3 | char S[],  T[];
      |            ^
main.c:15:15: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration]
   15 |         ans = min(ans, diff);
      |               ^~~
      |               main
Language: C

#include <stdio.h>
int main(void) {
char S[1000],  T[1000];
scanf("%s %s",&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);
    }
  printf("%c\n",ans);
}

Compiler output:
main.c: In function 'main':
main.c:5:12: error: request for member 'size' in something not a structure or union
    5 | int ans = T.size();
      |            ^
main.c:6:35: error: request for member 'size' in something not a structure or union
    6 |     for (int start = 0; start <= S.size() - T.size(); start++)
      |                                   ^
main.c:6:46: error: request for member 'size' in something not a structure or union
    6 |     for (int start = 0; start <= S.size() - T.size(); start++)
      |                                              ^
main.c:9:30: error: request for member 'size' in something not a structure or union
    9 |         for (int i = 0; i < T.size(); i++)
      |                              ^
main.c:15:15: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration]
   15 |         ans = min(ans, diff);
      |               ^~~
      |               main
Language: C

#include <stdio.h>
int main(void) {
char S[1000],  T[1000];
scanf("%c %c",&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);
    }
  printf("%c\n",ans);
}

Compiler output:
main.c: In function 'main':
main.c:5:12: error: request for member 'size' in something not a structure or union
    5 | int ans = T.size();
      |            ^
main.c:6:35: error: request for member 'size' in something not a structure or union
    6 |     for (int start = 0; start <= S.size() - T.size(); start++)
      |                                   ^
main.c:6:46: error: request for member 'size' in something not a structure or union
    6 |     for (int start = 0; start <= S.size() - T.size(); start++)
      |                                              ^
main.c:9:30: error: request for member 'size' in something not a structure or union
    9 |         for (int i = 0; i < T.size(); i++)
      |                              ^
main.c:15:15: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration]
   15 |         ans = min(ans, diff);
      |               ^~~
      |               main
Language: C++

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

int solve(string a, string b)
{
  int n = a.length();
  int m = b.length();
  int dp[n+1][m+1];
  int mx = INT_MIN;
  for(int i=0; i<n+1; i++)
    for(int j=0; j<m+1; j++)
    {
      if(i==0 || j==0)
        dp[i][j] = 0;
      
      if(a[i-1] == b[i-1])
        dp[i][j] = dp[i-1][j-1] + 1;
      else
        dp[i][j] = 0
        
      mx = max(mx, dp[i][j]);
    }
  return m-mx;
}

int main()
{
  string a,b;
  cin >> a >> b ;
  cout << solve(a,b) << endl;
}


Compiler output:
a.cc: In function 'int solve(std::string, std::string)':
a.cc:19:21: error: expected ';' before 'mx'
   19 |         dp[i][j] = 0
      |                     ^
      |                     ;
   20 | 
   21 |       mx = max(mx, dp[i][j]);
      |       ~~
Language: C++

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

int solve(string a, string b)
{
  int n = a.length();
  int b = b.length();
  int dp[n+1][m+1];
  int mx = INT_MIN;
  for(int i=0; i<n+1; i++)
    for(int j=0; j<m+!; j++)
    {
      if(i==0 || j==0)
        dp[i][j] = 0;
      if(a[i-1] == b[i=1])
        dp[i][j] = dp[i-1][j-1] + 1;
      else
        dp[i][j] = 0
      mx = max(mx, dp[i][j]);
    }
  return m-mx;
}

int main()
{
  string a,b;
  cin >> a >> b ;
  cout << solve(a,b) << endl;
}

Compiler output:
a.cc: In function 'int solve(std::string, std::string)':
a.cc:7:7: error: declaration of 'int b' shadows a parameter
    7 |   int b = b.length();
      |       ^
a.cc:4:28: note: 'std::string b' previously declared here
    4 | int solve(string a, string b)
      |                     ~~~~~~~^
a.cc:7:13: error: request for member 'length' in 'b', which is of non-class type 'int'
    7 |   int b = b.length();
      |             ^~~~~~
a.cc:8:15: error: 'm' was not declared in this scope
    8 |   int dp[n+1][m+1];
      |               ^
a.cc:11:23: error: expected primary-expression before ';' token
   11 |     for(int j=0; j<m+!; j++)
      |                       ^
a.cc:14:9: error: 'dp' was not declared in this scope; did you mean 'dup'?
   14 |         dp[i][j] = 0;
      |         ^~
      |         dup
a.cc:15:21: error: invalid types 'int[int]' for array subscript
   15 |       if(a[i-1] == b[i=1])
      |                     ^
a.cc:16:9: error: 'dp' was not declared in this scope; did you mean 'dup'?
   16 |         dp[i][j] = dp[i-1][j-1] + 1;
      |         ^~
      |         dup
a.cc:18:9: error: 'dp' was not declared in this scope; did you mean 'dup'?
   18 |         dp[i][j] = 0
      |         ^~
      |         dup
Language: C++

#include <iostream>
#include <string>

int main(void) {
    std::string S, T;

    std::cin >> S >> T;

    int ret = INT_MAX;
    for(int i = 0; i <= S.size()-T.size(); ++i){
        std::string substr = S.substr(i, T.size());
        int temp = 0;
        for(int j = 0; j < T.size(); ++j){
            if(substr[j] != T[j]) ++temp;
        }
        
        ret = std::min(ret, temp);
    }

    std::cout << ret << std::endl;
    return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
const int N = 1005;
int n, k = 0, minn = 99999;
char s[N], a[N];
int main()
{
	gets(s);
	gets(a);
	int ls = strlen(s), la = strlen(a);
	minn = la;
	for(int i = 0; i < ls; i ++)
	{
		int p = i, sum = 0;
		for(int j = 0; j < la; j ++)
		{
			if(s[p] != a[j])
			{
				sum ++;
			}
			p ++;
		}
		minn = min(minn, sum);
	 } 
	 printf("%d", minn);
 	return 0;
}


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

#include <cstdio>
#include <iostream>
#include <string>
#include <cstring>
#include <algorithm>
using namespace std;
const int N = 1005;
int n, k = 0, minn = 99999;
char s[N], a[N];
int main()
{
	gets(s);
	gets(a);
	int ls = strlen(s), la = strlen(a);
	minn = la;
	for(int i = 0; i < ls; i ++)
	{
		int p = i, sum = 0;
		for(int j = 0; j < la; j ++)
		{
			if(s[p] != a[j])
			{
				sum ++;
			}
			p ++;
		}
		minn = min(minn, sum);
	 } 
	 printf("%d", minn);
 	return 0;
}


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

#include <bits/stdc++.h>
using namespace std;
int la, lb;
char ch[1005], a[1005], b[1005];
int maxn;
int main()
{
	gets(ch);
	for (int i = 0; i < strlen(ch); i ++)
	if (ch[i]>='a'&& ch[i]<='z')a[++la] = ch[i];
	gets(ch);
	for (int i = 0; i < strlen(ch); i ++)
	if (ch[i]>='a'&& ch[i]<='z')b[++lb] = ch[i];
	for (int i = 0; i <= la - lb + 1; i ++)
	{
		int cnt = 0;
		for (int j = 1; j <= lb; j ++)
		if (a[i + j - 1] == b[j])cnt ++;
		maxn = max(cnt, maxn);
	}
	cout << lb - maxn;
	return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
char a[10001],b[10001];
int ans=100000;
int main(){
	gets(a);gets(b);
	for(int i=0;i<strlen(a)-strlen(b);i++){
		int tot=0;
		for(int j=i;j<i+strlen(b);j++)
			if(a[j]!=b[j-i])
				tot++;
		ans=min(ans,tot);
	}
	cout<<ans;
}

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

#include<bits/stdc++.h>
using namespace std;
char a[10001],b[10001];
int ans=100000;
int main(){
	gets(a);gets(b);
	for(int i=0;i<strlen(a)-strlen(b);i++){
		int tot=0;
		for(int j=i;j<i+strlen(b);j++)
			if(a[j]!=b[j-i])
				tot++;
		ans=min(ans,tot);
	}
	cout<<ans;
}

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;
using ll = long long;
using ld = long double;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
//二項係数の計算
int nCr(int A, int B) {
    ll ans = 1;
    for (int i = 0; i < B; i++) {
        ans *= A - i;
    }
    for (int i = 0; i < B; i++) {
        ans /= i + 1;
    }
    return ans;
}
int main() {
    string S,T;
    cin>>S>>T;
    int ans=1000000;
    for(int i=0; i<S.size()-T.size()+1; i++){
        int c=0;
        for(int j=0; j<T.size(); j++){
            if(S.at(i+j)!=T.at(j)){
                c++;
            }
        }
        if(c<ans){
            ans=c;
        }
    }
    cout<<ans<<endl:
}


Compiler output:
a.cc: In function 'int main()':
a.cc:32:20: error: expected ';' before ':' token
   32 |     cout<<ans<<endl:
      |                    ^
      |                    ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
//二項係数の計算
int nCr(int A, int B) {
    ll ans = 1;4
    for (int i = 0; i < B; i++) {
        ans *= A - i;
    }
    for (int i = 0; i < B; i++) {
        ans /= i + 1;
    }
    return ans;
}
int main() {
    string S,T;
    cin>>S>>T;
    int ans;
    rep(i,T.size()-S.size()+1){
        int c=0;
        rep(j,T.size()){
            if(S[i+j]!=T[j]){
                c++;
            }
        }
        if(i==0){
            ans=c;
        }
        else if(ans<c){
            ans=c;
        }
    }
    cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int nCr(int, int)':
a.cc:8:17: error: expected ';' before 'for'
    8 |     ll ans = 1;4
      |                 ^
      |                 ;
    9 |     for (int i = 0; i < B; i++) {
      |     ~~~          
a.cc:9:21: error: 'i' was not declared in this scope
    9 |     for (int i = 0; i < B; i++) {
      |                     ^
Language: C++

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

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

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

#include <stdio.h>
#include <string.h>
int main(void){


  
     char S[1010] ;
       char T[1009] ;
      int lengthS;
        int lengthT;
      
    int r ;
    int p ;
    
     scanf("%s",S);
      scanf("%s",T);
    
  

    
    
      lengthS = strlen(S);
        lengthT =strlen(T);
    
    int answer = lengthT;
    
    for(r=0;r<=lengthS -lengthT ;r++){
        int total =lengthT;
     for(p=0;p<=lengthT -1;p++){
        
         if(S[p+r]==T[p]){--total;}
    }
        
        if(answer>total) {answer = total ;}
     }
       
     printf("%d",answer);

Compiler output:
main.c: In function 'main':
main.c:37:6: error: expected declaration or statement at end of input
   37 |      printf("%d",answer);
      |      ^~~~~~
Language: C++

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

Compiler output:
a.cc:21:2: error: stray '#' in program
   21 | }#include<bits/stdc++.h>
      |  ^
a.cc:21:3: error: 'include' does not name a type
   21 | }#include<bits/stdc++.h>
      |   ^~~~~~~
a.cc:23:5: error: redefinition of 'int main()'
   23 | int main(){
      |     ^~~~
a.cc:3:5: note: 'int main()' previously defined here
    3 | int main(){
      |     ^~~~
Language: C++

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

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

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

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

void inp(vector<char>vec)
{
	string t;
	cin>>t;
	for(int i=0;i<t.length();i++)
	{
	
		vec.push_back(t[i]);

	}
	
}

void check(vector<char>s,t)
{
	int temp,c;
	for(int i=0;i<sizeof(t);i++)
	{
		for(int n=0;n<sizeof(s);n++)
		{
			if(t[i]==s[n])
			{
				temp=0
				if(n+sizeof(t)<=sizeof(s))
				{
					if(t[i]!=s[n])
					{
						temp = temp+1;
						c = temp;
					}
					if(c<temp)
					{
						temp=c;
					}
					c=0;
				}
			}
		}
	}
}

int main() 
{
	vector<char>s,t;
	inp(s);
	inp(t);
	check(s,t);
	
	return 0;
}

Compiler output:
a.cc:19:26: error: 't' has not been declared
   19 | void check(vector<char>s,t)
      |                          ^
a.cc: In function 'void check(std::vector<char>, int)':
a.cc:22:30: error: 't' was not declared in this scope
   22 |         for(int i=0;i<sizeof(t);i++)
      |                              ^
a.cc:28:39: error: expected ';' before 'if'
   28 |                                 temp=0
      |                                       ^
      |                                       ;
   29 |                                 if(n+sizeof(t)<=sizeof(s))
      |                                 ~~     
a.cc: In function 'int main()':
a.cc:52:17: error: cannot convert 'std::vector<char>' to 'int'
   52 |         check(s,t);
      |                 ^
      |                 |
      |                 std::vector<char>
a.cc:19:26: note:   initializing argument 2 of 'void check(std::vector<char>, int)'
   19 | void check(vector<char>s,t)
      |                          ^
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() - 1 < S.size(); i++) {
		int count = 0;
		for (int j = 0; j < T.size(); j++) {
			if (T[j] != S[i + j]) {
				count++;
			}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:26: error: expected '}' at end of input
   13 |                         }
      |                          ^
a.cc:10:52: note: to match this '{'
   10 |                 for (int j = 0; j < T.size(); j++) {
      |                                                    ^
a.cc:13:26: error: expected '}' at end of input
   13 |                         }
      |                          ^
a.cc:8:59: note: to match this '{'
    8 |         for (int i = 0; i + T.size() - 1 < S.size(); i++) {
      |                                                           ^
a.cc:13:26: error: expected '}' at end of input
   13 |                         }
      |                          ^
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 n=s.size();
  int m=s.size();
  
  assert(n>=m);
  
  int ans=m;
  
  for(int i=0;i+m<=n;i++)
  {
    string temp=s.substr(i,m);
    int now=0;
    for(int j=0;j<m;j++) now+=(int)(temp[j]!=t[j]);
    ans=min(ans,temp);
  }
  
  cout<<ans;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:12: error: no matching function for call to 'min(int&, std::string&)'
   21 |     ans=min(ans,temp);
      |         ~~~^~~~~~~~~~
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:21:12: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   21 |     ans=min(ans,temp);
      |         ~~~^~~~~~~~~~
/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:21:12: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   21 |     ans=min(ans,temp);
      |         ~~~^~~~~~~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(){
	string s,x;
	cin>>s>>x;
	int m=1e8;
	for(int i=x.length()-1;i<s.length();i++){
		int p=0;
		for(int j=0;j<x.length();j++){
			if(s[i-x.length()+1]!=x[j]){
				p++;
			}
		}
		m=min(p.m);
	}
	cout<<m<<"\n"p
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:25: error: request for member 'm' in 'p', which is of non-class type 'int'
   16 |                 m=min(p.m);
      |                         ^
a.cc:18:18: error: unable to find string literal operator 'operator""p' with 'const char [2]', 'long unsigned int' arguments
   18 |         cout<<m<<"\n"p
      |                  ^~~~~
Language: Java

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
      Scanner scanner = new Scanner(System.in);
      String s = scanner.nextLine();
      String t = scanner.nextLine();
      int counter = 0;
      int count = 0;
      for (int j = 0; j <= (s.length - t.length); j++) {
        for (int i = 0; i < t.length; i++) {
          if (t.charAt(i) == s.charAt(j + i)) {
            counter = counter + 1;
          }
        }
        if (count == 0 || counter > count) {
          count = counter;
        }
        counter = 0;
      }
      System.out.println(t.length - count);
    }
}

Compiler output:
Main.java:10: error: cannot find symbol
      for (int j = 0; j <= (s.length - t.length); j++) {
                             ^
  symbol:   variable length
  location: variable s of type String
Main.java:10: error: cannot find symbol
      for (int j = 0; j <= (s.length - t.length); j++) {
                                        ^
  symbol:   variable length
  location: variable t of type String
Main.java:11: error: cannot find symbol
        for (int i = 0; i < t.length; i++) {
                             ^
  symbol:   variable length
  location: variable t of type String
Main.java:21: error: cannot find symbol
      System.out.println(t.length - count);
                          ^
  symbol:   variable length
  location: variable t of type String
4 errors