Language: C++

using System;
using System.Collections.Generic;
class _0033
{
    public static void Main()
    {
        int n = int.Parse(Console.ReadLine());
        for (int i = 0; i < n; i++)
        {
            string[] data = Console.ReadLine().Split();
            Console.WriteLine(Judge(data) ? "YES" : "NO");
        }
    }
    public static bool Judge(string[] data)
    {
        int right = 0;
        int left = 0;
        for (int i = 0; i < data.Length; i++)
        {
            if (right < int.Parse(data[i])) right = int.Parse(data[i]);
            else if (left < int.Parse(data[i])) left = int.Parse(data[i]);
            else return false;
        }
        return true;
    }
}

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:5:11: error: expected ':' before 'static'
    5 |     public static void Main()
      |           ^~~~~~~
      |           :
a.cc:14:11: error: expected ':' before 'static'
   14 |     public static bool Judge(string[] data)
      |           ^~~~~~~
      |           :
a.cc:14:30: error: 'string' has not been declared
   14 |     public static bool Judge(string[] data)
      |                              ^~~~~~
a.cc:14:39: error: expected ',' or '...' before 'data'
   14 |     public static bool Judge(string[] data)
      |                                       ^~~~
a.cc:26:2: error: expected ';' after class definition
   26 | }
      |  ^
      |  ;
a.cc: In static member function 'static void _0033::Main()':
a.cc:7:17: error: expected primary-expression before 'int'
    7 |         int n = int.Parse(Console.ReadLine());
      |                 ^~~
a.cc:10:13: error: 'string' was not declared in this scope
   10 |             string[] data = Console.ReadLine().Split();
      |             ^~~~~~
a.cc:10:20: error: expected primary-expression before ']' token
   10 |             string[] data = Console.ReadLine().Split();
      |                    ^
a.cc:11:13: error: 'Console' was not declared in this scope
   11 |             Console.WriteLine(Judge(data) ? "YES" : "NO");
      |             ^~~~~~~
a.cc:11:37: error: 'data' was not declared in this scope
   11 |             Console.WriteLine(Judge(data) ? "YES" : "NO");
      |                                     ^~~~
a.cc: In static member function 'static bool _0033::Judge(int*)':
a.cc:18:29: error: 'data' was not declared in this scope
   18 |         for (int i = 0; i < data.Length; i++)
      |                             ^~~~
a.cc:20:25: error: expected primary-expression before 'int'
   20 |             if (right < int.Parse(data[i])) right = int.Parse(data[i]);
      |                         ^~~
a.cc:20:25: error: expected ')' before 'int'
a.cc:20:16: note: to match this '('
   20 |             if (right < int.Parse(data[i])) right = int.Parse(data[i]);
      |                ^
a.cc:20:53: error: expected primary-expression before 'int'
   20 |             if (right < int.Parse(data[i])) right = int.Parse(data[i]);
      |                                                     ^~~
a.cc:21:29: error: expected primary-expression before 'int'
   21 |             else if (left < int.Parse(data[i])) left = int.Parse(data[i]);
      |                             ^~~
a.cc:21:29: error: expected ')' before 'int'
a.cc:21:21: note: to match this '('
   21 |             else if (left < int.Parse(data[i])) left = int.Parse(data[i]);
      |                     ^
a.cc:21:56: error: expected primary-expression before 'int'
   21 |             else if (left < int.Parse(data[i])) left = int.Parse(data[i]);
      |                                                        ^~~