Language: C++

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication4
{
    class Program
    {
        static string[] boards;
        static string name;
        static int ans = 0;

        static void Main()
        {
            int N = int.Parse(Console.ReadLine());
            name = Console.ReadLine();
            boards = new string[N];
            for (int i = 0; i < N; i++)
            {
                boards[i] = Console.ReadLine();
            }

            for (int i = 0; i < N; i++)
            {
                bool corrected = false;
                for (int haba = boards[i].Length; haba > 0; haba--)
                {
                    for (int j = 0; j < boards[i].Length; j++)
                    {
                        int pre = -1;
                        int count = 1;
                        if (boards[i][j] == name[0])
                        {
                            pre = j;
                        }
                        if (pre == -1) continue;
                        for (int k = 1; pre + haba * k < boards[i].Length; k++)
                        {
                            if (boards[i][pre + haba * k] == name[count])
                            {
                                count++;
                                if (count == name.Length)
                                {
                                    ans++;
                                    corrected = true;
                                    break;
                                }
                            }
                        }
                        if (corrected) break;
                    }
                    if (corrected) break;
                }
            }

            Console.WriteLine(ans);
            Console.ReadKey();
        }
    }
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Linq;
      |       ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
    4 | using System.Text;
      |       ^~~~~~
a.cc:10:16: error: 'string' does not name a type
   10 |         static string[] boards;
      |                ^~~~~~
a.cc:11:16: error: 'string' does not name a type
   11 |         static string name;
      |                ^~~~~~
a.cc:12:20: error: ISO C++ forbids in-class initialization of non-const static member 'ConsoleApplication4::Program::ans'
   12 |         static int ans = 0;
      |                    ^~~
a.cc:60:6: error: expected ';' after class definition
   60 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void ConsoleApplication4::Program::Main()':
a.cc:16:21: error: expected primary-expression before 'int'
   16 |             int N = int.Parse(Console.ReadLine());
      |                     ^~~
a.cc:17:13: error: 'name' was not declared in this scope
   17 |             name = Console.ReadLine();
      |             ^~~~
a.cc:17:20: error: 'Console' was not declared in this scope
   17 |             name = Console.ReadLine();
      |                    ^~~~~~~
a.cc:18:13: error: 'boards' was not declared in this scope
   18 |             boards = new string[N];
      |             ^~~~~~
a.cc:18:26: error: 'string' does not name a type
   18 |             boards = new string[N];
      |                          ^~~~~~