Language: C++

using System;
    class Program
    {
        static void Main(string[] args)
        {
            //入力
            //string[] xInputMax = "3 3".Split(' ');
            //string[] xInputMax = "6 5".Split(' ');
            string[] xInputMax = Console.ReadLine().Split(' ');
            int xMaxX = int.Parse(xInputMax[0]);
            int xMaxY = int.Parse(xInputMax[1]);
            //string[] xInputX = "1 3 4".Split(' ');
            //string[] xInputX = "-790013317 -192321079 95834122 418379342 586260100 802780784".Split(' ');
            string[] xInputX = Console.ReadLine().Split(' ');
            long[] x = new long[xMaxX];
            for (int i = 0; i < xMaxX; ++i)
            {
                x[i] = long.Parse(xInputX[i]);
            }
            //string[] xInputY = "1 3 6".Split(' ');
            //string[] xInputY = "-253230108 193944314 363756450 712662868 735867677".Split(' ');
            string[] xInputY = Console.ReadLine().Split(' ');
            long[] y = new long[xMaxY];
            for (int i = 0; i < xMaxY; ++i)
            {
                y[i] = long.Parse(xInputY[i]);
            }
            //計算
            long xDivisor = 1000000007;
            long xSumX = 0;
            for (int i = 0; i < xMaxX - 1; ++i)
            {
                for (int j = i + 1; j <= xMaxX - 1; ++j)
                {
                    xSumX += x[j] - x[i];
                }
            }
            xSumX = xSumX % xDivisor;
            long xSumY = 0;
            for (int k = 0; k < xMaxY - 1; ++k)
            {
                for (int l = k + 1; l <= xMaxY - 1; ++l)
                {
                    xSumY += y[l] - y[k];
                }
            }
            xSumY = xSumY % xDivisor;
            //出力
            Console.WriteLine((xSumX * xSumY) % xDivisor);
        }
    }


Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:4:26: error: 'string' has not been declared
    4 |         static void Main(string[] args)
      |                          ^~~~~~
a.cc:4:35: error: expected ',' or '...' before 'args'
    4 |         static void Main(string[] args)
      |                                   ^~~~
a.cc:51:6: error: expected ';' after class definition
   51 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void Program::Main(int*)':
a.cc:9:13: error: 'string' was not declared in this scope
    9 |             string[] xInputMax = Console.ReadLine().Split(' ');
      |             ^~~~~~
a.cc:9:20: error: expected primary-expression before ']' token
    9 |             string[] xInputMax = Console.ReadLine().Split(' ');
      |                    ^
a.cc:10:25: error: expected primary-expression before 'int'
   10 |             int xMaxX = int.Parse(xInputMax[0]);
      |                         ^~~
a.cc:11:25: error: expected primary-expression before 'int'
   11 |             int xMaxY = int.Parse(xInputMax[1]);
      |                         ^~~
a.cc:14:20: error: expected primary-expression before ']' token
   14 |             string[] xInputX = Console.ReadLine().Split(' ');
      |                    ^
a.cc:15:17: error: structured binding declaration cannot have type 'long int'
   15 |             long[] x = new long[xMaxX];
      |                 ^~
a.cc:15:17: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:15:17: error: empty structured binding declaration
a.cc:15:20: error: expected initializer before 'x'
   15 |             long[] x = new long[xMaxX];
      |                    ^
a.cc:18:17: error: 'x' was not declared in this scope
   18 |                 x[i] = long.Parse(xInputX[i]);
      |                 ^
a.cc:18:24: error: expected primary-expression before 'long'
   18 |                 x[i] = long.Parse(xInputX[i]);
      |                        ^~~~
a.cc:22:20: error: expected primary-expression before ']' token
   22 |             string[] xInputY = Console.ReadLine().Split(' ');
      |                    ^
a.cc:23:17: error: structured binding declaration cannot have type 'long int'
   23 |             long[] y = new long[xMaxY];
      |                 ^~
a.cc:23:17: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:23:17: error: empty structured binding declaration
a.cc:23:20: error: expected initializer before 'y'
   23 |             long[] y = new long[xMaxY];
      |                    ^
a.cc:26:17: error: 'y' was not declared in this scope
   26 |                 y[i] = long.Parse(xInputY[i]);
      |                 ^
a.cc:26:24: error: expected primary-expression before 'long'
   26 |                 y[i] = long.Parse(xInputY[i]);
      |                        ^~~~
a.cc:35:30: error: 'x' was not declared in this scope
   35 |                     xSumX += x[j] - x[i];
      |                              ^
a.cc:44:30: error: 'y' was not declared in this scope
   44 |                     xSumY += y[l] - y[k];
      |                              ^
a.cc:49:13: error: 'Console' was not declared in this scope
   49 |             Console.WriteLine((xSumX * xSumY) % xDivisor);
      |             ^~~~~~~