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

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

#define ll long long
#define vvi vector< vector<int> >
#define vi vector<int>
#define All(X) X.begin(),X.end()
#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define pb push_back
#define pii pair<int,int>
#define mp make_pair
#define pi 3.14159265359
#define shosu(X) fixed << setprecision(X)
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return a/gcd(a,b)*b;}

int main(){
int n,m;
cin >> n >> m;
vector<string> ns,ms;
REP(i,n){
string tmp;
cin >> tmp;
ns.pb(tmp);
}
REP(i,m){
string tmp;
cin >> tmp;
ms.pb(tmp);
}
bool flg = false;
REP(i,ms[0].size()-ns[0].size()+1){
REP(j,m - n + 1){
bool ok = true;
FOR(k, i, i + ns[0].size()){
FOR(l, j, j + n){
if(ms[l][k] != ns[l-j][i-k]) ok = false; 
}
}
if(ok) flg = true;
}
}
cout << flg ? "Yes" : "No" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:44:28: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<'
   44 | cout << flg ? "Yes" : "No" << endl;
      |                       ~~~~~^~~~~~~
Language: C++

int main(void){
 int N,M;
 cin >> N >> M;

 const int nmmax=50;
 char A[nmmax][nmmax],B[nmmax][nmmax];


 for(int y=0;y<N;++y){
  for(int x=0;x<N;++x){
   cin >> A[y][x];
  }
 }

  for(int y=0;y<M;++y){
   for(int x=0;x<M;++x){
   cin >> B[y][x];
  }
 }

bool exist=false;

 for(int ly=0;ly<N;++ly){
  for(int lx=0;lx<N;++lx){
   if(ly+M-1>=N or lx+M-1>=N) continue;

 bool match=true;
 for(int y=0;y<M;++y){
  for(int x=0;x<M;++x){
   if(A[ly+y][lx+x]!=B[y][x]) match=false;
  }
 }
 if(match) exist=true;
  }
 }

  if(exist)
  cout << "Yes" << endl;
  else
  cout << "No" << endl;

  return 0;
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:3:2: error: 'cin' was not declared in this scope
    3 |  cin >> N >> M;
      |  ^~~
a.cc:38:3: error: 'cout' was not declared in this scope
   38 |   cout << "Yes" << endl;
      |   ^~~~
a.cc:38:20: error: 'endl' was not declared in this scope
   38 |   cout << "Yes" << endl;
      |                    ^~~~
a.cc:40:3: error: 'cout' was not declared in this scope
   40 |   cout << "No" << endl;
      |   ^~~~
a.cc:40:19: error: 'endl' was not declared in this scope
   40 |   cout << "No" << endl;
      |                   ^~~~
Language: C++

 int main(void){
 int N,M;
 cin >> N >> M;

 const int nmmax=50;
 char A[nmmax][nmmax],B[nmmax][nmmax];


 for(int y=0;y<N;++y){
 for(int x=0;x<N;++x){
 cin >> A[y][x];
 }
 }

 for(int y=0;y<M;++y){
 for(int x=0;x<M;++x){
 cin >> B[y][x];
  }
 }

 bool exist=false;

 for(int ly=0;ly<N;++ly){
 for(int lx=0;lx<N;++lx){
 if(ly+M-1>=N or lx+M-1>=N) continue;

 bool match=true;
 for(int y=0;y<M;++y){
 for(int x=0;x<M;++x){
 if(A[ly+y][lx+x]!=B[y][x]) match=false;
 }
 }
 if(match) exist=true;
 }
 }

 if(exist)
 cout << "Yes" << endl;
 else
 cout << "No" << endl;

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:2: error: 'cin' was not declared in this scope
    3 |  cin >> N >> M;
      |  ^~~
a.cc:38:2: error: 'cout' was not declared in this scope
   38 |  cout << "Yes" << endl;
      |  ^~~~
a.cc:38:19: error: 'endl' was not declared in this scope
   38 |  cout << "Yes" << endl;
      |                   ^~~~
a.cc:40:2: error: 'cout' was not declared in this scope
   40 |  cout << "No" << endl;
      |  ^~~~
a.cc:40:18: error: 'endl' was not declared in this scope
   40 |  cout << "No" << endl;
      |                  ^~~~
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		int N=sc.nextInt(),M=sc.nextInt(),i,j,k,l;
		String[] a=new String[N],b=new String[M];
		boolean f=true;
		for(i=0;i<N;i++){
			a[i]=sc.next();
		}
		for(i=0;i<M;i++){
			b[i]=sc.next();
		}
		for(i=0;i<N-M+1;i++){
			for(j=0;j<N-M+1;j++){
				for(k=0;k<M;k++){
					for(l=0;l<M;l++){
						if(a[i+k].charAt(j+l)!=b[k].charAt(l)){
							f=false;
							break;
						}
					}
				}
				if(f==true){
					System.out.println("Yes");
					System.exit(0);;
				}
				f=true;
			}
		}
		System.out.println("No");
	}

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

#include <iostream>
#include <vector>
int main() {
int n, m;
std::cin >> n >> m;
std::vector<std::string> a(n);
std::vector<std::string> b(m);
for (int i = 0; i <n;) {
    std::cin >> a[i];
}
for (int i = 0; i <m;) {
    std::cin >> b[i];
}
bool flag;
for (int i = 0; i < n-m+1; i++) { //a's row; n-m+1 = 2
      int row = i;
      int col = 0;
      flag = false;
      for (int j = 0; j< m; j++) { // b's row
               if (a[row].substr(col, m) == b[j]) {
                        row++;
                        flag = true;
               } else if (col < n-m +1) {
                      col++;
                      row = i; // reset
                      j = 0; // reset
                      flag = false;
              } else {
                     flag = false;
                      break;
              }
        }
}
 
if (flag) {
 std::cout << "Yes" << std::endl;
} else {
  std::coud << "No" << std::endl;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:8: error: 'coud' is not a member of 'std'; did you mean 'cout'?
   38 |   std::coud << "No" << std::endl;
      |        ^~~~
      |        cout
Language: C++

#include <iostream>
#include <vector>
#include <cstdlib>
using namespace std;
 
int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
 
    int N;
    int M;
 
    cin >> N >> M;
 
    vector<string> ar;
    vector<string> br;
 
    string s;
    for(int i = 0; i < N; i++){
        cin >> s;
        ar.push_back(s);
    }
    for(int i = 0; i < M; i++){
        cin >> s;
        br.push_back(s);
    }
 
    bool found = true;
    for(int i_a = 0; i_a < N; i_a++){
        found = true;
        for(int i_b = 0; i_b < M; i_b++){
            int tmp_i_a = i_a;
            size_t bt;
            size_t last_bt = 100;
            bt = ar[tmp_i_a].find(br[i_b]);
            if(bt == string::npos){
                found = false;
                break;
            }else{
                if(last_bt != 100){
                    if(bt != last_bt){
                        found = false;
                        break;
                    }
                }
                ++tmp_i_a;
                continue;
            }
        }
    }
 
    found ? cout << "Yes" << endl : cout << "No" << endl;
 
    re

Compiler output:
a.cc: In function 'int main()':
a.cc:54:5: error: 're' was not declared in this scope
   54 |     re
      |     ^~
a.cc:54:7: error: expected '}' at end of input
   54 |     re
      |       ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;
int main(){
 int m,n,f=0;
 char a[51][51],b[51][51];
 cin>>n>>m;
 for(int i=0;i<n;i++)
  for(int j=0;j<n;j++)cin>>a[i][j];

 for(int i=0;i<m;i++)
  for(int j=0;j<m;j++)cin>>b[i][j];
             
 for(int i=0;i<n;i++)
  for(int j=0;j<n;j++)
   if(a[i][j]==b[0][0]){
    int f1=0;
    for(int l=0;l<m;l++)
     if(i+l>=n)break;
     for(int k=0;k<m;k++)
      if(j+k>=n)break;
      if(a[i+l][j+k]==b[l][k])f=1;
      else if(a[i+l][j+k]!=b[l][k]){f=0;break;}
   }
  }
 if(f==1)cout<<"Yes"<<endl;
 else cout<<"No"<<endl;
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:14: error: 'l' was not declared in this scope
   21 |       if(a[i+l][j+k]==b[l][k])f=1;
      |              ^
a.cc:21:19: error: 'k' was not declared in this scope
   21 |       if(a[i+l][j+k]==b[l][k])f=1;
      |                   ^
a.cc: At global scope:
a.cc:25:2: error: expected unqualified-id before 'if'
   25 |  if(f==1)cout<<"Yes"<<endl;
      |  ^~
a.cc:26:2: error: expected unqualified-id before 'else'
   26 |  else cout<<"No"<<endl;
      |  ^~~~
a.cc:27:2: error: expected unqualified-id before 'return'
   27 |  return 0;
      |  ^~~~~~
a.cc:28:1: error: expected declaration before '}' token
   28 | }
      | ^
Language: C++

#include<iostream>
#include<vector>
#include<string>
#include<algorithm>	
#include<map>
#include<set>
#include<utility>
#include<cmath>
#include<cstring>
#include<queue>
#include<stack>
#include<cstdio>
#include<sstream>
#include<iomanip>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define mp make_pair
#define all(in) in.begin(),in.end()
#define shosu(x) fixed<<setprecision(x)
using namespace std;
//kaewasuretyuui
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pii> vp;
typedef vector<vp> vvp;
typedef vector<string> vs;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef pair<int,pii> pip;
typedef vector<pip>vip;
const double PI=acos(-1);
const double EPS=1e-9;
const int inf=1e8;
int dx[4]={0,1,0,-1};
int dy[4]={1,0,-1,0};
int main(){
	int n,m;
	cin>>n>>m;
	vi a(n),b(m);
	rep(i,n)cin>>a[i];
	rep(i,m)cin>>b[i];
	rep(i,n-m+1)rep(j,n-m+1){
		bool h=true;
		rep(x,m)rep(y,m)if(a[i+x][j+y]!=b[x][y])h=false;
		if(h){
			cout<<"Yes"<<endl;
			return 0;
		}
	}
	cout<<"No"<<endl;
}











Compiler output:
a.cc: In function 'int main()':
a.cc:47:42: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int}[int]' for array subscript
   47 |                 rep(x,m)rep(y,m)if(a[i+x][j+y]!=b[x][y])h=false;
      |                                          ^
a.cc:47:53: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int}[int]' for array subscript
   47 |                 rep(x,m)rep(y,m)if(a[i+x][j+y]!=b[x][y])h=false;
      |                                                     ^
Language: C++

#include<iostream>
#include<string>

using namespace std;
int main(){
	int N,M;
	vector<string> A,B;
	string s;
	cin >> N >> M;
	for(int i=0;i<N;++i){
		cin >> s;
		A.push_back(s);
	}
	for(int i=0;i<M;++i){
		cin >> s;
		B.push_back(s);
	}
	for(int i=0;i<N-M;++i){
		int pos = A[i].find(B[0]);
		bool match = true;
		for(int j=1;j<M;++j){
			if(A[i+j].substr(pos,M) != B[j]) {
				match = false;
				break;
			}
		}
		if(match == true) {cout << "Yes" << endl;return 0;}
	}
	cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'vector' was not declared in this scope
    7 |         vector<string> A,B;
      |         ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | #include<string>
a.cc:7:22: error: expected primary-expression before '>' token
    7 |         vector<string> A,B;
      |                      ^
a.cc:7:24: error: 'A' was not declared in this scope
    7 |         vector<string> A,B;
      |                        ^
a.cc:7:26: error: 'B' was not declared in this scope
    7 |         vector<string> A,B;
      |                          ^
Language: C++

#include<iostream>
using namespace std;

char a[50][50];
char b[50][50];

bool check(int m, int x, int y){
    for(int i = 0;  i < m; ++i){
        for(int i2 = 0; i2 < m; ++i){
            if(a[y + i][x + i2] != b[i][i2]){ return false; }
        }
    }
    return true;
}

int main(){
    int n, m;
    cin >> n >> m;
    for(int i  = 0; i < n; ++i){
        cin >> a[i];
    }
    for(int i = 0; i < m; ++i){
        cin >> b[i];
    }
    bool flg = false;
    for(int i = 0; i + m < n;++i){
        for(int i2 = 0; i2 + m < n; ++i){
             if(a[i][i2] == b[0][0]){
                 if(check()){ flg = true; break; }
             }
        }
        if(flg){ break; }
    }
    if(flg){ cout << "Yes" << endl; }
    else{ cout << "No" << endl; }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:26: error: too few arguments to function 'bool check(int, int, int)'
   29 |                  if(check()){ flg = true; break; }
      |                     ~~~~~^~
a.cc:7:6: note: declared here
    7 | bool check(int m, int x, int y){
      |      ^~~~~
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main(){
    int N,M;
    cin >> N >> M;
    char A[N][N];
    char B[M][M];
    for(int i=0;i<N;i++){
        string s;
        cin >> s;
        strcpy(A[i], s.c_str());
    }
    for(int i=0;i<M;i++){
        string s;
        cin >> s;
        strcpy(B[i], s.c_str());
    }
    int a = N%M==0 ? N/M : N/M+1;
    bool b = true;
    for(int i=0;i<a;i++){
        for(int j=0;j<a;j++){
            for(int k=0;k<M;k++){
                for(int l=0;l<M;l++){
                    if(A[i*M+k][j*M+l]!=B[k][l]){
                        b=false;
                        goto OUT;
                    }
                }
            }
            OUT:
            if(b) {
                cout << "Yes" << endl;
                goto END;
            }
        }
    }
    END:
    if(!b) cout << "No" << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'strcpy' was not declared in this scope
   14 |         strcpy(A[i], s.c_str());
      |         ^~~~~~
a.cc:2:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | #include <string>
a.cc:19:9: error: 'strcpy' was not declared in this scope
   19 |         strcpy(B[i], s.c_str());
      |         ^~~~~~
a.cc:19:9: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include <bits/stdc++.h>
#include<fstream>
#define ll long long
#define F first
#define S second
#define mp make_pair
#define mod 1000000007
#define All(v) v.begin(),v.end()

using namespace std;


int main()
{
    bool w = 0, b = 0;
    int n,m;
    cin >> n >> m;
    for(int i=0;i<n;i++)
    {
        string s;
        cin >> s;
        if(s.find('.') != string::npos)
            w = 1;
        if(s.find('#') != string::npos)
            b = 1;
    }
    bool ok = 0;
    for(int i=0;i<m;i++)
    {
        string s;
        cin >> s;
        if(s.find('.') != string::npos && w)
            ok = 1;
        if(s.find('#') != string::npos && b)
            ok = 1;
    }
    if(ok)
        cout << "Yes";
    else
        cout << "No";




cout << '\n'

    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:45:13: error: expected ';' before 'return'
   45 | cout << '\n'
      |             ^
      |             ;
   46 | 
   47 |     return 0;
      |     ~~~~~~
Language: C

#include<stdio.h>
 
 int main(){
       int x,y,N,M;
       int a[50][50],b[50][50];

     scanf("%d %d\n",&N,&M);
     for(x=0;x<N;x++){
         for(y=0;y<N;y++){
         scanf("%d",&a[x][y]);
         }
      }
         printf("\n");
     
     
     for(x=0;x<M;x++){
         for(y=0;y<M;y++){
         scanf("%d",&b[x][y]);
         } 
     }
   

    int lx,ly,A,B,n;
      n=0; 
    
   
        
        for(x=0;x<N;x++){
          for(y=0;y<N;y++){
           
            for(lx=0;lx<M;lx++){
              for(ly=0;ly<M;ly++){
              if(a[x][y]==b[lx][ly]){n=1;}
         }
       
     }
   }
 }

         

        
     

       if(n==1){
            printf("Yes");
         }else if(n==0) {
             printf("No");
      }
       

Compiler output:
main.c: In function 'main':
main.c:49:7: error: expected declaration or statement at end of input
   49 |       }
      |       ^
Language: C

#include <stdio.h>

int main(void)
{
  int N, M;
  char A[50][50];
  char B[50][50];
  int i, j;
  int s, t;
  int f = 0;
  int tmp = 1;

  scanf("%d %d", &N, &M);
  for(i = 0; i < N; i++) {
    scanf("%s", &A[i]);
  }
  for(i = 0; i < M; i++) {
    scanf("%s", B[i]);
  }

  for(i = 0; i < N-M+1; i++) {
    for(j = 0; j < N-M+1; j++) {
      if(A[i][j] == B[0][0]) {
	for(s = 0; s < M; s++) {
	  for(t = 0; t < M; t++) {
	    if(A[i+s][j+t] != B[s][t]) {
	      tmp = 0;
	      break;
	    }
	  }
	  if(tmp == 0) {
	    tmp = 1;


Compiler output:
main.c: In function 'main':
main.c:32:13: error: expected declaration or statement at end of input
   32 |             tmp = 1;
      |             ^~~
main.c:32:13: error: expected declaration or statement at end of input
main.c:32:13: error: expected declaration or statement at end of input
main.c:32:13: error: expected declaration or statement at end of input
main.c:32:13: error: expected declaration or statement at end of input
main.c:32:13: error: expected declaration or statement at end of input
Language: C++

#include <iostream>
#include <string>
#include <vector>

#define rep(i, n) for(int i = 0; i < n; i++)

using namespace std;

int N, M;
vector< vector<bool> > A, B;

int find1(vector<bool> X, vector<bool> Y, int pos)
{
  int y = Y.size();
  int n = X.size() - y + 1;
  for(int i = pos; i < n; i++) {
    if(X[i] == Y[i]) {
      for(int j = 0; j <= y; j++) {
	if(j == y) return i;
	if(X[i+j] != Y[i+j]) break;
      }
    }
  }
  return -1;
}

bool contains(int al, int bl, int pos)
{
  if (bl == M) return true;
  else if(bl == 0) {
    while((pos = find1(A[al], B[bl], pos)) != -1) {
      if(contains(al + 1, bl + 1, pos)) return true;
    }
    if(al == N - M) return false;
    else return contains(al + 1, 0, 0);
  } else {
    if(find1(A[al], B[bl], pos) == pos) return contains(al + 1, bl + 1, pos);
    else return false;
  }
}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

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

int N, M;
string board[60];
string pattern[60];

int main() {
	cin >> N >> M;
	for (int i = 0; i < N; i++) cin >> board[i];
	for (int i = 0; i < M; i++) cin >> pattern[i];
	bool found = false;
	for (int i = 0; i <= N - M; i++) {
		for (int j = 0; j <= N - M; j++) {
			if (match(i, j)) found = true;
		}
	}
	cout << (found ? "Yes" : "No") << endl;
	return 0;
}

bool match(int x, int y) {
	for (int i = 0; i < M; i++) {
		for (int j = 0; j < M; j++) {
			if (board[x + i][y + j] != pattern[i][j])
				return false;
		}
	}
	return true;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:29: error: 'match' was not declared in this scope; did you mean 'rpmatch'?
   16 |                         if (match(i, j)) found = true;
      |                             ^~~~~
      |                             rpmatch
Language: C++

//Written by Zhu Zeqi
//Come on,baby
//Hack,please
#include<cmath>
#include<math.h>
#include<ctype.h>
#include<algorithm>
#include<bitset>
#include<cassert>
#include<cctype>
#include<cerrno>
#include<cfloat>
#include<ciso646>
#include<climits>
#include<clocale>
#include<complex>
#include<csetjmp>
#include<csignal>
#include<cstdarg>
#include<cstddef>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<ctime>
#include<cwchar>
#include<cwctype>
#include<deque>
#include<exception>
#include<fstream>
#include<functional>
#include<iomanip>
#include<ios>
#include<iosfwd>
#include<iostream>
#include<istream>
#include<iterator>
#include<limits>
#include<list>
#include<locale>
#include<map>
#include<memory>
#include<new>
#include<numeric>
#include<ostream>
#include<queue>
#include<set>
#include<sstream>
#include<stack>
#include<stdexcept>
#include<streambuf>
#include<string>
#include<typeinfo>
#include<utility>
#include<valarray>
#include<vector>
#include<string.h>
#include<stdlib.h>
#include<stdio.h>
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define pii pair<int,int>
#define vi vector<int>
#define MAX 100000000000000000
#define MOD 1000000007
#define PI 3.141592653589793238462
#define INF 1000000000
typedef long long ll;
using namespace std;
//作者：中国江苏南京朱泽齐
int N,M;
char A[51][51], B[51][51];
bool check(int x, int y) {
	for(int i=0;i<m;i++) {
		for(int j=0;j<m;j++){
			if(A[x+j][y+i]!=B[j][i]){
				return false;
			}
		}
	}
	return true;
}
int main(){
	//freopen("input.in","r",stdin);
	//freopen("output.out","w",stdout);
	cin>>n>>m;
	for(int i=0;i<n;i++){
		for(int j=0;j<n;j++){
			cin>>A[j][i];
		}
	}
	for(int i=0;i<m;i++){
		for(int j=0;j<m;j++){
			cin>>B[j][i];
		}
	}
	
	for(int y=0;y<=n-m;y++){
		for(int x=0;x<=n-m;x++){
			if(check(x,y)){
				cout<<"Yes"<<endl;
				return 0;
			}
		}
	}
	cout<<"No"<<endl;
	//system("pause");
	return 0;
}

Compiler output:
a.cc: In function 'bool check(int, int)':
a.cc:75:23: error: 'm' was not declared in this scope
   75 |         for(int i=0;i<m;i++) {
      |                       ^
a.cc: In function 'int main()':
a.cc:87:14: error: 'n' was not declared in this scope
   87 |         cin>>n>>m;
      |              ^
a.cc:87:17: error: 'm' was not declared in this scope
   87 |         cin>>n>>m;
      |                 ^
Language: C++

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

using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;

#define REPS(i, a, n) for (int i = (a); i < (n); ++i)
#define REP(i, n) REPS(i, 0, n)
#define RREP(i, n) REPS(i, 1, n + 1)
#define DEPS(i, a, n) for (int i = (a); i >= n; --i)
#define DEP(i, n) DEPS(i, n, 0)

#define vint(v, n) vector<int> v(n); REP(i,n) cin >> v[i];
#define vvint(v, w, n) vector<int> v(n); vector<int> w(n); REP(i,n) cin >> v[i] >> w[i];
#define vlint(v, n) vector<ll int> v(n); REP(i,n) cin >> v[i];
#define vdouble(v, n) vector<double> v(n); REP(i,n) cin >> v[i];
#define vvdoube(v, n1, n2) vector<vector<double> > v(n1, vector<double>(n2, 0)); REP(i,n1) REP(j,n1) cin >> v[i][j];
#define string(x) string x; cin >> x;
#define vstring(v, n) vector<string> v(n); REP(i,n){string a; std::cin >> a; v.push_back(a); }

#define all(v) (v).begin(), (v).end()
#define rall(v) (v).begin(), (v).end(), std::greater<int>()
#define len(v) (v).length()
#define FIND(s, n) (s.find(n) != s.end())
#define SORT(a) sort(all(a))

static const string abet("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
static const long long MOD = 1000000007;
static const double PI=3.1415926535897932;
static const int INF = 0x3f3f3f3f;
static const int INFTY = (1 << 29);
static const long long LINFTY = (1LL << 32);

static const int dy4[]={0, 0, 1, -1};
static const int dx4[]={1, -1, 0, 0};
static const int dx8[] = {1, 1, 1, 0, 0, -1, -1, -1};
static const int dy8[] = {-1, 0, 1, -1, 1, -1, 0, 1};


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

  int N, M;
  cin >> N >> M;
  vector<string> A(N);
  vector<string> B(M);
  REP(i, N) cin >> A[i];
  REP(i, M) cin >> B[i];

  int ans = 0;
  REP(j, N) REP(i, A[j].length()-B[0].length()+1){
    if(A[j].substr(i, B[l].length()) == B[0]){
      int k = j, l = 0;
      while(k < N && l < M){
        if(A[k].substr(i, B[l].length()) == B[l]){
          k++; l++;
          ans = 1;
          if(l == M){
            cout << "Yes" << endl;
            return 0;
          }else if(k == N){
            cout << "No" << endl;
            return 0;
          }
        }else{
          ans = 0;
          break;
        }
      }
      }
    }
  if(ans == 1) cout << "Yes" << endl;
  else cout << "No" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:56:25: error: 'l' was not declared in this scope
   56 |     if(A[j].substr(i, B[l].length()) == B[0]){
      |                         ^
a.cc:57:18: error: redeclaration of 'int l'
   57 |       int k = j, l = 0;
      |                  ^
a.cc:56:25: note: '<typeprefixerror>l' previously declared here
   56 |     if(A[j].substr(i, B[l].length()) == B[0]){
      |                         ^
Language: C++

    #include <bits/stdc++.h>
    using namespace std;
     
     
    int main(){
    	int n,m;
    	string S;
    	vector<string> s,s2;
    	cin >> n >> m;
    	for(int i=0;i<n;i++){
    		cin >> S;
    		s.push_back(S);
    	}
    	for(int i=0;i<m;i++){
    		cin >> S;
    		s2.push_back(S);
    	}
    	
    	bool ok;
    	for(int i=0;i+m<=n;i++){
    		ok=true;
    		for(int j=0;j+m<=n;j++){
    			for(int k=0;k<m;k++){
    				for(int l=0;l<b;l++){
    					if(s[i+k][j+l]!=s2[k][l]){
    						ok=false;
    						goto aa;
    					}
    				}
    			}
    			if(ok) goto bb;
    		}
    		aa:;
    	}
    	bb:;
    	cout << (ok?"Yes":"No") << endl;
    	return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:24:47: error: 'b' was not declared in this scope
   24 |                                 for(int l=0;l<b;l++){
      |                                               ^
Language: C++

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

using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;

#define REPS(i, a, n) for (int i = (a); i < (n); ++i)
#define REP(i, n) REPS(i, 0, n)
#define RREP(i, n) REPS(i, 1, n + 1)
#define DEPS(i, a, n) for (int i = (a); i >= n; --i)
#define DEP(i, n) DEPS(i, n, 0)

#define vint(v, n) vector<int> v(n); REP(i,n) cin >> v[i];
#define vvint(v, w, n) vector<int> v(n); vector<int> w(n); REP(i,n) cin >> v[i] >> w[i];
#define vlint(v, n) vector<ll int> v(n); REP(i,n) cin >> v[i];
#define vdouble(v, n) vector<double> v(n); REP(i,n) cin >> v[i];
#define vvdoube(v, n1, n2) vector<vector<double> > v(n1, vector<double>(n2, 0)); REP(i,n1) REP(j,n1) cin >> v[i][j];
#define string(x) string x; cin >> x;
#define vstring(v, n) vector<string> v(n); REP(i,n){string a; std::cin >> a; v.push_back(a); }

#define all(v) (v).begin(), (v).end()
#define rall(v) (v).begin(), (v).end(), std::greater<int>()
#define len(v) (v).length()
#define FIND(s, n) (s.find(n) != s.end())
#define SORT(a) sort(all(a))

static const string abet("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
static const long long MOD = 1000000007;
static const double PI=3.1415926535897932;
static const int INF = 0x3f3f3f3f;
static const int INFTY = (1 << 29);
static const long long LINFTY = (1LL << 32);

static const int dy4[]={0, 0, 1, -1};
static const int dx4[]={1, -1, 0, 0};
static const int dx8[] = {1, 1, 1, 0, 0, -1, -1, -1};
static const int dy8[] = {-1, 0, 1, -1, 1, -1, 0, 1};


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

  int N, M;
  cin >> N >> M;
  vector<string> A(N);
  vector<string> B(M);
  REP(i, N) cin >> A[i];
  REP(i, M) cin >> B[i];

  int ans = 0;
  REP(j, N) REP(i, A[j].length()-B[0].length()+1){
    if(A[j].substr(i, B[0].length()) == B[0]){
      int k = j, l = 0;
      while(k < N && l < M){
        if(A[k].substr(i, B[l].length()) == B[l]){
          k++; l++;
          ans = 1;
        }
        }else{
          ans = 0;
          break;
        }
      }
    }
  if(ans == 1) cout << "Yes" << endl;
  else cout << "No" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:63:10: error: expected '}' before 'else'
   63 |         }else{
      |          ^~~~
a.cc:56:46: note: to match this '{'
   56 |     if(A[j].substr(i, B[0].length()) == B[0]){
      |                                              ^
a.cc: At global scope:
a.cc:69:3: error: expected unqualified-id before 'if'
   69 |   if(ans == 1) cout << "Yes" << endl;
      |   ^~
a.cc:70:3: error: expected unqualified-id before 'else'
   70 |   else cout << "No" << endl;
      |   ^~~~
a.cc:71:1: error: expected declaration before '}' token
   71 | }
      | ^
Language: C++

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

using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;

#define REPS(i, a, n) for (int i = (a); i < (n); ++i)
#define REP(i, n) REPS(i, 0, n)
#define RREP(i, n) REPS(i, 1, n + 1)
#define DEPS(i, a, n) for (int i = (a); i >= n; --i)
#define DEP(i, n) DEPS(i, n, 0)

#define vint(v, n) vector<int> v(n); REP(i,n) cin >> v[i];
#define vvint(v, w, n) vector<int> v(n); vector<int> w(n); REP(i,n) cin >> v[i] >> w[i];
#define vlint(v, n) vector<ll int> v(n); REP(i,n) cin >> v[i];
#define vdouble(v, n) vector<double> v(n); REP(i,n) cin >> v[i];
#define vvdoube(v, n1, n2) vector<vector<double> > v(n1, vector<double>(n2, 0)); REP(i,n1) REP(j,n1) cin >> v[i][j];
#define string(x) string x; cin >> x;
#define vstring(v, n) vector<string> v(n); REP(i,n){string a; std::cin >> a; v.push_back(a); }

#define all(v) (v).begin(), (v).end()
#define rall(v) (v).begin(), (v).end(), std::greater<int>()
#define len(v) (v).length()
#define FIND(s, n) (s.find(n) != s.end())
#define SORT(a) sort(all(a))

static const string abet("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
static const long long MOD = 1000000007;
static const double PI=3.1415926535897932;
static const int INF = 0x3f3f3f3f;
static const int INFTY = (1 << 29);
static const long long LINFTY = (1LL << 32);

static const int dy4[]={0, 0, 1, -1};
static const int dx4[]={1, -1, 0, 0};
static const int dx8[] = {1, 1, 1, 0, 0, -1, -1, -1};
static const int dy8[] = {-1, 0, 1, -1, 1, -1, 0, 1};


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

  int N, M;
  cin >> N >> M;
  vector<string> A(N);
  vector<string> B(M);
  REP(i, N) cin >> A[i];
  REP(i, M) cin >> B[i];

  int ans = 0;
  REP(j, N) REP(i, A[j].length()-B[0].length()+1){
    if(A[j].substr(i, B[0].length()) == B[0]){
      int k = j, l = 0;
      while(k < N && l < M){
        if(A[k].substr(i, B[l].length()) == B[l]){
          k++; l++;
          ans = 1;
        }
        }else{
          ans = 0
          break;
        }
      }
    }
  if(ans == 1) cout << "Yes" << endl;
  else cout << "No" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:63:10: error: expected '}' before 'else'
   63 |         }else{
      |          ^~~~
a.cc:56:46: note: to match this '{'
   56 |     if(A[j].substr(i, B[0].length()) == B[0]){
      |                                              ^
a.cc:64:18: error: expected ';' before 'break'
   64 |           ans = 0
      |                  ^
      |                  ;
   65 |           break;
      |           ~~~~~   
a.cc: At global scope:
a.cc:69:3: error: expected unqualified-id before 'if'
   69 |   if(ans == 1) cout << "Yes" << endl;
      |   ^~
a.cc:70:3: error: expected unqualified-id before 'else'
   70 |   else cout << "No" << endl;
      |   ^~~~
a.cc:71:1: error: expected declaration before '}' token
   71 | }
      | ^
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        
		// 1行、2つ(複数)数字
		String[] ss0 = br.readLine().trim().split(" ", 0);
		int N = Integer.parseInt(ss0[0]);
		int M = Integer.parseInt(ss0[1]);

		
		// 2行目以降文字列を配列に格納
		String[] A = new String[N];
		for(int i = 0; i < N; i++){ A[i] = br.readLine(); }
		String[] B = new String[M];
		for(int i = 0; i < M; i++){ B[i] = br.readLine(); }

					//入力値確認
					for(int i=0; i < N; i++){
						//System.out.println(A[i]);
					}
					for(int i=0; i < M; i++){
						//System.out.println(B[i]);
					}
		
		int a = N-M+1;
		String sa = "";
		String sb = "";
		
		sb = sss(B, 0, 0, a);
		for(int j=0; j < a; j++){
			for(int i=0; i < a; i++){
				sa = sss(A, i, j, a);
				if ( sa.equals(sb) ){ System.out.println("Yes"); return }
			}
		}
		
		System.out.println("No");
		

		System.out.println("No"); return;


    }
    // Debug.Print
    static void dp(String s) {
		//System.out.println(s);
	}
    static void dp(StringBuilder s) { dp(s.toString()); }
    static void dp(int i) { dp(String.valueOf(i)); }
    static void dp(long i) { dp(String.valueOf(i)); }

	static String sss(String[] A, int I, int J, int L){
		String s = "";
		
		for(int i = I; i<I+L; i++) {
			s = s + A[i].substring(J, J+L);
		}
		
		return s;
	}
}



Compiler output:
Main.java:36: error: illegal start of expression
				if ( sa.equals(sb) ){ System.out.println("Yes"); return }
				                                                        ^
1 error
Language: Java

import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);;
    int i,tmp,pre;
    int n=sc.nextInt();
    int m=sc.nextInt();
    String[] a=new String[n];
    String[] b=new String[m];
    for(i=0;i<n;i++){a[i]=sc.next();}
    for(i=0;i<m;i++){b[i]=sc.next();}
    for(i=0;i<n-m+1;i++){
      for(int j=0;j<n-m+1;j++){
        if(j==0)tmp=0; else tmp=pre;
        tmp=a[i].indexOf(b[i],tmp);
        if(tmp==-1)break;
        pre=tmp;
        if(Main.check(m,tmp,i,a,b)){
          System.out.println("Yes");
          return;
        }
      }
    }
    System.out.println("No");
  }
  public static boolean check(int m,int col,int row,String[] a,String[] b){
    for(int i=1;i<m;i++){
      if(a[row+i].indexOf(b[i],col)!=col)return false;
    }
    return true;
  }
}

Compiler output:
Main.java:14: error: variable pre might not have been initialized
        if(j==0)tmp=0; else tmp=pre;
                                ^
1 error
Language: Java

import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);;
    int i,tmp,pre;
    int n=sc.nextInt();
    int m=sc.nextInt();
    String[] a=new String[n];
    String[] b=new String[m];
    for(i=0;i<n;i++){a[i]=sc.next();}
    for(i=0;i<m;i++){b[i]=sc.next();}
    for(i=0;i<n-m+1;i++){
      for(int j=0;j<n-m+1;j++){
        if(j==0)tmp=0; else tmp=pre;
        tmp=a[i].indexOf(b[i],tmp);
        if(tmp==-1)break;
        pre=tmp;
        if(Main.check(tmp,i,a,b)){
          System.out.println("Yes");
          return;
        }
      }
    }
    System.out.println("No");
  }
  public static boolean check(int col,int row,String[] a,String[] b){
    for(int i=1;i<m;i++){
      if(a[row+i].indexOf(b[i],col)!=col)return false;
    }
    return true;
  }
}

Compiler output:
Main.java:27: error: cannot find symbol
    for(int i=1;i<m;i++){
                  ^
  symbol:   variable m
  location: class Main
1 error
Language: Java

import java.util.*;
public class Main(){
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);;
    int i,tmp,pre;
    int n=sc.nextInt();
    int m=sc.nextInt();
    String[] a=new String[n];
    String[] b=new String[m];
    for(i=0;i<n;i++){a[i]=sc.next();}
    for(i=0;i<m;i++){b[i]=sc.next();}
    for(i=0;i<n-m+1;i++){
      for(int j=0;j<n-m+1;j++){
        if(j==0)tmp=0; else tmp=pre;
        tmp=a[i].indexOf(b[i],tmp);
        if(tmp==-1)break;
        pre=tmp;
        if(Main.check(tmp,i,a,b)){
          System.out.println("Yes");
          return;
        }
      }
    }
    System.out.println("No");
  }
  public static boolean check(int col,int row,String[] a,String[] b){
    for(int i=1;i<m;i++){
      if(a[row+i].indexOf(b[i],col)!=col)return false;
    }
    return true;
  }
}

Compiler output:
Main.java:2: error: '{' expected
public class Main(){
                 ^
1 error
Language: C++

#include <iostream>
#include <stdlib.h>
#include <bitset>
using namespace std;

int main(){
	int N[2];
	cin >> N[0] >> N[1];
	__int64 map[2][64];
	for (int i = 0; i < 2; i++){
		for (int j = 0; j < N[i]; j++){
			char in[50];
			cin >> in;
			map[i][j] = 0;
			for (int k = 0; k < N[i]; k++){
				if (in[k] == '#') map[i][j] = map[i][j] | (1<<k);
			}
			//cout << static_cast<bitset<8> >(map[i][j]) << endl;
		}
	}
	int mask = (1 << N[1]);
	mask--;

	for (int i = 0; i <= (N[0] - N[1]); i++){
		for (int j = 0; j <= (N[0] - N[1]); j++){
			if (( (map[0][i] & (mask << j)) == (map[1][i] << j))){
				for (int k = 1; k < N[1]; k++){
					if (((map[0][i+k] & (mask << j)) != (map[1][i+k] << j))){
						break;
					}
					if (k == (N[1] - 1)) { cout << "Yes" << endl; return 0; }
				}
			}

		}
	}
	cout << "No" << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
    9 |         __int64 map[2][64];
      |         ^~~~~~~
      |         __int64_t
a.cc:14:25: error: 'map' was not declared in this scope
   14 |                         map[i][j] = 0;
      |                         ^~~
a.cc:4:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
    3 | #include <bitset>
  +++ |+#include <map>
    4 | using namespace std;
a.cc:26:32: error: 'map' was not declared in this scope
   26 |                         if (( (map[0][i] & (mask << j)) == (map[1][i] << j))){
      |                                ^~~
a.cc:26:32: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
Language: C++

#include "bits/stdc++.h"

#define REP(i,n) for(int i=0;i<n;i++)

using namespace std;

using ll  =          long long;
using ull = unsigned long long;
const char en='\n';

int main(){
	int n,m;
	char a[50][50],b[50][50];
	cin>>n>>m;
	for(int i=0;i<n*n;i++){
		cin>>a[i%n][i/n];
	}
	for(int i=0;i<m*m;i++){
		cin>>b[i%m][i/m];
	}
#define BR if(f)break;
	bool f=false;
	REP(i,n){
		REP(j,n){
			REP(k,n){
				REP(l,n){
					if(a[i][j]!=b[k][l]){
						b=true;
						break;
					}
				}
				BR;
			}
		}
	}
	cout<<(f?"Yes":"No")<<en;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:50: error: incompatible types in assignment of 'bool' to 'char [50][50]'
   28 |                                                 b=true;
      |                                                 ~^~~~~
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int M = Integer.parseInt(sc.next());
		String[] imgA=new String[];
		String[] imgB=new String[];
		Boolean checkAB;
		int j;
		int k;
		String s = "No";
		for(int i = 0;i<N;i++){
			imgA[i]="";
			imgA[i]=sc.next();
		}
		for(int i = 0;i<M;i++){
			imgB[i]="";
			imgB[i]=sc.next();
		}
		for(int i=0;i<(N-M+1);i++){
			for(j=0;j<(N-M+1);j++){
				checkAB = true;
				for (k=0;j<M;j++){
					checkAB = (checkAB) && (imgA[j+k].substring(i, i+M)==imgB[k]);
				}
				if(checkAB){
					s="Yes";
				}
			}
		}
		System.out.println(s);
		sc.close();
        }
}

Compiler output:
Main.java:8: error: array dimension missing
		String[] imgA=new String[];
		                          ^
Main.java:9: error: array dimension missing
		String[] imgB=new String[];
		                          ^
2 errors
Language: C++

#include <stdio.h>

int main(){
	int n, m; //文字列の大きさ
	int i,j;
	int k,l;
	int x;
	scanf("%d %d", &n, &m);
	char A[n+1][n+1];
	char B[m+1][m+1];

	for(j = 0; j < n; j++){
		scanf("%s", A[j]);
	}
	
	for(j = 0; j < m; j++){
		scanf("%s", B[j]);
	}

	for(i = 0; i <= n-m; i++){
		for(j = 0; j <= n-m; j++){
			//どっかしらがfitした
			if(A[j][i] == B[0][0]){
				x = 1;
				for(k = 0; k < m; k++){
					for(l = 0; l < m; l++){
						if(A[j+l][i+k] != B[k][l]){
							x = 0;
							break;	//一致しなかったら強制退出
						}
					}
					//途中でおわったやつ　or ぜんぶループしたやつもここ出てくる
					if(x == 0) break;	//途中でbreakしたやつは用なしだからbreak
				}
				if(x == 1){
					printf("Yes\n");
					return 0;
				}
			}
			//全箇所fitしなかったやつがでてくる，B[1][1]を調べるループ開始
		}
	}

	printf("No\n");

	return 0;


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

import java.util.*;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int M = Integer.parseInt(sc.next());
		String[] imgA;
		String[] imgB;
		Boolean checkAB;
		int j;
		int k;
		String s = "No";
		for(int i = 0;i<N;i++){
			imgA[i]="";
			imgA[i]=sc.next();
		}
		for(int i = 0;i<M;i++){
			imgB[i]="";
			imgB[i]=sc.next();
		}
		for(int i=0;i<(N-M+1);i++){
			for(j=0;j<(N-M+1);j++){
				checkAB = true;
				for (k=0;j<M;j++){
					checkAB = (checkAB) && (imgA[j+k].substring(i, i+M)==imgB[k]);
				}
				if(checkAB){
					s="Yes";
				}
			}
		}
		System.out.println(s);
		sc.close();
        }
}

Compiler output:
Main.java:15: error: variable imgA might not have been initialized
			imgA[i]="";
			^
Main.java:19: error: variable imgB might not have been initialized
			imgB[i]="";
			^
Main.java:26: error: variable imgA might not have been initialized
					checkAB = (checkAB) && (imgA[j+k].substring(i, i+M)==imgB[k]);
					                        ^
Main.java:26: error: variable imgB might not have been initialized
					checkAB = (checkAB) && (imgA[j+k].substring(i, i+M)==imgB[k]);
					                                                     ^
4 errors
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int M = Integer.parseInt(sc.next());
		String[] imgA[N];
		String[] imgB[M];
		Boolean checkAB;
		int j;
		int k;
		String s = "No";
		for(int i = 0;i<N;i++){
			imgA[i]=sc.next();
		}
		for(int i = 0;i<M;i++){
			imgB[i]=sc.next();
		}
		for(int i=0;i<(N-M+1);i++){
			for(j=0;j<(N-M+1);j++){
				checkAB = true;
				for (k=0;j<M;j++){
					checkAB = (checkAB) && (imgA[j+k].substring(i, i+M)==imgB[k]);
				}
				if(checkAB){
					s="Yes";
				}
			}
		}
		System.out.println(s);
		sc.close();
        }
}

Compiler output:
Main.java:8: error: ']' expected
		String[] imgA[N];
		              ^
Main.java:8: error: ';' expected
		String[] imgA[N];
		               ^
Main.java:9: error: ']' expected
		String[] imgB[M];
		              ^
Main.java:9: error: ';' expected
		String[] imgB[M];
		               ^
4 errors
Language: C++

#include <cstdio>

using namespace std;
int n,m,i,j,k,h;
char s[54][54],s1[54][54];
bool ok,ok1;
int main()
{
    scanf ("%d %d\n", &n, &m);
    for (i=0;i<=(n-1);i++)
        gets(s[i]);
    for (i=0;i<=(m-1);i++)
        gets(s1[i]);
    ok1=false;
    for (i=0;(i<=(n-m)) && (ok1==false);i++)
        for (j=0;(j<=(n-m)) && (ok1==false);j++)
        {
            ok=true;
            for (k=0;(k<=(m-1)) && (ok==true);k++)
                for (h=0;h<=(m-1);h++)
                {
                    if (s[i+k][j+h]!=s1[k][h])
                    {
                        ok=false;
                        break;
                    }
                }
            if (ok==true)
                ok1=true;
        }
    if (ok1==true)
        printf ("Yes\n");
    else
        printf ("No\n");
    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[i]);
      |         ^~~~
      |         getw
a.cc:13:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   13 |         gets(s1[i]);
      |         ^~~~
      |         getw
Language: C++

#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <stack>
#include <queue>
#include <map>
using namespace std;

#define max_n 50
#define max_m 50
#define max_w 10000
#define max_h 1000
#define max_k 10000
#define max_l 10000
#define INF 9999999

typedef long long lint;


int main()
{
    int n,m;
    
    char a[max_n*2+1],b[max_m][max_m*2+1];
    cin>>n>>m;
    for(int i=0;i<n;i++){
        cin>>a[i];
    }
    for(int i=0;i<m;i++){
        cin>>b[i];
    }
    
    if(strstr(a,b)!=NULL){
        cout<<"yes"<<endl;
    }else{
        cout<<"no"<<endl;
    }
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:38:14: error: no matching function for call to 'strstr(char [101], char [50][101])'
   38 |     if(strstr(a,b)!=NULL){
      |        ~~~~~~^~~~~
In file included from a.cc:5:
/usr/include/string.h:330:14: note: candidate: 'char* strstr(char*, const char*)'
  330 | extern char *strstr (char *__haystack, const char *__needle)
      |              ^~~~~~
/usr/include/string.h:330:52: note:   no known conversion for argument 2 from 'char [50][101]' to 'const char*'
  330 | extern char *strstr (char *__haystack, const char *__needle)
      |                                        ~~~~~~~~~~~~^~~~~~~~
/usr/include/string.h:332:20: note: candidate: 'const char* strstr(const char*, const char*)'
  332 | extern const char *strstr (const char *__haystack, const char *__needle)
      |                    ^~~~~~
/usr/include/string.h:332:64: note:   no known conversion for argument 2 from 'char [50][101]' to 'const char*'
  332 | extern const char *strstr (const char *__haystack, const char *__needle)
      |                                                    ~~~~~~~~~~~~^~~~~~~~
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int M = Integer.parseInt(sc.next());
		String[] imgA;
		String[] imgB;
		Boolean checkAB;
		int j;
		int k;
		String s = "No";
		for(int i = 0;i<N;i++){
			imgA[i]=sc.next();
		}
		for(int i = 0;i<M;i++){
			imgB[i]=sc.next();
		}
		for(int i=0;i<(N-M+1);i++){
			for(j=0;j<(N-M+1);j++){
				checkAB = true;
				for (k=0;j<M;j++){
					checkAB = (checkAB) && (imgA[j+k].substring(i, i+M)==imgB[k]);
				}
				if(checkAB){
					s="Yes";
				}
			}
		}
		System.out.println(s);
		sc.close();
        }
}

Compiler output:
Main.java:15: error: variable imgA might not have been initialized
			imgA[i]=sc.next();
			^
Main.java:18: error: variable imgB might not have been initialized
			imgB[i]=sc.next();
			^
Main.java:24: error: variable imgA might not have been initialized
					checkAB = (checkAB) && (imgA[j+k].substring(i, i+M)==imgB[k]);
					                        ^
Main.java:24: error: variable imgB might not have been initialized
					checkAB = (checkAB) && (imgA[j+k].substring(i, i+M)==imgB[k]);
					                                                     ^
4 errors
Language: C++

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

int main(void){
	int a,b,hantei=0;
	
	scanf("%d %d",&a,&b);
	
	char as[a][a],bs[b][b];
	for(int i=0;i<a;i++){
		for (int i2=0;i2<a;i2++){
			scanf("%d",as[i][i2]);
		}
	}
	for(int i=0;i<b;i++){
		for (int i2=0;i2<b;i2++){
			scanf("%d",bs[i][i2]);
		}
	}
	
	for(int i=0;i<a;i++){
		for(int i2=0;i2<a;i++){
			if(strcmp(bs[1][1],as[i][i2])==0){
				for(int o=0;o<b;o++){
					for(int u=0;u<b;u++){
						if(!(as[i][i2],bs[o][u])){
							hantei=-1;
						}
					}
				}
			}
		}
	}
	if(hantei==-1) printf("No\n");
	else printf("Yes\n");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:42: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   23 |                         if(strcmp(bs[1][1],as[i][i2])==0){
      |                                   ~~~~~~~^
      |                                          |
      |                                          char
In file included from a.cc:2:
/usr/include/string.h:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
a.cc:23:52: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   23 |                         if(strcmp(bs[1][1],as[i][i2])==0){
      |                                            ~~~~~~~~^
      |                                                    |
      |                                                    char
/usr/include/string.h:156:50: note:   initializing argument 2 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~