Language: C++

using System;
using System.Collections.Generic;
using System.Linq;
class Ho{
  static void Main(){
    var n = int.Parse(Console.ReadLine());
    var aho = Console.ReadLine().Split();
    var h = new List<int>();
    var zen = int.Parse(aho[0]);
    int kai = 0;
    int soko=0;
    for(var i = 1;i<n;i++){
      int b = int.Parse(aho[i]);
      if(zen > b){
        kai++;
        soko = i-1;
      }
      zen = b;
    }
    if(kai == 0) Console.WriteLine("Yes");
    if(kai == 1){
      int ii = int.Parse(aho[soko]);
      int kk = int.Parse(aho[soko+1]);
      int oo = int.Parse(aho[soko-1]);
      if(ii-1 <= kk&& ii-1>= oo) Console.WriteLine("Yes");
      else Console.WriteLine("No");
    }
    if(kai >= 2) Console.WriteLine("No");
  }
}

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:30:2: error: expected ';' after class definition
   30 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Ho::Main()':
a.cc:6:5: error: 'var' was not declared in this scope
    6 |     var n = int.Parse(Console.ReadLine());
      |     ^~~
a.cc:7:9: error: expected ';' before 'aho'
    7 |     var aho = Console.ReadLine().Split();
      |         ^~~
a.cc:8:9: error: expected ';' before 'h'
    8 |     var h = new List<int>();
      |         ^
a.cc:9:9: error: expected ';' before 'zen'
    9 |     var zen = int.Parse(aho[0]);
      |         ^~~
a.cc:12:13: error: expected ';' before 'i'
   12 |     for(var i = 1;i<n;i++){
      |             ^
a.cc:12:19: error: 'i' was not declared in this scope
   12 |     for(var i = 1;i<n;i++){
      |                   ^
a.cc:12:21: error: 'n' was not declared in this scope
   12 |     for(var i = 1;i<n;i++){
      |                     ^
a.cc:13:15: error: expected primary-expression before 'int'
   13 |       int b = int.Parse(aho[i]);
      |               ^~~
a.cc:14:10: error: 'zen' was not declared in this scope
   14 |       if(zen > b){
      |          ^~~
a.cc:18:7: error: 'zen' was not declared in this scope
   18 |       zen = b;
      |       ^~~
a.cc:20:18: error: 'Console' was not declared in this scope
   20 |     if(kai == 0) Console.WriteLine("Yes");
      |                  ^~~~~~~
a.cc:22:16: error: expected primary-expression before 'int'
   22 |       int ii = int.Parse(aho[soko]);
      |                ^~~
a.cc:23:16: error: expected primary-expression before 'int'
   23 |       int kk = int.Parse(aho[soko+1]);
      |                ^~~
a.cc:24:16: error: expected primary-expression before 'int'
   24 |       int oo = int.Parse(aho[soko-1]);
      |                ^~~
a.cc:25:34: error: 'Console' was not declared in this scope
   25 |       if(ii-1 <= kk&& ii-1>= oo) Console.WriteLine("Yes");
      |                                  ^~~~~~~
a.cc:26:12: error: 'Console' was not declared in this scope
   26 |       else Console.WriteLine("No");
      |            ^~~~~~~
a.cc:28:18: error: 'Console' was not declared in this scope
   28 |     if(kai >= 2) Console.WriteLine("No");
      |                  ^~~~~~~