Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.026 s | 3 KBi |
#2 |
Correcto
|
0.029 s | 3 KBi |
#3 |
Correcto
|
0.038 s | 3 KBi |
#4 |
Correcto
|
0.034 s | 3 KBi |
#5 |
Correcto
|
0.033 s | 3 KBi |
#6 |
Correcto
|
0.033 s | 3 KBi |
#7 |
Correcto
|
0.026 s | 3 KBi |
#8 |
Correcto
|
0.039 s | 3 KBi |
#9 |
Correcto
|
0.028 s | 3 KBi |
#10 |
Correcto
|
0.026 s | 3 KBi |
#11 |
Correcto
|
0.051 s | 3 KBi |
#12 |
Correcto
|
0.047 s | 3 KBi |
using System; public class Program { public static void Main() { var length = Console.ReadLine(); if (Int32.Parse(length) <= 1) { Console.WriteLine("Ordenado"); } var input = Console.ReadLine(); var numbers = input.Split(' '); for (int i=0; i<Int64.Parse(length) - 1; i++) { if (Int64.Parse(numbers[i]) > Int64.Parse(numbers[i+1])) { Console.WriteLine("Desordenado"); return; } } Console.WriteLine("Ordenado"); } }