Language: C++

using System;

namespace ABC054B
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] bufs = Console.ReadLine().Split(' ');
            int N = Int32.Parse(bufs[0]);
            int M = Int32.Parse(bufs[1]);
            string[] A = new string[N];
            string[] B = new string[M];

            bool res = false;

            for (int i = 0; i < N; i++)
            {
                A[i] = Console.ReadLine();
            }
            for (int i = 0; i < M; i++)
            {
                B[i] = Console.ReadLine();
            }

            int cur = -1;
            int seek = 0;

            while (seek < (N - M + 1))
            {
                cur = A[seek].IndexOf(B[0], cur + 1);
                seek++;
                if (cur != -1)
                {
                    int j = 1;
                    while (j < M)
                    {
                        if (A[seek].IndexOf(B[j], cur, M) != cur) { break; }
                        seek++;
                        j++;
                    }
                    if (j >= M)
                    {
                        res = true;
                    }
                }
            }

            Console.WriteLine(res ? "Yes" : "No");
            return;
        }

    }
}


Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:7:26: error: 'string' has not been declared
    7 |         static void Main(string[] args)
      |                          ^~~~~~
a.cc:7:35: error: expected ',' or '...' before 'args'
    7 |         static void Main(string[] args)
      |                                   ^~~~
a.cc:53:6: error: expected ';' after class definition
   53 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void ABC054B::Program::Main(int*)':
a.cc:9:13: error: 'string' was not declared in this scope
    9 |             string[] bufs = Console.ReadLine().Split(' ');
      |             ^~~~~~
a.cc:9:20: error: expected primary-expression before ']' token
    9 |             string[] bufs = Console.ReadLine().Split(' ');
      |                    ^
a.cc:10:21: error: 'Int32' was not declared in this scope
   10 |             int N = Int32.Parse(bufs[0]);
      |                     ^~~~~
a.cc:10:33: error: 'bufs' was not declared in this scope
   10 |             int N = Int32.Parse(bufs[0]);
      |                                 ^~~~
a.cc:12:20: error: expected primary-expression before ']' token
   12 |             string[] A = new string[N];
      |                    ^
a.cc:13:20: error: expected primary-expression before ']' token
   13 |             string[] B = new string[M];
      |                    ^
a.cc:19:17: error: 'A' was not declared in this scope
   19 |                 A[i] = Console.ReadLine();
      |                 ^
a.cc:19:24: error: 'Console' was not declared in this scope
   19 |                 A[i] = Console.ReadLine();
      |                        ^~~~~~~
a.cc:23:17: error: 'B' was not declared in this scope
   23 |                 B[i] = Console.ReadLine();
      |                 ^
a.cc:23:24: error: 'Console' was not declared in this scope
   23 |                 B[i] = Console.ReadLine();
      |                        ^~~~~~~
a.cc:31:23: error: 'A' was not declared in this scope
   31 |                 cur = A[seek].IndexOf(B[0], cur + 1);
      |                       ^
a.cc:31:39: error: 'B' was not declared in this scope
   31 |                 cur = A[seek].IndexOf(B[0], cur + 1);
      |                                       ^
a.cc:49:13: error: 'Console' was not declared in this scope
   49 |             Console.WriteLine(res ? "Yes" : "No");
      |             ^~~~~~~