Language: C++

using System;
class Program
{
	static void Main()
	{
	string[] input = Console.ReadLine().Split(' ');//Splitで区切り文字を指定して複数個受け取る。
	int h = int.Parse(input[0]);
	int w = int.Parse(input[1]);
  int matrix[,] = new int [h,w];//行列
  
  for(int i = 0; i < h; i++)
    {
      int[] nums = Array.ConvertAll(Console.ReadLine().Split(' '),int.Parse);
      for(int j = 0; j < w; j++)matrix[i,j] = nums[j];
    }

  int moveTime = 0;

  for(int i = 0; i < h; i++)
    {
    for(int j = 0; j < w; j++)
      {
      if(matrix[i,j] % 2 == 1)moveTime ++;
      }
    }
  Console.WriteLine(moveTime);

  int pickUp = 0;//持っている時１

  for(int i = 0; i < h; i++)//全部の行を調べる
    {
    if(i % 2 == 0)//偶数行の時
      {
      for(int j = 0; j < w; j++)//全部の列を調べる
        {
        if(matrix[i,j] % 2 == 1)
          {
          if(pickUp == 1)pickUp = 0;
          else
            {
            pickUp = 1;
            if(j+1 < w) Console.WriteLine(i + " " + j + " " + i + " " + ((int)j+1));
            else if(i+1 < h) Console.WriteLine(i + " " + j + " " + ((int)i+1) + " " + j;
            }
          }

        }

      }

      if(i % 2 == １)//奇数行の時
        {
        for(int j = w-1; j >= 0; j--)//全部の列を調べる
          {
          if(matrix[i,j] % 2 == 1)
            {
            if(pickUp == 1)pickUp = 0;
            else
              {
              pickUp = 1;
              if(j-1 >= 0) Console.WriteLine(i + " " + j + " " + i + " " + ((int)j-1));
              else if(i+1 < h) Console.WriteLine(i + " " + j + " " + ((int)i+1) + " " + j;
              }
            }

          }

        }

	  }
  }
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:72:2: error: expected ';' after class definition
   72 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Program::Main()':
a.cc:6:9: error: 'string' was not declared in this scope
    6 |         string[] input = Console.ReadLine().Split(' ');//Splitで区切り文字を指定して複数個受け取る。
      |         ^~~~~~
a.cc:6:16: error: expected primary-expression before ']' token
    6 |         string[] input = Console.ReadLine().Split(' ');//Splitで区切り文字を指定して複数個受け取る。
      |                ^
a.cc:7:17: error: expected primary-expression before 'int'
    7 |         int h = int.Parse(input[0]);
      |                 ^~~
a.cc:8:17: error: expected primary-expression before 'int'
    8 |         int w = int.Parse(input[1]);
      |                 ^~~
a.cc:9:14: error: expected primary-expression before ',' token
    9 |   int matrix[,] = new int [h,w];//行列
      |              ^
a.cc:9:14: error: expected ']' before ',' token
a.cc:9:15: error: expected unqualified-id before ']' token
    9 |   int matrix[,] = new int [h,w];//行列
      |               ^
a.cc:13:10: error: structured binding declaration cannot have type 'int'
   13 |       int[] nums = Array.ConvertAll(Console.ReadLine().Split(' '),int.Parse);
      |          ^~
a.cc:13:10: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:13:10: error: empty structured binding declaration
a.cc:13:13: error: expected initializer before 'nums'
   13 |       int[] nums = Array.ConvertAll(Console.ReadLine().Split(' '),int.Parse);
      |             ^~~~
a.cc:14:33: error: 'matrix' was not declared in this scope
   14 |       for(int j = 0; j < w; j++)matrix[i,j] = nums[j];
      |                                 ^~~~~~
a.cc:14:47: error: 'nums' was not declared in this scope
   14 |       for(int j = 0; j < w; j++)matrix[i,j] = nums[j];
      |                                               ^~~~
a.cc:23:10: error: 'matrix' was not declared in this scope
   23 |       if(matrix[i,j] % 2 == 1)moveTime ++;
      |          ^~~~~~
a.cc:26:3: error: 'Console' was not declared in this scope
   26 |   Console.WriteLine(moveTime);
      |   ^~~~~~~
a.cc:36:12: error: 'matrix' was not declared in this scope
   36 |         if(matrix[i,j] % 2 == 1)
      |            ^~~~~~
a.cc:42:55: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+'
   42 |             if(j+1 < w) Console.WriteLine(i + " " + j + " " + i + " " + ((int)j+1));
      |                                           ~~~~~~~~~~~ ^ ~~~
      |                                                   |     |
      |                                                   |     const char [2]
      |                                                   const char*
a.cc:43:60: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+'
   43 |             else if(i+1 < h) Console.WriteLine(i + " " + j + " " + ((int)i+1) + " " + j;
      |                                                ~~~~~~~~~~~ ^ ~~~
      |                                                        |     |
      |                                                        |     const char [2]
      |                                                        const char*
a.cc:51:19: error: '\U0000ff11' was not declared in this scope
   51 |       if(i % 2 == １)//奇数行の時
      |                   ^~
a.cc:55:14: error: 'matrix' was not declared in this scope
   55 |           if(matrix[i,j] % 2 == 1)
      |              ^~~~~~
a.cc:61:58: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+'
   61 |               if(j-1 >= 0) Console.WriteLine(i + " " + j + " " + i + " " + ((int)j-1));
      |                                              ~~~~~~~~~~~ ^ ~~~
      |                                                      |     |
      |                                                      |     const char [2]
      |                                                      const char*
a.cc:62:62: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+'
   62 |               else if(i+1 < h) Console.WriteLine(i + " " + j + " " + ((int)i+1) + " " + j;
      |                                                  ~~~~~~~~~~~ ^ ~~~
      |                                                          |     |
      |                                                          |     const char [2]
      |                                                          const char*