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

#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include <ctype.h>
#include <stdint.h>
#include <string.h>
#include <wchar.h>

#define N_MAX (100)
#define P_MAX (100)
#define DP_ARRAY_SIZE (N_MAX * P_MAX / 32 + 1)

#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define ABS(a) ((a) < 0 ? -(a) : (a))
#define ABSS(a, b) ((a) > (b) ? (a) - (b) : (b) - (a))

int compare_f(const void *a, const void *b) {
	return *((int64_t *)a) < *((int64_t *)b) ? -1 : 1;
}

int compare_f2(const void *a, const void *b) {
	return *((uint64_t *)a) > *((uint64_t *)b) ? -1 : 1;
}

static size_t comb(const size_t n, const size_t r) {
	size_t result = 1;

	for (size_t i = 0; i < r; i++) {
		result *= n - i;
		result /= i + 1;
	}

	return result;
}

static uint64_t combU64(const uint64_t n, const uint64_t r) {
	uint64_t result = 1;

	for (uint64_t i = 0; i < r; i++) {
		result *= n - i;
		result /= i + 1;
	}

	return result;
}

static uint64_t gcd(uint64_t m, uint64_t n)
{
	uint64_t temp;

	while (m%n != 0) {
		temp = n;
		n = m % n;
		m = temp;
	}

	return n;
}

static char s[200001];

int main(void) {
	size_t N, M;
	char A[50], B[50];

	scanf("%zu %zu\n", &N, &M);
	for (size_t i = 0; i < N; i++) {
		scanf("%s\n", A[i]);
	}
	for (size_t i = 0; i < M; i++) {
		scanf("%s", B[i]);
		if (i < M - 1) {
			scanf("\n");
		}
	}

	bool found = false;

	for (size_t rowOffset = 0; rowOffset <= N - M; rowOffset++) {
		for (size_t colOffset = 0; colOffset <= N - M; colOffset++) {
			bool matched = true;
			for (size_t row = 0; row <= M; row++) {
				for (size_t col = 0; col <= M; col++) {
					if (A[rowOffset + row][colOffset + col] != B[row][col]) {
						matched = false;
						break;
					}
				}

				if (matched) {
					found = true;
					break;
				}
			}
		}
	}

	puts(found ? "Yes" : "No");

	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:86:63: error: subscripted value is neither array nor pointer nor vector
   86 |                                         if (A[rowOffset + row][colOffset + col] != B[row][col]) {
      |                                                               ^
main.c:86:90: error: subscripted value is neither array nor pointer nor vector
   86 |                                         if (A[rowOffset + row][colOffset + col] != B[row][col]) {
      |                                                                                          ^
Language: C++

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

int main(){
    int n, m, i, j, k, l, b = 0;
    char a[n][n], b[m][m];
    for(i=0; i<n; i++){
        for(j=0; j<n; j++){
            cin >> a[i][j]
        }
    }
    for(i=0; i<m; i++){
        for(j=0; j<m; j++){
            cin >> b[i][j];
        }
    }
    for(i=0; i<n-m+1; i++){
        for(j=0; j<n-m+1; j++){
            b = 0
            for(k=0; k<m; k++){
                for(l=0; l<m; l++){
                    if(a[i+k][j+l] != b[i][j]){
                        b = 1;
                        break;
                    }
                    if(k == m-1 && l == m-1){
                        cout << "Yes";
                        return 0;
                    }
                }
                if(b == 1) break;
            }
        }
    }
    cout << "No";
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:19: error: conflicting declaration 'char b [m][m]'
    6 |     char a[n][n], b[m][m];
      |                   ^
a.cc:5:27: note: previous declaration as 'int b'
    5 |     int n, m, i, j, k, l, b = 0;
      |                           ^
a.cc:9:27: error: expected ';' before '}' token
    9 |             cin >> a[i][j]
      |                           ^
      |                           ;
   10 |         }
      |         ~                  
a.cc:14:21: error: invalid types 'int[int]' for array subscript
   14 |             cin >> b[i][j];
      |                     ^
a.cc:19:18: error: expected ';' before 'for'
   19 |             b = 0
      |                  ^
      |                  ;
   20 |             for(k=0; k<m; k++){
      |             ~~~   
a.cc:20:30: error: expected ';' before ')' token
   20 |             for(k=0; k<m; k++){
      |                              ^
      |                              ;
Language: C++

#include <bits/stdc++.h>
typedef long long ll;
const int INF = 1e9;
const ll LINF = 1e18;
const int MOD = 1e9 + 7;
using namespace std;

int n, m;
vector<string> a(60);
vector<string> b(60);

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

int main() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < m; i++) cin >> b[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;
    }
  }
  if (found)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}

Compiler output:
a.cc: In function 'bool match(int, int)':
a.cc:14:25: error: 'M' was not declared in this scope
   14 |     for (int j = 0; j < M; j++) {
      |                         ^
Language: C++

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

int main(){
  int n,m;
  cin>>n>>m;
  vector<string> a(n),b(m);
  for(int i=0;i<n;i++)
    cin>>a[i];
  for(int i=0;i<m;i++)
    cin>>b[i];
  string tmp;
  for(int i=0;i+m<=n;i++){
    
}


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

#include <iostream>
#include <string>
#include <vector>
#include <stack>
#include <algorithm>
#include <numeric>
#include <math.h>
using namespace std;

#define N_MAX   (100000)
#define LL_MAX_NUM (1LL<<60)

typedef long long ll;
typedef long long int lli;

int main() {
    int N, M;
    cin >> N >> M;
    string Ai[N], Bi[M];

    for (int i = 0; i < N; i++) {
        cin >> Ai[i];
    }
    for (int i = 0; i < M; i++) {
        cin >> Bi[i];
    }   
    
    for (int i = 0; i < M; i++) {
        for (int j = 0; j < N; j++) {
            if (M > 1 && N > 1 && Ai[j].find(Bi[i]) >= 0 && Ai[j].find(Bi[i]) <= N-1) {
                if (M > 1 && N > 1 && Ai[j+1].find(Bi[i+1],j) >= 0 && Ai[j+1].find(Ai[i+1],j) <= N-1) {
                    cout << "Yes" << endl;
                    return 0;
                } else {
                    break;
                } else if (M == 1 && N == 1 && Ai[j].find(Bi[i]) >= 0 && Ai[j].find(Bi[i]) <= N-1)
            }
        }
    }
    cout << "No" << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:19: error: expected '}' before 'else'
   36 |                 } else if (M == 1 && N == 1 && Ai[j].find(Bi[i]) >= 0 && Ai[j].find(Bi[i]) <= N-1)
      |                   ^~~~
a.cc:30:87: note: to match this '{'
   30 |             if (M > 1 && N > 1 && Ai[j].find(Bi[i]) >= 0 && Ai[j].find(Bi[i]) <= N-1) {
      |                                                                                       ^
a.cc:37:13: error: expected primary-expression before '}' token
   37 |             }
      |             ^
a.cc: At global scope:
a.cc:40:5: error: 'cout' does not name a type
   40 |     cout << "No" << endl;
      |     ^~~~
a.cc:41:5: error: expected unqualified-id before 'return'
   41 |     return 0;
      |     ^~~~~~
a.cc:42:1: error: expected declaration before '}' token
   42 | }
      | ^
Language: C

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

int main(){
  int N, M, i, j , k , l, flag;
  char A[50][51], B[50][51];
  
  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 <= M - N; i++){
    for (j = 0; j <= M - N; j++){
      for (k = i; k < i + M; k++){
        for (l = j; j < j + M; j++){
          flag = 1;
          if(A[k][l] != B[k - i][l - j]){
            flag = 0:
            break;
          }
        }
        if(flag = 0){
          break;
        }
      }
      if(k == i + M && l == j + M){
        break;
      }
    }
    if(k == i + M && l == j + M){
      break;
    }
  }
  
  if(k == i + M && l == j + M){
    printf("No\n");
  } else {
    printf("Yes\n");
  }
  
  return 0;
}
  

Compiler output:
main.c: In function 'main':
main.c:22:21: error: expected ';' before ':' token
   22 |             flag = 0:
      |                     ^
      |                     ;
Language: C

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

int main(){
  int N, M, i, j , k , l;
  char A[50][51], B[50][51];
  
  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 <= M - N; i++){
    for (j = 0; j <= M - N; j++){
      for (k = i; k < i + M; k++){
        for (l = j; j < j + M; j++){
          flag = 1;
          if(A[k][l] != B[k - i][l - j]){
            flag = 0:
            break;
          }
        }
        if(flag = 0){
          break;
        }
      }
      if(k == i + M && l == j + M){
        break;
      }
    }
    if(k == i + M && l == j + M){
      break;
    }
  }
  
  if(k == i + M && l == j + M){
    printf("No\n");
  } else {
    printf("Yes\n");
  }
  
  return 0;
}
  

Compiler output:
main.c: In function 'main':
main.c:20:11: error: 'flag' undeclared (first use in this function)
   20 |           flag = 1;
      |           ^~~~
main.c:20:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:22:21: error: expected ';' before ':' token
   22 |             flag = 0:
      |                     ^
      |                     ;
Language: Java

import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(Systee.in);
        int N = sc.nextInt();
        int M = sc.nextInt();

        A = new char[N][N];
        for (int i = 0; i < N; i++)
            A[i] = sc.next().toCharArray();
        B = new char[M][M];
        for (int i = 0; i < M; i++)
            B[i] = sc.next().toCharArray();

        for (int ii = 0; ii <= N - M; ii++) {
            for (int jj = 0; jj <= N - M; jj++) {
                if (match(ii, jj)) {
                    System.out.println("Yes");
                    return;
                }
            }
        }
        System.out.println("No");
    }

    public static boolean match(int ii, int jj) {
        for (int i = 0; i < M; i++) {
            for (int j = 0; j < M; j++) {
                if (A[i + ii][j + jj] != B[i][j])
                    return false;
            }
        }
        return true;
    }
}


Compiler output:
Main.java:5: error: cannot find symbol
        Scanner sc = new Scanner(Systee.in);
                                 ^
  symbol:   variable Systee
  location: class Main
Main.java:9: error: cannot find symbol
        A = new char[N][N];
        ^
  symbol:   variable A
  location: class Main
Main.java:11: error: cannot find symbol
            A[i] = sc.next().toCharArray();
            ^
  symbol:   variable A
  location: class Main
Main.java:12: error: cannot find symbol
        B = new char[M][M];
        ^
  symbol:   variable B
  location: class Main
Main.java:14: error: cannot find symbol
            B[i] = sc.next().toCharArray();
            ^
  symbol:   variable B
  location: class Main
Main.java:28: error: cannot find symbol
        for (int i = 0; i < M; i++) {
                            ^
  symbol:   variable M
  location: class Main
Main.java:29: error: cannot find symbol
            for (int j = 0; j < M; j++) {
                                ^
  symbol:   variable M
  location: class Main
Main.java:30: error: cannot find symbol
                if (A[i + ii][j + jj] != B[i][j])
                    ^
  symbol:   variable A
  location: class Main
Main.java:30: error: cannot find symbol
                if (A[i + ii][j + jj] != B[i][j])
                                         ^
  symbol:   variable B
  location: class Main
9 errors
Language: C

#include<stdio.h>
int N, M, L, i, j, x, y;
short flag;
char A[51][51], B[51][51];
int main(){
  scanf("%d %d\n", &N, &M);
  for(i=0; i<N; i++){
    scanf("%s\n", A[i]);
  }
  for(i=0; i<M; i++){
    scanf("%s\n", B[i]);
  }
  L=N-M;
  for(i=0; i<L; i++){
    for(i=0; i<L; i++){
      flag=1;
        for(x=0; x<M; x++){
          for(y=0; y<M; y++){
            if(M[x][y] != N[i+x][j+y]){
              flag = 0;
              break;
            }
          }
          if(!flag){break;}
        }
      if(flag){
        printf("Yes\n");
        return 0;
      }
    }
  }
  printf("No\n");
}


Compiler output:
main.c: In function 'main':
main.c:19:17: error: subscripted value is neither array nor pointer nor vector
   19 |             if(M[x][y] != N[i+x][j+y]){
      |                 ^
main.c:19:28: error: subscripted value is neither array nor pointer nor vector
   19 |             if(M[x][y] != N[i+x][j+y]){
      |                            ^
Language: C++

#include <iostream>
using namespace std
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:2:20: error: expected ';' before 'int'
    2 | using namespace std
      |                    ^
      |                    ;
    3 | int main(void){
      | ~~~
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:2:18: error: 'cin' was not declared in this scope
    2 |         int N,M; cin>>N>>M;
      |                  ^~~
a.cc:28:9: error: 'cout' was not declared in this scope
   28 |         cout << "Yes" << endl;
      |         ^~~~
a.cc:28:26: error: 'endl' was not declared in this scope
   28 |         cout << "Yes" << endl;
      |                          ^~~~
a.cc:30:9: error: 'cout' was not declared in this scope
   30 |         cout << "No" << endl;
      |         ^~~~
a.cc:30:25: error: 'endl' was not declared in this scope
   30 |         cout << "No" << endl;
      |                         ^~~~
Language: C++

int main(void){
  int N,M;
  cin >> N >> M;
  vector<string> A(N), B(M);
  for (int i=0; i<N; i++) cin >> A.at(i);
  for (int i=0; i<M; i++) cin >> B.at(i);
  
  bool is_exist = false;
  for (int i=0; i<N-M+1; i++) {
    for (int j=0; j<N-M+1; j++) {
      if (A.at(i).at(j) != B.at(0).at(0)) continue;
      else {
        bool is_match = true;
        for (int k=0; k<M; k++) {
          for (int l=0; l<M; l++) {
            if (A.at(i+k).at(j+l) != B.at(k).at(l)) {
              is_match = false;
              break;
            }
          }
          if (is_match) break;
        }
        if (is_match) {
          is_exist = true;
          break;
        }
      }
    }
    if (is_exist) break;
  }
  if (is_exist) cout << "Yes" << endl;
  else cout << "No" << endl;
}
  
            

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin >> N >> M;
      |   ^~~
a.cc:4:3: error: 'vector' was not declared in this scope
    4 |   vector<string> A(N), B(M);
      |   ^~~~~~
a.cc:4:10: error: 'string' was not declared in this scope
    4 |   vector<string> A(N), B(M);
      |          ^~~~~~
a.cc:4:18: error: 'A' was not declared in this scope
    4 |   vector<string> A(N), B(M);
      |                  ^
a.cc:4:24: error: 'B' was not declared in this scope
    4 |   vector<string> A(N), B(M);
      |                        ^
a.cc:31:17: error: 'cout' was not declared in this scope
   31 |   if (is_exist) cout << "Yes" << endl;
      |                 ^~~~
a.cc:31:34: error: 'endl' was not declared in this scope
   31 |   if (is_exist) cout << "Yes" << endl;
      |                                  ^~~~
a.cc:32:8: error: 'cout' was not declared in this scope
   32 |   else cout << "No" << endl;
      |        ^~~~
a.cc:32:24: error: 'endl' was not declared in this scope
   32 |   else cout << "No" << endl;
      |                        ^~~~
Language: C++

n, m = map(int, input().split())
a = [input() for _ in range(n)]
b = [input() for _ in range(m)]
mon = ([row[j:j+m] for row in a[i:i+m]]
      for i in range(n-m+1) for j in range(n-m+1))
print('Yes' if any(c == b for c in mon) else 'No')

Compiler output:
a.cc:6:7: warning: multi-character character constant [-Wmultichar]
    6 | print('Yes' if any(c == b for c in mon) else 'No')
      |       ^~~~~
a.cc:6:46: warning: multi-character character constant [-Wmultichar]
    6 | print('Yes' if any(c == b for c in mon) else 'No')
      |                                              ^~~~
a.cc:1:1: error: 'n' does not name a type
    1 | n, m = map(int, input().split())
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
char a[51][51],b[51][51];
int main(){
	int n,m,i;
	cin>>n>>m;
	getchar();
	for(i=1;i<=n;i++){
		gets(a[i]);
	}
	for(i=1;i<=m;i++){
		gets(b[i]);
	}
	
	for(i=0;i+m-1<n;i++){
		for(int j=0;j+m-1<n;j++){
			bool flag=true;
			for(int k=0;k<n;k++){
				for(int l=0;l<n;l++){
					if(a[i+k][j+l]!=b[k][l]){
						flag=false;
					}
				}
			}
			if(flag){
				cout<<"Yes";
				return 0;
			}
			flag=true;
		}
	}
	cout<<"No";
	return 0;
}


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

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
int a[101][101],b[101][101];
bool tmp[101][101];
int main()
{
	int i,j,k,p,x,y;
	bool tmp;
	cin>>x>>y;
	for(i=1;i<=x;i++)
	{
		for(j=1;j<=x;j++)
		{
			cin>>a[i][j];
		}
	}
	for(i=1;i<=y;i++)
	{
		for(j=1;j<=y;j++)
		{
			cin>>b[i][j];
		}
	}
	for(i=1;i<=x;i++)
	{
		for(j=1;j<=x;j++)
		{
			if(a[i][j]==b[1][1])
			{
				for(k=i;k<=y;k++)
				{
					for(p=j;p<=y;p++)
					{
						if(a[k][p]!=b[i][j]) 
						{
							tmp[k][p]=false;
							break;
						}
					}
				}
			}
		}
	}
	for(i=1;i<=x;i++)
	{
		for(j=1;j<=x;j++)
		{
			if(tmp[i][j]==true)
			{
				cout<<"Yes";
				return 0;
			}
		}
	}
	cout<<"No";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:38:60: error: invalid types 'bool[int]' for array subscript
   38 |                                                         tmp[k][p]=false;
      |                                                            ^
a.cc:50:31: error: invalid types 'bool[int]' for array subscript
   50 |                         if(tmp[i][j]==true)
      |                               ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int a,b;
  cin>>a>>b;
  char c[a][a];
  char d[b][b];
  for(int i=0;i<a;i++){
    for(int j=0;j<a;j++){
      cin>>c[i][j];
    }
  }
  for(int i=0;i<b;i++){
    for(int j=0;j<b;j++){
      cin>>d[i][j];
    }
  }
  bool f=false;
  int e;
  for(int i=0;i<a-b+1){
    for(int j=0;j<a-b+1){
      if(d[0][0]==c[i][j]){
        e=0;
        for(int k=0;k<b;k++){
          for(int l=0;l<b;l++){
            if(d[k][l]==c[i+k][j+l])
              e++;
            if(e==b*b){
              cout<<"Yes";
              return 0;
            }
          }
        }
      }
    }
  }
  cout<<"No";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:22: error: expected ';' before ')' token
   20 |   for(int i=0;i<a-b+1){
      |                      ^
      |                      ;
a.cc:21:24: error: expected ';' before ')' token
   21 |     for(int j=0;j<a-b+1){
      |                        ^
      |                        ;
Language: C++

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

int main(){
    char a[50][50];
    char b[50][50];
    int n,m;
    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];
        }
    }

    bool exist=false;
    for(int ly=0;ly<n;ly++){
        for(int lx=0;lx<n;lx++){
            if(ly+M-1>=N || lx+M--1>=N)continue;

            bool match=true;
        }
    }
    if(exist)
    puts("Yes");
    else
    puts("No");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:28: error: expected ';' before ')' token
   10 |         for(int j=0;j<n,j++){
      |                            ^
      |                            ;
a.cc:15:28: error: expected ';' before ')' token
   15 |         for(int j=0;j<m,j++){
      |                            ^
      |                            ;
a.cc:23:19: error: 'M' was not declared in this scope
   23 |             if(ly+M-1>=N || lx+M--1>=N)continue;
      |                   ^
a.cc:23:24: error: 'N' was not declared in this scope
   23 |             if(ly+M-1>=N || lx+M--1>=N)continue;
      |                        ^
a.cc:23:35: error: expected ')' before numeric constant
   23 |             if(ly+M-1>=N || lx+M--1>=N)continue;
      |               ~                   ^
      |                                   )
Language: C++

#include <iostream>
#include <string>

int main() {
  int N, M;
  std::cin >> N >> M;
  std::string A[N], B[M];
  for (int i = 0; i < N; ++i) {
    std::cin >> A[i];
  }
  for (int i = 0; i < M; ++i) {
    std::cin >> B[i];
  }

  bool exist = false;
  for (int i = 0; i < N; ++i) {
    for (int j = 0; j < N; ++j) {
      if ( j + M - 1 >= || i + M - 1 ) continue;
      bool match = true;
      for (int ii = 0; ii < M; ++ii) {
        for (int jj = 0; j < M; ++jj) {
          if ( A[i + ii][j + jj] != B[i][j] ) match = false
        }
      }
      if ( match ) exist = true;
    }
  }
  if ( exist ) std::cout << "Yes" << std::endl;
  else std::cout << "No" << std::endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:25: error: expected primary-expression before '||' token
   18 |       if ( j + M - 1 >= || i + M - 1 ) continue;
      |                         ^~
a.cc:22:60: error: expected ';' before '}' token
   22 |           if ( A[i + ii][j + jj] != B[i][j] ) match = false
      |                                                            ^
      |                                                            ;
   23 |         }
      |         ~
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
#include<functional>
#include<utility>
#include<stack>
#include<queue>
#include<cmath>
#include<list>
#include<cstdint>
#include<vector>
#include<map>
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
#define rep(i,rept)	for(ll i = 0; i<rept;i++)
typedef long long ll;
using namespace std;

ll nCr(ll n, ll r) {
	if (r > n) { return 0; }
	if (r * 2 > n) r = n - r;
	ll dividend = 1;
	ll divisor = 1;
	for (ll i = 1; i <= r; ++i) {
		dividend *= (n - i + 1);
		divisor *= i;
	}
	return dividend / divisor;
}
ll sumdigit(ll n) {
	ll dig = 0, sum = 0;
	while (n) {
		dig = n % 10;
		sum = sum + dig;
		n = n / 10;
	}
	return sum;
}



int main() {
	int N, M, i, j, k, l, count = 0, flag = 0;
	cin >> N >> M;
	vector<vector<char>> NN(N, vector<char>(N));
	vector<vector<char>> MM(M, vector<char>(M));

	for (i = 0; i < N; i++) {
		for (j = 0; j < N; j++)
			cin >> NN[i][j];
	}
	for (i = 0; i < M; i++) {
		for (j = 0; j < M; j++)
			cin >> MM[i][j];
	}

	for (i = 0; i < N + 1 - M; i++) {
		for (j = 0; j < N + 1 - M; j++) {
			count = 0;
			if (NN[i][j] == MM[0][0]) {
				for (k = 0; k < M; k++) {
					for (l = 0; l < M; l++) {
						if (NN[k + i][l + j] == MM[k][l]) {
							count++;
						}
					}
				}
			}
			if (count == M * M) {
				cout << "Yes" << endl;
				flag = 1;
				break;
			}
		}
}

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

#include<bits/stdc++.h>
using namespace std;
int main(){
    int a,b;
    cin>>a>>b;
    bool c=true;
    char x[a][a],y[b][b];
    for(int i=0;i<a;i++){
        for(int j=0;j<a;j++)cin>>x[i][j];
    }
    for(int i=0;i<b;i++){
        for(int j=0;j<b;j++)cin>>y[i][j];
    }
    for(int i=0;i<=a-b;i++){
        for(int j=0;j<=a-b;j++){
            c=true;
            for(int k=0;k<b;k++){
                for(int l=0;l<b;l++){
                    if(a[i+k][j+l]!=b[k][l])c=false;
                }
            }
            if(c){
                cout<<"Yes"<<endl;
                return 0;
            }
        }
    }
    cout<<"No"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:25: error: invalid types 'int[int]' for array subscript
   19 |                     if(a[i+k][j+l]!=b[k][l])c=false;
      |                         ^
a.cc:19:38: error: invalid types 'int[int]' for array subscript
   19 |                     if(a[i+k][j+l]!=b[k][l])c=false;
      |                                      ^
Language: C++

#include <stdio.h>
#include <math.h>
int main(void){
 char a[2500],b[2500];
 int i,n,m;
 scanf("%d%d",&n,&m);
 for(i=0;i<n;i++)
     scanf("%c",&a[i]);
 for(i=0;i<m;i++)
      scanf("%c",&b[i]);
sqrt








}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: expected ';' before '}' token
   11 | sqrt
      |     ^
      |     ;
......
   20 | }
      | ~    
a.cc:20:1: error: statement cannot resolve address of overloaded function
   20 | }
      | ^
Language: C++

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

int main() {
	int n, m;
	cin >> n >> m;
	string a[50], b[50];
	for (int i = 0; i < n; i++)cin >> a[i];
	for (int i = 0; i < m; i++)cin >> b[i];
	string ans = "No";
	for (int i = 0; i + m <= n; i++) {
		ans = "No";
		for (int j = 0;j <= n - m;j++) {
			for (int k = 0; k < m; k++) {
				if (a[i + k].substr(j, m) != b[k]) break;
				if (k == m)ans = "Yes";
				}
			}
		}
		if (ans == "Yes") {
			break;
		}
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:25: error: break statement not within loop or switch
   22 |                         break;
      |                         ^~~~~
a.cc: At global scope:
a.cc:25:9: error: 'cout' does not name a type
   25 |         cout << ans << endl;
      |         ^~~~
a.cc:26:1: error: expected declaration before '}' token
   26 | }
      | ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

#define INF 1e9

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

    int n,m;
    cin>>n>>m;

    char c1[60][60],c2[60][60];

    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
            cin>>c1[i][j];
        }
    }
    for(int i=0;i<m;i++){
        for(int j=0;j<m;j++){
            cin>>c2[i][j];
        }
    }

    bool ans=false;

    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
            bool f=true;
            for(int k=0;k<m;k++){
                for(int l=0;l<m;l++){
                    if((i+k)>=n || (j+l)>=n){
                        f=false
                        continue;
                    }
                    if(c1[i+k][j+l]!=c2[k][l])f=false;
                }
            }
            if(f)ans=true;
        }
    }

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

}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:32: error: expected ';' before 'continue'
   35 |                         f=false
      |                                ^
      |                                ;
   36 |                         continue;
      |                         ~~~~~~~~
Language: C++

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


int n,m;
char a[55][55],b[55][55];

int main(){
	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<n;j++)cin>>b[j][i];
	
	bool exist=false;
	
	for(int dy=0;dy<n;dy++){
		for(int dx=0;dx<n;dx++){
			if(dx+m-1>=n||dy+m-1>=n)continue;
			bool match=true;
			for(int y=0;y<m;y++){
				for(int x=0;x<m;x++){
					if(a[dy+y][dx+x]!=b[y][x])match=false;
				}
			}
		}
		if(match) exist=true;
	}
	if(exist)cout<<"Yes"<<endl;
	else cout<<"No"<<endl;
}

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

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


int n,m,dy;
char a[55][55],b[55][55];

int main(){
	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<n;j++)cin>>b[j][i];
	
	bool exist=false;
	
	for(int dy=0;dy<n;dy++){
		for(dx=0;dx<n;dx++){
			if(dx+m-1>=n||dy+m-1>=n)continue;
		}
		bool match=true;
		for(int y=0;y<m;y++){
			for(int x=0;x<m;x++){
				if(a[dy+y][dx+x]!=b[y][x])match=false;
			}
		}
		if(match) exist=true;
	}
	if(exist)cout<<"Yes"<<endl;
	else cout<<"No"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:21: error: 'dx' was not declared in this scope; did you mean 'dy'?
   16 |                 for(dx=0;dx<n;dx++){
      |                     ^~
      |                     dy
a.cc:22:44: error: 'dx' was not declared in this scope; did you mean 'x'?
   22 |                                 if(a[dy+y][dx+x]!=b[y][x])match=false;
      |                                            ^~
      |                                            x
Language: C++

#include <iostream>
using namespace std;

int main(){
	int N, M;
	cin >> N >> M;
	char A[N][N], B[M][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 y=0; y<N-M+1; y++){
		int flag=1;
		for(int x=0; x<N-M+1; x++){
			if(A[y][x]==B[0][0]){
				flag = 0;
				for(int i=1; i<M; i++){
					for(int j=1; j<M; j++){
						if(A[y+i][x+j]!=B[i][j]){
							flag=1;
							break;
						}
					}
					if(flag==1){
						break;
					}
				}
			}
		}
		if(flag==0){
			cout << "Yes" << endl;
			return 0;
	}
	cout << "No" << endl;
}


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

#include <iostream>
using namespace std;

int main(){
	int N, M;
	cin >> N >> M;
	char A[N][N], B[M][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 y=0; y<N-M+1; y++){
		int flag=0;
		for(int x=0; x<N-M+1; x++){
			if(A[y][x]==B[0][0]){
				for(int i=1; i<M; i++){
					for(int j=1; j<M; j++){
						if(A[y+i][x+j]!=B[i][j]){
							flag=1;
							break;
						}
					}
					if(flag==1) break;
			} else if {
				flag = 1;
			}
		}
		if(flag==0){
			cout << "Yes" << endl;
			return 0;
	}
	cout << "No" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:27: error: expected '}' before 'else'
   31 |                         } else if {
      |                           ^~~~
a.cc:22:45: note: to match this '{'
   22 |                         if(A[y][x]==B[0][0]){
      |                                             ^
a.cc:31:35: error: expected '(' before '{' token
   31 |                         } else if {
      |                                   ^
      |                                   (
a.cc:40:2: error: expected '}' at end of input
   40 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <iostream>
using namespace std;

int main(){
	int N, M;
	cin >> N >> M;
	char A[N][N], B[M][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 y=0; y<N-M+1; y++){
		int flag=0;
		for(int x=0; x<N-M+1; x++){
			if(A[y][x]==B[0][0]){
				for(int i=1; i<M; i++){
					for(int j=1; j<M; j++){
						if(A[y+i][x+j]!=B[i][j]){
							flag=1;
							break;
						}
					}
					if(flag==1) break;
				}
			} else if {
				flag = 1;
			}
		}
		if(flag==0){
			cout << "Yes" << endl;
			return 0;
	}
	cout << "No" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:32:35: error: expected '(' before '{' token
   32 |                         } else if {
      |                                   ^
      |                                   (
a.cc:41:2: error: expected '}' at end of input
   41 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <iostream>
using namespace std;

int main(){
	int N, M, c;
	cin >> N >> M;
	int A[N][N], B[M][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-M+1; i++){
		c=0;
		for(int j=0; j<N-M+1; j++){
			if(A[i][j]==B[0][0]){
				for(int k=0; k<M; k++){
					for(int l=0; l<M; l++){
						if(A[i+k][j+l]!=B[k][l]){
							c=1;
							break;
						}
					}
					if(c==1) break;
				}
			} else if(A[i][j]!=B[0][0]){
				c=1;
			}
			if(c==0){
				cout << "Yes" << endl;
				break;
		}
	}
	if(c==1) cout << "No" << endl;
}


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

import sys
def main():
    n, m = map(int, input().split())
    A = [list(input()) for _ in range(n)]
    B = [list(input()) for _ in range(m)]

    for i in range(n - m + 1):
        for j in range(n - m + 1):
            f = 1
            for k in range(m):
                for l in range(m):
                    if A[i + k][j + l] != B[k][l]:
                        f = 0
                        break
                if f == 0:
                    break
            if f:
                print("Yes")
                sys.exit()
    print("No")


if __name__ == "__main__":
    main()

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import sys
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

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

int main(void){
    int n, m;
    char a[50], b[50];
    cin >> n >> m;
    for (int i = 0; i < n; i++) cin >> a[i];
    for (int i = 0; i < m; i++) cin >> b[i];
    for (int i = 0; i < n - m; i++) {
        bool flag = true;
        for (int j = 0; i < m; j++) {
            if (a[i + j] != b[j]) {
                flag = false;
                break;
            }
        }
    }
    cout << (flag ? "Yes" : "No") << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:14: error: 'flag' was not declared in this scope
   20 |     cout << (flag ? "Yes" : "No") << endl;
      |              ^~~~
Language: C++

#include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <sstream>
#include <functional>
#include <map>
#include <string>
#include <cstring>
#include <vector>
#include <queue>
#include <stack>
#include <deque>
#include <set>
#include <list>
#include <numeric>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll,ll> P;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const ll INF = 1LL<<29;
const ll mod = 1e9+7;
#define rep(i,n) for(int (i)=0;(i)<(ll)(n);++(i))
#define repd(i,n,d) for(ll (i)=0;(i)<(ll)(n);(i)+=(d))
#define all(v) (v).begin(), (v).end()
#define pb(x) push_back(x)
#define mp(x,y) make_pair((x),(y))
#define mset(m,v) memset((m),(v),sizeof(m))
#define chmin(x,y) (x=min(x,y))
#define chmax(x,y) (x=max(x,y))
#define fst first
#define snd second
#define UNIQUE(x) (x).erase(unique(all(x)),(x).end())
template<class T> ostream &operator<<(ostream &os, const vector<T> &v){int n=v.size();rep(i,n)os<<v[i]<<(i==n-1?"":" ");return os;}
#define N 60
string s[N], t[N];

int main(){
	int n, m;
  cin>>n>>m;
  rep(i, n) cin>>s[i];
  rep(j, m) cin>>t[i];
  rep(i, n-m+1) rep(j, n-m+1){
    bool ok = true;
    rep(i2, m) rep(j2, m) if(t[i2][j2]!=s[i2+i][j2+j]) ok = false;
    if(ok){
      cout<<"Yes"<<endl;
      return 0;
    }
  }
  cout<<"No"<<endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:47:20: error: 'i' was not declared in this scope
   47 |   rep(j, m) cin>>t[i];
      |                    ^
Language: C++

#include <cstdio>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <iostream>
using namespace std;
int main(){
  int N,M;
  char A[51],B[51];
  scanf("%d %d",&N,&M);
  for(int i=1;i<=N;i++){
    for(int j=1;j<=N;j++) scanf("%c",&A[i][j]);
  }
  for(int i=1;i<=M;i++){
    for(int j=1;j<=M;j++) scanf("%c",&B[i][j]);
  }
  for(int i=1;i<=N-M+1;i++){
    for(int j=1;j<=N-M+1;j++){
      if(A[i][j]==B[1][1]){
        bool f=true;
        for(int k=i;k<=i+M-1;k++){
          for(int l=j;l<=j+M-1;l++){
            if(A[k][l]!=B[k-i+1][l-j+1]){
              f=false;break;
            }
            if(!f) break;
          }
        }
        if(f){
          printf("Yes\n");
          return 0;
        }
      }
    }
  }
  printf("No\n");
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:43: error: invalid types 'char[int]' for array subscript
   12 |     for(int j=1;j<=N;j++) scanf("%c",&A[i][j]);
      |                                           ^
a.cc:15:43: error: invalid types 'char[int]' for array subscript
   15 |     for(int j=1;j<=M;j++) scanf("%c",&B[i][j]);
      |                                           ^
a.cc:19:14: error: invalid types 'char[int]' for array subscript
   19 |       if(A[i][j]==B[1][1]){
      |              ^
a.cc:19:23: error: invalid types 'char[int]' for array subscript
   19 |       if(A[i][j]==B[1][1]){
      |                       ^
a.cc:23:20: error: invalid types 'char[int]' for array subscript
   23 |             if(A[k][l]!=B[k-i+1][l-j+1]){
      |                    ^
a.cc:23:33: error: invalid types 'char[int]' for array subscript
   23 |             if(A[k][l]!=B[k-i+1][l-j+1]){
      |                                 ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
char a[1200][1200],b[120][120];
int n,m;
int mark=1;
int main() {
	cin>>n>>m;
    for(int i=0;i<n;i++) {
    	scanf("%s",a[i]);
    }
     for(int i=0;i<m;i++) {
    	scanf("%s",b[i]);
     }
    for(int i=0;i<n;i++) {
         for(int j=0;j<n;j++) {
             if(a[i][j]==b[0][0]) {
                flag=0;
                 for(int x=0;x<m;x++) {
                     for(int y=0;y<m;y++) {
                         if(a[i+x][j+y]!=b[x][y]) {
                             flag=1;
                             break;
                         }
                     }
                 }
             }
             if(flag==0) {
                 printf("Yes");
                 return 0;
             }
         }
     }
     printf("No");
     return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:17: error: 'flag' was not declared in this scope
   17 |                 flag=0;
      |                 ^~~~
a.cc:27:17: error: 'flag' was not declared in this scope
   27 |              if(flag==0) {
      |                 ^~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int m,n;
string a[100], b[100];
int main(){
cin >> m >> n;
for(int i = 0; i < m; ++i){
cin >> a[i];
}
for(int i = 0; i < n; ++i){
cin >> b[i];
}
bool allok = false;
for(int i = 0; i <= m - n; ++i){
for(int j = 0; j <= m - n; ++j){
bool ok = true;
for(int k = 0; k < n; ++k){
for(int l = 0; l < n; ++l){
if(a[i + k][j + l] != b[k][l]) {ok = false; break}
}
}
if(ok){allok =true; break;}
}
}
cout << (allok ? "Yes" : "No") << endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:50: error: expected ';' before '}' token
   20 | if(a[i + k][j + l] != b[k][l]) {ok = false; break}
      |                                                  ^
      |                                                  ;
Language: C++

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

int main(){
    int n,m;
    cin >> n >> m;
    vector<string> a(n,""), b(m,"");
    for(int i = 0; i < n; i++){
        cin >> a[i];
    }
    for(int i = 0; i < m; i++){
        cin >> b[i];
    }
    bool match = false;
    for(int i = 0; i < n - m + 1; i++){
        for(int j = 0; j < n - m + 1; j++){
            for(int ii = 0; ii < m; ii++){
                for(int jj = 0; jj < m; jj++){
                    if(a[i + ii][j + jj] == b[ii][jj]){
                        match = true;
                    }else{
                        match = false;
                    }
                }
            }
            if (match){
                cout << "Yes" << endl;
                return 0;
            }
        }
    }
    cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin >> n >> m;
      |     ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include<vector>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:28:17: error: 'cout' was not declared in this scope
   28 |                 cout << "Yes" << endl;
      |                 ^~~~
a.cc:28:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:28:34: error: 'endl' was not declared in this scope
   28 |                 cout << "Yes" << endl;
      |                                  ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include<vector>
  +++ |+#include <ostream>
    3 | using namespace std;
a.cc:33:5: error: 'cout' was not declared in this scope
   33 |     cout << "No" << endl;
      |     ^~~~
a.cc:33:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:33:21: error: 'endl' was not declared in this scope
   33 |     cout << "No" << endl;
      |                     ^~~~
a.cc:33:21: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

3 2
#.#
.#.
#.#
#.
.#

Compiler output:
a.cc:2:2: error: invalid preprocessing directive #.
    2 | #.#
      |  ^
a.cc:3:2: error: stray '#' in program
    3 | .#.
      |  ^
a.cc:4:2: error: invalid preprocessing directive #.
    4 | #.#
      |  ^
a.cc:5:2: error: invalid preprocessing directive #.
    5 | #.
      |  ^
a.cc:6:2: error: stray '#' in program
    6 | .#
      |  ^
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 3 2
      | ^
Language: C++

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

int main() {
	int n, m;
	cin >> n >> m;
	char** a = new int[n][n];
	char** b = new int[m][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-m+1; i++) {
		for(int j = 0; j < n-m+1; j++) {
			for(int k = 0; k < m; k++) {
				if(strncmp(a[i+k]+j, b[0], m) != 0)
					break;
				if(k == m-1) {
					cout << "yes" << endl;
					return 0;
				}
			}
		}
	}
	cout << "no" << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:32: error: array size in new-expression must be constant
    8 |         char** a = new int[n][n];
      |                                ^
a.cc:8:32: error: the value of 'n' is not usable in a constant expression
a.cc:6:13: note: 'int n' is not const
    6 |         int n, m;
      |             ^
a.cc:9:32: error: array size in new-expression must be constant
    9 |         char** b = new int[m][m];
      |                                ^
a.cc:9:32: error: the value of 'm' is not usable in a constant expression
a.cc:6:16: note: 'int m' is not const
    6 |         int n, m;
      |                ^
Language: C++

#define rep(i,n) for (int i=0;i<(n);i++)
#include<iostream>
using namespace std;

int main(){
	int m,n;
	string a[51],b[51];
	cin >> n >> m;
	rep(i,n) cin >>a[i];
	rep(i,m) cin >>b[i];

	bool exist = false;
	for(int i=0;i<=n-m;i++){
		for(int j=0;j<=n-m;j++{
				bool match = true;
				for(int y=0;y<m;y++){
					for(int x=0;x<m;x++){
						if(a[i+y][j+x]!=b[y][x]) match=false;
						continue;
					}
				}
				if(match) exist=true;
		}
	}

	cout << ((exist) ? "Yes\n":"No\n");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:39: error: expected ')' before '{' token
   14 |                 for(int j=0;j<=n-m;j++{
      |                    ~                  ^
      |                                       )
Language: C

/*
  B - Template Matching
  <http://abc054.contest.atcoder.jp/tasks/abc054_b>
*/

#include <stdio.h>

int main(int argc, char const *argv[]) {

  int N,M;
  int i,j,k,l;
  char A[50][51],B[50][51];
  int judge;

  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; i++ ){
    for( j=0; j<N; j++ ){
      judge = 0;
      for( k=0; k<M; k++ ){
        for( l=0; l<M; l++ ){
          if( (i+k < N) && (j+l < N) ){
            if( A[i+k][j+l] == B[k][l] ){
              judge = 1;
            }
          }
        }
      }
      if( judge == 1 ){
        break;
      }
    }
    if( judge == 1 ){
      break;
    }
  }

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

  return 0;
}
/*
  B - Template Matching
  <http://abc054.contest.atcoder.jp/tasks/abc054_b>
*/

#include <stdio.h>

int main(int argc, char const *argv[]) {

  int N,M;
  int i,j,k,l;
  char A[50][51],B[50][51];
  int judge;

  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; i++ ){
    for( j=0; j<N; j++ ){
      judge = 0;
      for( k=0; k<M; k++ ){
        for( l=0; l<M; l++ ){
          if( (i+k < N) && (j+l < N) ){
            if( A[i+k][j+l] == B[k][l] ){
              judge = 1;
            }
          }
        }
      }
      if( judge == 1 ){
        break;
      }
    }
    if( judge == 1 ){
      break;
    }
  }

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

  return 0;
}


Compiler output:
main.c:59:5: error: redefinition of 'main'
   59 | int main(int argc, char const *argv[]) {
      |     ^~~~
main.c:8:5: note: previous definition of 'main' with type 'int(int,  const char **)'
    8 | int main(int argc, char const *argv[]) {
      |     ^~~~