Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.128 s | 13 KBi |
#2 |
Correcto
|
0.153 s | 12 KBi |
#3 |
Correcto
|
0.194 s | 14 KBi |
#4 |
Correcto
|
0.143 s | 13 KBi |
#5 |
Correcto
|
0.123 s | 13 KBi |
#6 |
Correcto
|
0.194 s | 14 KBi |
#7 |
Correcto
|
0.184 s | 14 KBi |
#8 |
Correcto
|
0.179 s | 14 KBi |
#9 |
Correcto
|
0.247 s | 15 KBi |
#10 |
Correcto
|
0.186 s | 14 KBi |
#11 |
Correcto
|
0.165 s | 12 KBi |
#12 |
Correcto
|
0.11 s | 16 KBi |
import java.util.*; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int arraySize = scanner.nextInt(); int previous = scanner.nextInt(); for(int i = 1; i < arraySize; i++) { int current = scanner.nextInt(); if(current < previous) { System.out.println("Desordenado"); return; } previous = current; } System.out.println("Ordenado"); } }