Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Error de compilación
Main.java:18: error: cannot find symbol last_number = array[0]; ^ symbol: variable last_number location: class Main Main.java:21: error: cannot find symbol if(last_number > array[i]){ ^ symbol: variable last_number location: class Main Main.java:23: error: incompatible types: unexpected return value return 0; ^ Main.java:26: error: cannot find symbol last_number = array[i]; ^ symbol: variable last_number location: class Main Main.java:29: error: incompatible types: unexpected return value return 0; ^ 5 errors |
||
#2 |
Error de compilación
Main.java:18: error: cannot find symbol last_number = array[0]; ^ symbol: variable last_number location: class Main Main.java:21: error: cannot find symbol if(last_number > array[i]){ ^ symbol: variable last_number location: class Main Main.java:23: error: incompatible types: unexpected return value return 0; ^ Main.java:26: error: cannot find symbol last_number = array[i]; ^ symbol: variable last_number location: class Main Main.java:29: error: incompatible types: unexpected return value return 0; ^ 5 errors |
||
#3 |
Error de compilación
Main.java:18: error: cannot find symbol last_number = array[0]; ^ symbol: variable last_number location: class Main Main.java:21: error: cannot find symbol if(last_number > array[i]){ ^ symbol: variable last_number location: class Main Main.java:23: error: incompatible types: unexpected return value return 0; ^ Main.java:26: error: cannot find symbol last_number = array[i]; ^ symbol: variable last_number location: class Main Main.java:29: error: incompatible types: unexpected return value return 0; ^ 5 errors |
||
#4 |
Error de compilación
Main.java:18: error: cannot find symbol last_number = array[0]; ^ symbol: variable last_number location: class Main Main.java:21: error: cannot find symbol if(last_number > array[i]){ ^ symbol: variable last_number location: class Main Main.java:23: error: incompatible types: unexpected return value return 0; ^ Main.java:26: error: cannot find symbol last_number = array[i]; ^ symbol: variable last_number location: class Main Main.java:29: error: incompatible types: unexpected return value return 0; ^ 5 errors |
||
#5 |
Error de compilación
Main.java:18: error: cannot find symbol last_number = array[0]; ^ symbol: variable last_number location: class Main Main.java:21: error: cannot find symbol if(last_number > array[i]){ ^ symbol: variable last_number location: class Main Main.java:23: error: incompatible types: unexpected return value return 0; ^ Main.java:26: error: cannot find symbol last_number = array[i]; ^ symbol: variable last_number location: class Main Main.java:29: error: incompatible types: unexpected return value return 0; ^ 5 errors |
||
#6 |
Error de compilación
Main.java:18: error: cannot find symbol last_number = array[0]; ^ symbol: variable last_number location: class Main Main.java:21: error: cannot find symbol if(last_number > array[i]){ ^ symbol: variable last_number location: class Main Main.java:23: error: incompatible types: unexpected return value return 0; ^ Main.java:26: error: cannot find symbol last_number = array[i]; ^ symbol: variable last_number location: class Main Main.java:29: error: incompatible types: unexpected return value return 0; ^ 5 errors |
||
#7 |
Error de compilación
Main.java:18: error: cannot find symbol last_number = array[0]; ^ symbol: variable last_number location: class Main Main.java:21: error: cannot find symbol if(last_number > array[i]){ ^ symbol: variable last_number location: class Main Main.java:23: error: incompatible types: unexpected return value return 0; ^ Main.java:26: error: cannot find symbol last_number = array[i]; ^ symbol: variable last_number location: class Main Main.java:29: error: incompatible types: unexpected return value return 0; ^ 5 errors |
||
#8 |
Error de compilación
Main.java:18: error: cannot find symbol last_number = array[0]; ^ symbol: variable last_number location: class Main Main.java:21: error: cannot find symbol if(last_number > array[i]){ ^ symbol: variable last_number location: class Main Main.java:23: error: incompatible types: unexpected return value return 0; ^ Main.java:26: error: cannot find symbol last_number = array[i]; ^ symbol: variable last_number location: class Main Main.java:29: error: incompatible types: unexpected return value return 0; ^ 5 errors |
||
#9 |
Error de compilación
Main.java:18: error: cannot find symbol last_number = array[0]; ^ symbol: variable last_number location: class Main Main.java:21: error: cannot find symbol if(last_number > array[i]){ ^ symbol: variable last_number location: class Main Main.java:23: error: incompatible types: unexpected return value return 0; ^ Main.java:26: error: cannot find symbol last_number = array[i]; ^ symbol: variable last_number location: class Main Main.java:29: error: incompatible types: unexpected return value return 0; ^ 5 errors |
||
#10 |
Error de compilación
Main.java:18: error: cannot find symbol last_number = array[0]; ^ symbol: variable last_number location: class Main Main.java:21: error: cannot find symbol if(last_number > array[i]){ ^ symbol: variable last_number location: class Main Main.java:23: error: incompatible types: unexpected return value return 0; ^ Main.java:26: error: cannot find symbol last_number = array[i]; ^ symbol: variable last_number location: class Main Main.java:29: error: incompatible types: unexpected return value return 0; ^ 5 errors |
||
#11 |
Error de compilación
Main.java:18: error: cannot find symbol last_number = array[0]; ^ symbol: variable last_number location: class Main Main.java:21: error: cannot find symbol if(last_number > array[i]){ ^ symbol: variable last_number location: class Main Main.java:23: error: incompatible types: unexpected return value return 0; ^ Main.java:26: error: cannot find symbol last_number = array[i]; ^ symbol: variable last_number location: class Main Main.java:29: error: incompatible types: unexpected return value return 0; ^ 5 errors |
||
#12 |
Error de compilación
Main.java:18: error: cannot find symbol last_number = array[0]; ^ symbol: variable last_number location: class Main Main.java:21: error: cannot find symbol if(last_number > array[i]){ ^ symbol: variable last_number location: class Main Main.java:23: error: incompatible types: unexpected return value return 0; ^ Main.java:26: error: cannot find symbol last_number = array[i]; ^ symbol: variable last_number location: class Main Main.java:29: error: incompatible types: unexpected return value return 0; ^ 5 errors |
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(); } last_number = array[0]; for(int i=1; i<n; i++){ if(last_number > array[i]){ System.out.println("Desordenado"); return 0; } last_number = array[i]; } System.out.println("Ordenado"); return 0; } }