█████████ ████ ███░░░░░███ ░░███ ███ ░░░ ██████ ███████ ██████ ██████ ░███ ███░░███ ███░░███ ███░░███ ███░░███ ░███ ░███ ░███░███ ░███ ░███████ ░███ ░███ ░░███ ███░███ ░███░███ ░███ ░███░░░ ░███ ░███ ░░█████████ ░░██████ ░░████████░░██████ ░░██████ ░░░░░░░░░ ░░░░░░ ░░░░░░░░ ░░░░░░ ░░░░░░

Envío 5226

Problema 0x9d - ¿Está ordenado?

  • Autor: dvsalcedo
  • Fecha: 2021-10-28 20:36:47 UTC (Hace alrededor de 1 año)
Caso # Resultado Tiempo Memoria
#1
Error de compilación
                      Main.cs(11,23): error CS0019: Operator `-' cannot be applied to operands of type `string' and `int'
Compilation failed: 1 error(s), 0 warnings

                    
#2
Error de compilación
                      Main.cs(11,23): error CS0019: Operator `-' cannot be applied to operands of type `string' and `int'
Compilation failed: 1 error(s), 0 warnings

                    
#3
Error de compilación
                      Main.cs(11,23): error CS0019: Operator `-' cannot be applied to operands of type `string' and `int'
Compilation failed: 1 error(s), 0 warnings

                    
#4
Error de compilación
                      Main.cs(11,23): error CS0019: Operator `-' cannot be applied to operands of type `string' and `int'
Compilation failed: 1 error(s), 0 warnings

                    
#5
Error de compilación
                      Main.cs(11,23): error CS0019: Operator `-' cannot be applied to operands of type `string' and `int'
Compilation failed: 1 error(s), 0 warnings

                    
#6
Error de compilación
                      Main.cs(11,23): error CS0019: Operator `-' cannot be applied to operands of type `string' and `int'
Compilation failed: 1 error(s), 0 warnings

                    
#7
Error de compilación
                      Main.cs(11,23): error CS0019: Operator `-' cannot be applied to operands of type `string' and `int'
Compilation failed: 1 error(s), 0 warnings

                    
#8
Error de compilación
                      Main.cs(11,23): error CS0019: Operator `-' cannot be applied to operands of type `string' and `int'
Compilation failed: 1 error(s), 0 warnings

                    
#9
Error de compilación
                      Main.cs(11,23): error CS0019: Operator `-' cannot be applied to operands of type `string' and `int'
Compilation failed: 1 error(s), 0 warnings

                    
#10
Error de compilación
                      Main.cs(11,23): error CS0019: Operator `-' cannot be applied to operands of type `string' and `int'
Compilation failed: 1 error(s), 0 warnings

                    
#11
Error de compilación
                      Main.cs(11,23): error CS0019: Operator `-' cannot be applied to operands of type `string' and `int'
Compilation failed: 1 error(s), 0 warnings

                    
#12
Error de compilación
                      Main.cs(11,23): error CS0019: Operator `-' cannot be applied to operands of type `string' and `int'
Compilation failed: 1 error(s), 0 warnings

                    
Puntos totales: 0 / 100

Código

using System;

public class Program
{
   public static void Main()
   {
      var length = Console.ReadLine();
      var input = Console.ReadLine();
      var numbers = input.Split(' ');

      for (int i=0; i<length - 1; i++) {
        if (Int32.Parse(numbers[i]) >= Int32.Parse(numbers[i+1])) {
           Console.WriteLine("Desordenado");
           return;
        }
      }
      Console.WriteLine("Ordenado");
   }
}