Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.147 s | 15 KBi |
#2 |
Correcto
|
0.176 s | 12 KBi |
#3 |
Correcto
|
0.145 s | 16 KBi |
#4 |
Correcto
|
0.132 s | 15 KBi |
#5 |
Correcto
|
0.182 s | 12 KBi |
#6 |
Correcto
|
0.171 s | 16 KBi |
#7 |
Correcto
|
0.147 s | 16 KBi |
#8 |
Correcto
|
0.159 s | 16 KBi |
#9 |
Correcto
|
0.171 s | 16 KBi |
#10 |
Correcto
|
0.162 s | 16 KBi |
#11 |
Correcto
|
0.172 s | 15 KBi |
#12 |
Correcto
|
0.17 s | 15 KBi |
import java.util.Scanner; class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] array = new int[n]; for(int i=0; i<n; i++){ array[i] = sc.nextInt(); } int last_number = array[0]; for(int i=1; i<n; i++){ if(last_number > array[i]){ System.out.println("Desordenado"); return; } last_number = array[i]; } System.out.println("Ordenado"); } }