Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.041 s | 3 KBi |
#2 |
Correcto
|
0.028 s | 3 KBi |
#3 |
Correcto
|
0.036 s | 3 KBi |
#4 |
Correcto
|
0.033 s | 3 KBi |
#5 |
Correcto
|
0.032 s | 3 KBi |
#6 |
Incorrecto
|
0.034 s | 3 KBi |
#7 |
Incorrecto
|
0.035 s | 3 KBi |
#8 |
Incorrecto
|
0.028 s | 3 KBi |
#9 |
Correcto
|
0.036 s | 3 KBi |
#10 |
Correcto
|
0.028 s | 3 KBi |
#11 |
Correcto
|
0.03 s | 3 KBi |
#12 |
Correcto
|
0.032 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"); } }